ImageProcessing.pae_edges¶
- ImageProcessing.pae_edges(image)[source]¶
This method locates edges in an image with subpixel accuracy.
Edges are defined as places in the image where the illumination values abruptly transition from light to dark or dark to light. The algorithms in this method are based off of the Partial Area Effect as discussed in http://www.sciencedirect.com/science/article/pii/S0262885612001850
First edges are detected at the pixel level by using a gradient based edge detection method. The edges are then refined to subpixel accuracy using the PAE. Tests have shown that the PAE achieves accuracy better than 0.1 pixels in most cases.
There are two tuning parameters for the PAE method. One is the
pae_threshold
. This is the threshold for detecting pixel level edges (ie the absolute value of the gradient of the image must be above this threshold for an edge to be identified). The second tuning parameter is thepae_order
. Thepae_order
specifies whether a linear or quadratic fit is used to refine the edge location. It should have a value of 1 or 2.Note that this method returns all edges in an image. If you are looking for just limbs, check out the
identify_subpixel_limbs()
method instead- Parameters:
image (ndarray) – The image to be processed
- Returns:
a 2xn numpy array of the subpixel edge locations (cols [x], rows [y])
- Return type:
ndarray