public class ConnectedThresholdSegmenter extends ThresholdSegmenter
Segmenter
s by
applying the thresholding operation and then applying connected component
labeling. This class will produce components for both the foreground and
background elements of thresholded input image.Constructor and Description |
---|
ConnectedThresholdSegmenter(Processor<FImage> thresholder,
ConnectedComponent.ConnectMode mode)
Construct with the given thresholding algorithm implementation and
connection mode.
|
ConnectedThresholdSegmenter(Processor<FImage> thresholder,
ConnectedComponentLabeler.Algorithm algorithm,
ConnectedComponent.ConnectMode mode)
Construct with the given thresholding algorithm implementation.
|
Modifier and Type | Method and Description |
---|---|
List<ConnectedComponent> |
segment(FImage image)
Segment an image into
ConnectedComponent s. |
public ConnectedThresholdSegmenter(Processor<FImage> thresholder, ConnectedComponent.ConnectMode mode)
thresholder
- the thresholding algorithmmode
- the connection modepublic ConnectedThresholdSegmenter(Processor<FImage> thresholder, ConnectedComponentLabeler.Algorithm algorithm, ConnectedComponent.ConnectMode mode)
thresholder
- the thresholding algorithmalgorithm
- the connected component labeling algorithm to usemode
- the connection modepublic List<ConnectedComponent> segment(FImage image)
Segmenter
ConnectedComponent
s.segment
in interface Segmenter<FImage>
segment
in class ThresholdSegmenter
image
- the to segmentConnectedComponent
s.