ChiSquareDistanceHistogram class

Algorithm class for comparing images with chi-square histogram intersections

Images are converted to histogram representations (x-axis intensity, y-axis frequency). The chi-square distance formula is applied to compute the distance between each bin:

0.5* sum((binCount1 - binCount2)^2 / (binCount1 + binCount2))

Number of histograms bins is 256. Three histograms represent RGB distributions.

  • Works well with images of all aspect ratios and dimensions
  • Compare for similarity (if two images are similar based on their color distribution)
  • Returns percentage difference (0.0 - no difference, 1.0 - 100% difference)
Inheritance

Constructors

ChiSquareDistanceHistogram({bool ignoreAlpha = false})

Properties

hashCode int
The hash code for this object.
no setterinherited
ignoreAlpha ↔ dynamic
Ignores alpha channel when computing difference
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

compare(Image src1, Image src2) double
Calculates histogram similarity using chi-squared distance
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited