EuclideanColorDistance class
Algorithm class for comparing images with euclidean distance.
Images are resized to the same dimensions (if dimensions don't match)
and euclidean difference between src1
RGB values and src2
RGB values
for each pixel is summed.
sum(sqrt(([src1i
.red - [src2i
.red)^2 + ([src1i
.blue - [src2i
.blue)^2 +
([src1i
.green - [src2i
.green)^2)
- Best with images of similar aspect ratios and dimensions
- Compare for exactness (if two images are identical)
- Returns percentage difference (0.0 - no difference, 1.0 - 100% difference)
- Inheritance
-
- Object
- Algorithm
- DirectAlgorithm
- EuclideanColorDistance
Constructors
- EuclideanColorDistance({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 -
Computes euclidean color distance between two images
of the same size
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