ZernikeRampEdgeDetector¶
- class giant.image_processing.edge_detection.ZernikeRampEdgeDetector(options=None)[source]¶
This class implements a subpixel edge detector using the Zernike Ramp method.
The Zernike Ramp method is described in detail in https://arc.aiaa.org/doi/full/10.2514/1.A33692?mobileUi=0. It uses precomputed Zernike moments and their inner products with the image data around pixel-level edges to compute subpixel corrections.
There is one tuning parameter for this method,
edge_width
, which specifies half the total edge width in pixels. This is typically set to 1.66*sigma, where sigma is the point spread function full width half maximum for the camera.This class first identifies pixel-level edges using a
PixelEdgeDetector
, then refines them to subpixel accuracy using the Zernike Ramp method.- Parameters:
options (ZernikeRampEdgeDetectorOptions | None) – The options configuring the Zernike ramp subpixel edge detector.
- refine_edges(image, edges)[source]¶
This method refines edge locations using the Zernike Ramp method described in https://arc.aiaa.org/doi/full/10.2514/1.A33692?mobileUi=0.
The subpixel edge locations are found by computing the inner product between precomputed Zernike moments and the image data around the pixel level edges, and then computing a correction to the pixel level edge (see the paper for details).
There is one tuning parameter for this method and that is the half edge width which is specified in the
zernike_edge_width
attribute. This should be set to roughly half the total edge length in pixels, which is typically approximately 1.66*sigma where sigma is the point spread function full width half maximum for the camera.This method returns a 2xn array of subpixel edge points, leaving the pixel level edge points for areas where it failed.
- Parameters:
image (ndarray[tuple[Any, ...], dtype[_ScalarT]]) – The image which the edge points index into
edges (ndarray[tuple[Any, ...], dtype[int64]]) – the pixel level edge points to be refined.
- Returns:
A 2xn array of subpixel edge points (col [x], row[y])
- Return type:
ndarray[tuple[Any, …], dtype[float64]]
- identify_edges(image)[source]¶
This method identifies pixel level edges in the image and then refines them to the subpixel locations using the PAE method.
The pixel edges are detected using the
PixelEdgeDetector
. They are then refined usingrefine_edges()
.- Parameters:
image (ndarray[tuple[Any, ...], dtype[_ScalarT]]) – The image to detect the edges in.
- Returns:
The subpixel edges as a 2xn array with x (column) components in the first axis and y (row) components in the second axis
- Return type:
ndarray[tuple[Any, …], dtype[float64]]
Methods
This method identifies pixel level edges in the image and then refines them to the subpixel locations using the PAE method. |
|
This method refines edge locations using the Zernike Ramp method described in https://arc.aiaa.org/doi/full/10.2514/1.A33692?mobileUi=0. |
Inherited Attributes
horizontal_mask
vertical_mask
horizontal_gradient
vertical_gradient
gradient_magnitude