IntersectionHistogram class
Algorithm class for comparing images with standard histogram intersection.
Images are converted to histogram representations (x-axis intensity, y-axis frequency). Generated histograms are overlayed to examine percentage overlap, thereby indicating percentage similarity in pixel intensity frequencies:
sum(min(binCount1, binCount2))
Number of histograms bins is 256. Three histograms represent RGB distributions.
- Works well with images of any aspect ratio and dimension
- Images can be rotated
- Compare for similarity (if two images are similar based on their color distribution)
- Returns percentage diffence (0.0 - no difference, 1.0 - 100% difference)
- Inheritance
-
- Object
- Algorithm
- HistogramAlgorithm
- IntersectionHistogram
Constructors
- IntersectionHistogram({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 standard intersection
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