Package boofcv.alg.feature.color
Class GHistogramFeatureOps
java.lang.Object
boofcv.alg.feature.color.GHistogramFeatureOps
Generic version of HistogramFeatureOps
which determines image type at runtime.
See
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
histogram
(double[] colors, int length, Histogram_F64 histogram) Computes a coupled histogram from a list of colors.static <T extends ImageGray<T>>
voidhistogram
(Planar<T> image, Histogram_F64 histogram) Computes a joint histogram for a planar image.static <T extends ImageGray<T>>
voidhistogram
(T image, double minPixelValue, double maxPixelValue, TupleDesc_F64 histogram) Computes a single-band normalized histogram for any single band image.
-
Constructor Details
-
GHistogramFeatureOps
public GHistogramFeatureOps()
-
-
Method Details
-
histogram
public static <T extends ImageGray<T>> void histogram(T image, double minPixelValue, double maxPixelValue, TupleDesc_F64 histogram) Computes a single-band normalized histogram for any single band image.- Parameters:
image
- Input image. Not modified.minPixelValue
- Minimum possible value for a pixel.maxPixelValue
- Maximum possible value for a pixel.histogram
- The output histogram.
-
histogram
Computes a joint histogram for a planar image. Since it's a joint distribution the histogram can become huge (and too sparse) if bin sizes are used that are too big. Also consider computing the histogram independently in each band.- Parameters:
image
- Input image. Not modified.histogram
- Output for the histogram. Must be correctly configured first.
-
histogram
Computes a coupled histogram from a list of colors. If the input is for integer values then add one to the maximum value. For example if the range of values is 0 to 255, then make it 0 to 256.- Parameters:
colors
- List of colors stored in an interleaved formatlength
- Length of usable portion of colorshistogram
- Output and histogram configuration.
-