Package boofcv.alg.segmentation.ms
Class SegmentMeanShiftSearchColor<T extends ImageMultiBand<T>>
java.lang.Object
boofcv.alg.segmentation.ms.SegmentMeanShiftSearch<T>
boofcv.alg.segmentation.ms.SegmentMeanShiftSearchColor<T>
- All Implemented Interfaces:
Stoppable
public class SegmentMeanShiftSearchColor<T extends ImageMultiBand<T>>
extends SegmentMeanShiftSearch<T>
Implementation of SegmentMeanShiftSearch
for color images
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ddogleg.struct.Stoppable
Stoppable.Stopped
-
Field Summary
Modifier and TypeFieldDescriptionprotected DogArray<Point2D_F32>
protected InterpolatePixelMB<T>
protected float[]
protected float[]
protected float[]
Fields inherited from class boofcv.alg.segmentation.ms.SegmentMeanShiftSearch
convergenceTol, image, maxColorDistanceSq, maxIterations, modeColor, modeLocation, modeMemberCount, modeX, modeY, pixelToMode, quickMode, radiusX, radiusY, spacialTable, stopRequested, weightTable, widthX, widthY
-
Constructor Summary
ConstructorDescriptionSegmentMeanShiftSearchColor
(int maxIterations, float convergenceTol, InterpolatePixelMB<T> interpolate, int radiusX, int radiusY, float maxColorDistance, boolean fast, ImageType<T> imageType) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
findPeak
(float cx, float cy, float[] meanColor) Uses mean-shift to find the peak.protected static void
meanColor
(float[] sum, float[] mean, float total) void
Performs mean-shift clustering on the input imageprotected void
savePeakColor
(float[] a) protected static void
sumColor
(float[] sum, float[] pixel, float weight) Methods inherited from class boofcv.alg.segmentation.ms.SegmentMeanShiftSearch
distanceSq, getModeColor, getModeLocation, getPixelToRegion, getRegionMemberCount, isStopRequested, requestStop, weight
-
Field Details
-
interpolate
-
pixelColor
protected float[] pixelColor -
meanColor
protected float[] meanColor -
sumColor
protected float[] sumColor -
history
-
-
Constructor Details
-
SegmentMeanShiftSearchColor
public SegmentMeanShiftSearchColor(int maxIterations, float convergenceTol, InterpolatePixelMB<T> interpolate, int radiusX, int radiusY, float maxColorDistance, boolean fast, ImageType<T> imageType)
-
-
Method Details
-
process
Performs mean-shift clustering on the input image- Specified by:
process
in classSegmentMeanShiftSearch<T extends ImageMultiBand<T>>
- Parameters:
image
- Input image
-
getImageType
- Specified by:
getImageType
in classSegmentMeanShiftSearch<T extends ImageMultiBand<T>>
-
findPeak
protected void findPeak(float cx, float cy, float[] meanColor) Uses mean-shift to find the peak. Returns the peak as an index in the image data array.- Parameters:
meanColor
- The color value which mean-shift is trying to find a region which minimises it
-
meanColor
protected static void meanColor(float[] sum, float[] mean, float total) -
sumColor
protected static void sumColor(float[] sum, float[] pixel, float weight) -
savePeakColor
protected void savePeakColor(float[] a)
-