pub struct NormalizedTolerance { /* private fields */ }
Expand description

Tolerance to be applied when searching for duplicates.

Formed of independent tolerances in the spatial domain (allowable difference in the shapes of each frame) and in the temporal domain (allowable differences in movement between frames)

Spatial and temporal tolerances are specified as floating point numbers in the inclusive range (0..1). The higher the number, the more two hashes may differ before they are no longer considered a match. A tolerance of 0 implies two videos will only match if the raw bits of their respective hashes are identical. A tolerance of 1 implies two videos will always match no matter the value of their hashes.

Depending on requirements, useful tolerances appear to be in the range (0.0..0.15).

Implementations

Create a new Tolerance from spatial and temporal values.

Arguments
  • spatial: Spatial tolerance in the inclusive range (0..1)
  • temporal: Temporal tolerance in the inclusive range (0..1)

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

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

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().

Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().

Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.