Package boofcv.abst.filter.binary
Class BinaryLabelContourFinderChang2004
java.lang.Object
boofcv.abst.filter.binary.BinaryLabelContourFinderChang2004
- All Implemented Interfaces:
BinaryContourInterface
,BinaryLabelContourFinder
Wrapper around
LinearContourLabelChang2004
for
BinaryLabelContourFinder
-
Nested Class Summary
Nested classes/interfaces inherited from interface boofcv.abst.filter.binary.BinaryContourInterface
BinaryContourInterface.Padded
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns a list of contours/blobs found.getMaxContour
(@Nullable ConfigLength length) Returns the maximum contour.getMinContour
(@Nullable ConfigLength length) Returns the minimum contourboolean
void
loadContour
(int contourID, DogArray<Point2D_I32> storage) Used to load the pixels associated with a contour.void
Processes the binary image to find the contour of and label blobs.void
setConnectRule
(ConnectRule rule) void
setMaxContour
(ConfigLength length) Specifies the maximum contour as either an absolute value in pixels or a value relative to the sqrt(width*height).void
setMinContour
(ConfigLength length) Specifies the minimum contour as either an absolute value in pixels or a value relative to the sqrt(width*height).void
setSaveInnerContour
(boolean enabled) Used to toggle on and off the saving of inner contours.void
writeContour
(int contourID, List<Point2D_I32> list) Overwrites the coordinates of the saved contour.
-
Constructor Details
-
BinaryLabelContourFinderChang2004
public BinaryLabelContourFinderChang2004()
-
-
Method Details
-
process
Description copied from interface:BinaryLabelContourFinder
Processes the binary image to find the contour of and label blobs.- Specified by:
process
in interfaceBinaryLabelContourFinder
- Parameters:
binary
- Input binary image. Not modified.labeled
- Output. Labeled image. Modified.
-
getContours
Description copied from interface:BinaryContourInterface
Returns a list of contours/blobs found. WARNING: List is recycled on the next call to process().- Specified by:
getContours
in interfaceBinaryContourInterface
- Returns:
- List of contours.
-
loadContour
Description copied from interface:BinaryContourInterface
Used to load the pixels associated with a contour.- Specified by:
loadContour
in interfaceBinaryContourInterface
- Parameters:
contourID
- ID of the contour you wish to loadstorage
- Storage for the contour points. Must be set to declare new elements.
-
writeContour
Description copied from interface:BinaryContourInterface
Overwrites the coordinates of the saved contour. Useful when points have been undistorted and you're trying to minimize memory by not saving another copy- Specified by:
writeContour
in interfaceBinaryContourInterface
- Parameters:
contourID
- ID of the contour you wish to loadlist
- Storage for the contour points. Must be set to declare new elements.
-
setSaveInnerContour
public void setSaveInnerContour(boolean enabled) Description copied from interface:BinaryContourInterface
Used to toggle on and off the saving of inner contours.- Specified by:
setSaveInnerContour
in interfaceBinaryContourInterface
- Parameters:
enabled
- true to enable or false to disable
-
isSaveInternalContours
public boolean isSaveInternalContours()- Specified by:
isSaveInternalContours
in interfaceBinaryContourInterface
-
setMinContour
Description copied from interface:BinaryContourInterface
Specifies the minimum contour as either an absolute value in pixels or a value relative to the sqrt(width*height). Threshold ≤ 0 will be treated as infinite.- Specified by:
setMinContour
in interfaceBinaryContourInterface
-
getMinContour
Description copied from interface:BinaryContourInterface
Returns the minimum contour- Specified by:
getMinContour
in interfaceBinaryContourInterface
- Parameters:
length
- Optional storage for the contour's length- Returns:
- The contour's length
-
setMaxContour
Description copied from interface:BinaryContourInterface
Specifies the maximum contour as either an absolute value in pixels or a value relative to the sqrt(width*height). Threshold ≤ 0 will be treated as infinite.- Specified by:
setMaxContour
in interfaceBinaryContourInterface
-
getMaxContour
Description copied from interface:BinaryContourInterface
Returns the maximum contour. Threshold %le; 0 will be treated as infinite.- Specified by:
getMaxContour
in interfaceBinaryContourInterface
- Parameters:
length
- Optional storage for the contour's length- Returns:
- The contour's length
-
setConnectRule
- Specified by:
setConnectRule
in interfaceBinaryContourInterface
-
getConnectRule
- Specified by:
getConnectRule
in interfaceBinaryContourInterface
-