Python Utils Module (pyirt.utils)

Provides an number of utilities useful in the calculation of the image ray transform (as well as other vision techniques).

pyirt.utils.difference_from_intensity(mat, target)[source]

Transform this array mat so that pixels with intensity target have intensity 255 and others are scaled by their distance to target.

pyirt.utils.is_image_ext(in_ext)[source]

Checks whether in_ext is an image extension (.jpg, .gif, .png, .jpeg, .pgm, .ppm, .tif, .bmp).

pyirt.utils.normalise_array(mat, new_max)[source]

Normalise array mat to be between 0 and new_max.

pyirt.utils.pascal_triangle(k, n)[source]

Get value of row k and position n in pascal’s triangle

pyirt.utils.sobel(mat, tsize=3)[source]

Perform Sobel edge detection with a template size of tsize.

pyirt.utils.sobel_template(tsize=3)[source]

Generate the x and y Sobel templates of size tsize.

F2PY Utils Extension Module (pyirt._utils)

This module is a C extension built with F2PY, implementing critical functions that are helpful in preparing the transform.

pyirt._utils.simple_convolve(mat, temp)

Performs an iterative convolution of mat with temp. Faster than Fourier convolution for small templates.

Table Of Contents

Previous topic

F2PY Transform Extension Module (pyirt._transform)

This Page