public class HysteresisEdgeTracePoints extends Object
Given the output from edge non-maximum suppression, perform hysteresis threshold along the edge and constructs a list of pixels belonging to each contour. Points are first connected in direction tangential to the edge's direction, if no matches are found then a match is searched for using an 8-connect rule. The direction image must be the 4-direction type. If multiple points in the local neighborhood can be added to edge then a new edge segment is created.
Fields Modifier and Type Field Description
Constructors Constructor Description
Modifier and Type Method Description
()Returns the found contours.
GrayF32 intensity, GrayS8 direction, float lower, float upper)(Performs hysteresis thresholding using the provided lower and upper thresholds.
(int x, int y, int indexInten)Traces along object's contour starting at the specified seed.
MARK_TRAVERSEDpublic static final float MARK_TRAVERSED
- See Also:
- Constant Field Values
processPerforms hysteresis thresholding using the provided lower and upper thresholds.
intensity- Intensity image after edge non-maximum suppression has been applied. Modified.
direction- 4-direction image. Not modified.
lower- Lower threshold.
upper- Upper threshold.
traceprotected void trace(int x, int y, int indexInten)Traces along object's contour starting at the specified seed. As it does so it will set the intensity of points which are below the lower threshold to zero and add points to contour.
x- x-coordinate of seed pixel above threshold
y- y-coordinate of seed pixel above threshold
indexInten- Pixel index in the image array of coordinate (x,y)
getContoursReturns the found contours. Returned data structures are subject to modification next time process is called.
- List of found contours.