public class KMSpatialColourSegmenter extends KMColourSegmenter
colourSpace, kmeans, scaling
Constructor and Description |
---|
KMSpatialColourSegmenter(ColourSpace colourSpace,
float[] scaling,
int K,
FloatFVComparator distance)
Construct using the given colour space, number of segments, and distance
measure.
|
KMSpatialColourSegmenter(ColourSpace colourSpace,
float[] scaling,
int K,
FloatFVComparator distance,
int maxIters)
Construct using the given colour space, number of segments, and distance
measure.
|
KMSpatialColourSegmenter(ColourSpace colourSpace,
int K)
Construct using the given colour space and number of segments.
|
KMSpatialColourSegmenter(ColourSpace colourSpace,
int K,
FloatFVComparator distance)
Construct using the given colour space, number of segments, and distance
measure.
|
Modifier and Type | Method and Description |
---|---|
protected float[][] |
imageToVector(MBFImage image) |
segment
public KMSpatialColourSegmenter(ColourSpace colourSpace, int K)
colourSpace
- the colour spaceK
- the number of segmentspublic KMSpatialColourSegmenter(ColourSpace colourSpace, int K, FloatFVComparator distance)
colourSpace
- the colour spaceK
- the number of segmentsdistance
- the distance measurepublic KMSpatialColourSegmenter(ColourSpace colourSpace, float[] scaling, int K, FloatFVComparator distance)
colourSpace
- the colour spacescaling
- the scaling vectorK
- the number of segmentsdistance
- the distance measurepublic KMSpatialColourSegmenter(ColourSpace colourSpace, float[] scaling, int K, FloatFVComparator distance, int maxIters)
maxIters
times.colourSpace
- the colour spacescaling
- the scaling vectorK
- the number of segmentsdistance
- the distance measuremaxIters
- the maximum number of iterations to performprotected float[][] imageToVector(MBFImage image)
imageToVector
in class KMColourSegmenter