Package boofcv.alg.feature.detect.edge
Class CannyEdge<T extends ImageGray<T>,D extends ImageGray<D>>
java.lang.Object
boofcv.alg.feature.detect.edge.CannyEdge<T,D>
- Direct Known Subclasses:
CannyEdgeDynamic
Implementation of canny edge detector. The canny edge detector detects the edges of objects
using a hysteresis threshold. When scanning the image pixels with edge intensities below
the high threshold are ignored. After a pixel is found that exceeds the high threshold any
pixel that is connect to it directly or indirectly just needs to exceed the low threshold.
The output from this class can be configured to output a binary edge image and/or a set of contours
for each point in the contour image.
-
Field Summary
Modifier and TypeFieldDescriptionprotected HysteresisEdgeTraceMark
protected HysteresisEdgeTracePoints
protected GrayF32
-
Constructor Summary
ConstructorDescriptionCannyEdge
(BlurFilter<T> blur, ImageGradient<T, D> gradient, boolean saveTrace) Specify internal algorithms and behavior. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
performThresholding
(float threshLow, float threshHigh, @Nullable GrayU8 output) void
Runs a canny edge detector on the input image given the provided thresholds.
-
Field Details
-
suppressed
-
hysteresisPts
-
hysteresisMark
-
-
Constructor Details
-
CannyEdge
Specify internal algorithms and behavior.- Parameters:
blur
- Initial blur applied to image.gradient
- Computes the image gradient.saveTrace
- Should it save a list of points that compose the objects contour/trace?
-
-
Method Details
-
process
Runs a canny edge detector on the input image given the provided thresholds. If configured to save a list of trace points then the output image is optional.
NOTE: Input and output can be the same instance, if the image type allows it.
- Parameters:
input
- Input image. Not modified.threshLow
- Lower threshold. ≥ 0.threshHigh
- Upper threshold. ≥ 0.output
- (Might be option) Output binary image. Edge pixels are marked with 1 and everything else 0.
-
performThresholding
protected void performThresholding(float threshLow, float threshHigh, @Nullable @Nullable GrayU8 output) -
getContours
-