Package boofcv.factory.segmentation
Class FactoryImageSegmentation
java.lang.Object
boofcv.factory.segmentation.FactoryImageSegmentation
public class FactoryImageSegmentation extends Object
Factory for
ImageSuperpixels
algorithms, which are used to segment the image into super pixels.-
Constructor Summary
Constructors Constructor Description FactoryImageSegmentation()
-
Method Summary
Modifier and Type Method Description static <T extends ImageBase<T>>
ImageSuperpixels<T>fh04(@Nullable ConfigFh04 config, ImageType<T> imageType)
Creates a new instance ofSegmentFelzenszwalbHuttenlocher04
which is in a wrapper forImageSuperpixels
.static <T extends ImageBase<T>>
ImageSuperpixels<T>meanShift(@Nullable ConfigSegmentMeanShift config, ImageType<T> imageType)
Creates a new instance ofSegmentMeanShift
which is in a wrapper forImageSuperpixels
.static <T extends ImageBase<T>>
ImageSuperpixels<T>slic(@Nullable ConfigSlic config, ImageType<T> imageType)
Creates a new instance ofSegmentSlic
which is in a wrapper forImageSuperpixels
.static <T extends ImageBase<T>>
ImageSuperpixels<T>watershed(@Nullable ConfigWatershed config, ImageType<T> imageType)
Creates an instance ofWatershedVincentSoille1991
.
-
Constructor Details
-
FactoryImageSegmentation
public FactoryImageSegmentation()
-
-
Method Details
-
meanShift
public static <T extends ImageBase<T>> ImageSuperpixels<T> meanShift(@Nullable @Nullable ConfigSegmentMeanShift config, ImageType<T> imageType)Creates a new instance ofSegmentMeanShift
which is in a wrapper forImageSuperpixels
.- Type Parameters:
T
- Image type- Parameters:
config
- Configuration. If null then defaults are used.imageType
- Type of input image.- Returns:
- new instance of
ImageSuperpixels
- See Also:
SegmentMeanShift
-
slic
public static <T extends ImageBase<T>> ImageSuperpixels<T> slic(@Nullable @Nullable ConfigSlic config, ImageType<T> imageType)Creates a new instance ofSegmentSlic
which is in a wrapper forImageSuperpixels
.- Type Parameters:
T
- Image type- Parameters:
config
- Configuration.imageType
- Type of input image.- Returns:
- new instance of
ImageSuperpixels
- See Also:
SegmentSlic
-
fh04
public static <T extends ImageBase<T>> ImageSuperpixels<T> fh04(@Nullable @Nullable ConfigFh04 config, ImageType<T> imageType)Creates a new instance ofSegmentFelzenszwalbHuttenlocher04
which is in a wrapper forImageSuperpixels
.- Type Parameters:
T
- Image type- Parameters:
config
- Configuration. If null defaults are used.imageType
- Type of input image.- Returns:
- new instance of
ImageSuperpixels
- See Also:
SegmentFelzenszwalbHuttenlocher04
-
watershed
public static <T extends ImageBase<T>> ImageSuperpixels<T> watershed(@Nullable @Nullable ConfigWatershed config, ImageType<T> imageType)Creates an instance ofWatershedVincentSoille1991
. Watershed works better when initial seeds are provided. In this adaptation of watershed toImageSuperpixels
only the more basic algorithm is used where each local minima is a region, which causes over segmentation. Watershed also only can process gray scale U8 images. All other image types are converted into that format.- Type Parameters:
T
- Image type- Parameters:
config
- Configuration. If null default is used.- Returns:
- new instance of
ImageSuperpixels
- See Also:
WatershedVincentSoille1991
-