giant.image_processingΒΆ

This module provides a number of image processing techniques for use throughout GIANT.

The class provided by this module, ImageProcessing, is the primary tool used for working with image data throughout GIANT. This class provides routines to identify point sources in an image (find_poi_in_roi(), refine_locations(), locate_subpixel_poi_in_roi()), detect subpixel edges in an image (pae_edges()), perform template matching through cross correlation (correlate()), and denoise/flatten an image and get its noise level (flatten_image_and_get_noise_level(), denoise_image()).

For many of these methods, there are multiple algorithms that can be used to perform the same task. The ImageProcessing class makes it easy to change what algorithm is being used by simply switching out one function object for another. There are a few selections of different algorithms that can be used already provided by this module, and users can easily write their own algorithms and swap them in by following the instructions in the ImageProcessing class.

A general user will usually not directly interact with the classes and functions in this class and instead will rely on the OpNav classes to interact for them.

Classes

ImageProcessing

This class is a collection of various image processing techniques used throughout GIANT.

SubpixelEdgeMethods

This enumeration provides the valid options for subpixel edge detection methods.

ImageFlatteningNoiseApprox

This enumeration provides the valid options for flattening an image and determining the noise levels when identifying points of interest in ImageProcessing.find_poi_in_roi()

Functions

local_maxima

This function returns a boolean mask selecting all local maxima from a 2d array.

cv2_correlator_2d

This function performs a 2D cross correlation between image and template and returns the correlation surface using the OpenCV matchTemplate function.

fft_correlator_2d

This function performs normalized cross correlation between a template and an image in the frequency domain.

spatial_correlator_2d

This function performs normalized cross correlation directly (spatial correlation).

fft_correlator_1d

This function performs 1d correlation based on extracted lines and predicted lines.

otsu

This function performs multilevel Otsu thresholding on a 2D array.

quadric_peak_finder_2d

This function returns a numpy array containing the (x, y) location of the maximum surface value which corresponds to the peak of the fitted quadric surface to subpixel accuracy.

pixel_level_peak_finder_2d

This function returns a numpy array containing the (x, y) location of the maximum surface value to pixel level accuracy.

quadric_peak_finder_2d

This function returns a numpy array containing the (x, y) location of the maximum surface value which corresponds to the peak of the fitted quadric surface to subpixel accuracy.

pixel_level_peak_finder_1d

This function returns a numpy array containing the location of the maximum surface value to pixel level accuracy for each row of the input matrix.

parabolic_peak_finder_1d

Find the subpixel maximum location along each row.

Constants

HORIZONTAL_KERNEL

The horizontal Sobel kernel for convolving with an image when computing the horizontal image gradients.

VERTICAL_KERNEL

The vertical Sobel kernel for convolving with an image when computing the vertical image gradients.

PAE_A01

The 0, 1 coefficient (upper middle) of the Gaussian kernel representing the blurring experienced in the images being processed for the PAE sub-pixel edge method.

PAE_A11

The 1, 1 coefficient (upper left) of the Gaussian kernel representing the blurring experienced in the images being processed for the PAE sub-pixel edge method.

FIRST_ORDER_REAL_MOMENTS

First order real component of Zernike Moments

FIRST_ORDER_IMAGINARY_MOMENTS

First order imaginary component of Zernike Moments

SECOND_ORDER_MOMENTS

Second order Zernike Moments