Class GHistogramFeatureOps

java.lang.Object
boofcv.alg.feature.color.GHistogramFeatureOps

public class GHistogramFeatureOps extends Object

Generic version of HistogramFeatureOps which determines image type at runtime. See

  • 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

      public static <T extends ImageGray<T>> void histogram(Planar<T> image, Histogram_F64 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

      public static void histogram(double[] colors, int length, Histogram_F64 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 format
      length - Length of usable portion of colors
      histogram - Output and histogram configuration.