Documentation of 'boofcv.examples.recognition.ExampleColorHistogramLookup' Java class
ExampleColorHistogramLookup
boofcv.examples.recognition

Class ExampleColorHistogramLookup



  • public class ExampleColorHistogramLookup
    extends java.lang.Object
    Demonstration of how to find similar images using color histograms. Image color histograms here are treated as features and extracted using a more flexible algorithm than when they are used for image processing. It's more flexible in that the bin size can be varied and n-dimensions are supported. In this example, histograms for about 150 images are generated. A target image is selected and the 10 most similar images, according to Euclidean distance of the histograms, are found. This illustrates several concepts; 1) How to construct a histogram in 1D, 2D, 3D, ..etc, 2) Histograms are just feature descriptors. 3) Advantages of different color spaces. Euclidean distance is used here since that's what the nearest-neighbor search uses. It's possible to compare two histograms using any of the distance metrics in DescriptorDistance too.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static java.util.List<double[]> coupledHueSat(java.util.List<java.io.File> images)
      HSV stores color information in Hue and Saturation while intensity is in Value.
      static java.util.List<double[]> coupledRGB(java.util.List<java.io.File> images)
      Constructs a 3D histogram using RGB.
      static java.util.List<double[]> histogramGray(java.util.List<java.io.File> images)
      Computes a histogram from the gray scale intensity image alone.
      static java.util.List<double[]> independentHueSat(java.util.List<java.io.File> images)
      Computes two independent 1D histograms from hue and saturation.
      static void main(java.lang.String[] args) 
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ExampleColorHistogramLookup

        public ExampleColorHistogramLookup()
    • Method Detail

      • coupledHueSat

        public static java.util.List<double[]> coupledHueSat(java.util.List<java.io.File> images)
        HSV stores color information in Hue and Saturation while intensity is in Value. This computes a 2D histogram from hue and saturation only, which makes it lighting independent.
      • independentHueSat

        public static java.util.List<double[]> independentHueSat(java.util.List<java.io.File> images)
        Computes two independent 1D histograms from hue and saturation. Less affects by sparsity, but can produce worse results since the basic assumption that hue and saturation are decoupled is most of the time false.
      • coupledRGB

        public static java.util.List<double[]> coupledRGB(java.util.List<java.io.File> images)
        Constructs a 3D histogram using RGB. RGB is a popular color space, but the resulting histogram will depend on lighting conditions and might not produce the accurate results.
      • histogramGray

        public static java.util.List<double[]> histogramGray(java.util.List<java.io.File> images)
        Computes a histogram from the gray scale intensity image alone. Probably the least effective at looking up similar images.
      • main

        public static void main(java.lang.String[] args)

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.