Enum img_hash::HashType[][src]

pub enum HashType {
    Mean,
    Block,
    Gradient,
    DoubleGradient,
    DCT,
    UserDCT(DCT2DFunc),
    // some variants omitted
}

An enum describing the hash algorithms that img_hash offers.

Variants

This algorithm first averages the pixels of the reduced-size and color image, and then compares each pixel to the average.

Fast, but inaccurate. Really only useful for finding duplicates.

The Blockhash.io algorithm.

Faster than Mean but also prone to more collisions and suitable only for finding duplicates.

This algorithm compares each pixel in a row to its neighbor and registers changes in gradients (e.g. edges and color boundaries).

More accurate than Mean but much faster than DCT.

A version of Gradient that adds an extra hash pass orthogonal to the first (i.e. on columns in addition to rows).

Slower than Gradient and produces a double-sized hash, but much more accurate.

This algorithm runs a Discrete Cosine Transform on the reduced-color and size image, then compares each datapoint in the transform to the average.

Slowest by far, but can detect changes in color gamut and sometimes relatively significant edits.

Call precompute_dct_matrix() with your chosen hash size to memoize the DCT matrix for the given size, which can produce significant speedups in repeated hash runs.

Equivalent to DCT, but allows the user to provide their own 2-dimensional DCT function. See the DCT2DFunc docs for more info.

Use this variant if you want a specialized or optimized 2D DCT implementation, such as from FFTW. (This cannot be the default implementation because of licensing conflicts.)

Trait Implementations

impl Clone for HashType
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for HashType
[src]

impl Debug for HashType
[src]

Formats the value using the given formatter. Read more

impl Hash for HashType
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl PartialEq for HashType
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for HashType
[src]

Auto Trait Implementations

impl Send for HashType

impl Sync for HashType