Package boofcv.abst.segmentation
Class Watershed_to_ImageSuperpixels<T extends ImageBase<T>>
java.lang.Object
boofcv.abst.segmentation.Watershed_to_ImageSuperpixels<T>
- All Implemented Interfaces:
ImageSuperpixels<T>
public class Watershed_to_ImageSuperpixels<T extends ImageBase<T>>
extends Object
implements ImageSuperpixels<T>
Wrapper around
WatershedVincentSoille1991
for ImageSuperpixels
. Watershed regions
and small regions are merged together. When merging regions a preference is given to regions which are the
most similar in color intensity.-
Constructor Summary
ConstructorDescriptionWatershed_to_ImageSuperpixels
(WatershedVincentSoille1991 alg, int minimumSize, ConnectRule rule) -
Method Summary
Modifier and TypeMethodDescriptionType of input image it can processgetRule()
Connectivity rule used to determine if a pixel is connectedint
Returns the total number of image segments/superpixels foundvoid
Segments the input image into superpixels and puts the output in labeled image.void
setImageType
(ImageType<T> imageType)
-
Constructor Details
-
Watershed_to_ImageSuperpixels
public Watershed_to_ImageSuperpixels(WatershedVincentSoille1991 alg, int minimumSize, ConnectRule rule)
-
-
Method Details
-
segment
Description copied from interface:ImageSuperpixels
Segments the input image into superpixels and puts the output in labeled image.- Specified by:
segment
in interfaceImageSuperpixels<T extends ImageBase<T>>
- Parameters:
input
- (Input) image.output
- (Output) Labeled image
-
getTotalSuperpixels
public int getTotalSuperpixels()Description copied from interface:ImageSuperpixels
Returns the total number of image segments/superpixels found- Specified by:
getTotalSuperpixels
in interfaceImageSuperpixels<T extends ImageBase<T>>
- Returns:
- Number of superpixels
-
getRule
Description copied from interface:ImageSuperpixels
Connectivity rule used to determine if a pixel is connected- Specified by:
getRule
in interfaceImageSuperpixels<T extends ImageBase<T>>
- Returns:
- Connectivity rule
-
getImageType
Description copied from interface:ImageSuperpixels
Type of input image it can process- Specified by:
getImageType
in interfaceImageSuperpixels<T extends ImageBase<T>>
- Returns:
- Input image type
-
setImageType
-