IMED class
Algorithm class for comparing images with image euclidean distance
Images are resized to the same dimensions (if dimensions don't match) and are grayscaled. A gaussian blur is applied when calculating distance between pixel intensities. Spatial relationship is taken into account within the guassian function to reduce the effect of minor perturbations.
sum(exp(-distance(i
, j
) ^2 / 2 * pi * sigma^2) * (src1i
- src2i
) *
(src1j
- src2j
))
- Best with images of similar aspect ratios and dimensions
- Compare for ~exactness (if two images are roughly identical)
- Does not handle transparent pixels
- Returns percentage difference (0.0 - no difference, 1.0 - 100% difference)
- Inheritance
Properties
- blurRatio ↔ dynamic
-
Percentage of the smaller image's width representing a
component of the window (box) width used for the gaussian blur.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sigma ↔ dynamic
-
Width parameter of the guassian function
getter/setter pair
Methods
-
compare(
Image src1, Image src2) → double -
Computes distance between two images
using image euclidean 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