MCPcopy Create free account

hub / github.com/abonander/img_hash / functions

Functions62 in github.com/abonander/img_hash

↓ 4 callersMethodas_slice
(&self)
src/traits.rs:41
↓ 3 callersFunctiongradient_hash
(luma: &'a [T], rowstride: usize)
src/alg/mod.rs:159
↓ 3 callersFunctionvert_gradient_hash
(luma: &'a [T], rowstride: usize)
src/alg/mod.rs:163
↓ 2 callersFunctionblock_adder
(blocks: &'a mut [T], width: u32)
src/alg/blockhash.rs:59
↓ 2 callersFunctionblockhash
(img: &I, width: u32, height: u32)
src/alg/blockhash.rs:14
↓ 2 callersMethodblur
(&self, sigma: f32)
src/traits.rs:158
↓ 2 callersFunctiondouble_gradient_hash
(luma: &'a [T], rowstride: usize)
src/alg/mod.rs:168
↓ 2 callersMethodforeach_pixel8
(&self, mut foreach: F)
src/traits.rs:160
↓ 2 callersFunctionnext_multiple_of_2
(x: u32)
src/alg/mod.rs:83
↓ 2 callersFunctionnext_multiple_of_4
(x: u32)
src/alg/mod.rs:84
↓ 2 callersMethodresize_dimensions
(&self, width: u32, height: u32)
src/alg/mod.rs:131
↓ 2 callersFunctionsum_px
(chans: &[u8])
src/alg/blockhash.rs:139
↓ 1 callersMethodas_bytes
Get the bytes of this hash.
src/lib.rs:423
↓ 1 callersFunctionblockhash_fast
(img: &I, hwidth: u32, hheight: u32)
src/alg/blockhash.rs:118
↓ 1 callersFunctionblockhash_slow
(img: &I, hwidth: u32, hheight: u32)
src/alg/blockhash.rs:63
↓ 1 callersMethodcalc_hash_vals
If DCT preprocessing is configured, produce a vector of floats, otherwise a vector of bytes.
src/lib.rs:373
↓ 1 callersMethodcrop_2d
(&self, packed: Vec<f32>)
src/dct.rs:73
↓ 1 callersFunctioncrop_2d_dct
Crop the values off a 1D-packed 2D DCT. Returns `packed` truncated to the premultiplied size, as determined by `rowstride` Generic for easier testin
src/dct.rs:83
↓ 1 callersMethoddct_2d
Perform a 2D DCT on a 1D-packed vector with a given `width x height`. Assumes `packed_2d` is double-length for scratch space. Returns the vector trun
src/dct.rs:45
↓ 1 callersFunctiondebug_filter_type
(ft: &FilterType)
src/lib.rs:487
↓ 1 callersMethoddiff_inplace
(&mut self, other: &Self)
src/traits.rs:182
↓ 1 callersMethodgauss_preproc
If Difference of Gaussians preprocessing is configured, produce a new image with it applied.
src/lib.rs:360
↓ 1 callersMethodhash_image
(&self, ctxt: &HashCtxt, image: &I)
src/alg/mod.rs:87
↓ 1 callersMethodhash_size
Set a new hash width and height; these can be the same. The number of bits in the resulting hash will be `width * height`. If you are using a fixed-s
src/lib.rs:184
↓ 1 callersMethodheight
(&self)
src/dct.rs:34
↓ 1 callersFunctionmean_hash_f32
(luma: &'a [f32])
src/alg/mod.rs:148
↓ 1 callersFunctionmean_hash_u8
(luma: &'a [u8])
src/alg/mod.rs:143
↓ 1 callersFunctionmedian_of_3
(mut x: T, mut y: T, mut z: T)
src/alg/blockhash.rs:206
↓ 1 callersFunctionpartition
(data: &mut [T])
src/alg/blockhash.rs:179
↓ 1 callersMethodpreproc_diff_gauss_sigmas
Enable preprocessing with the Difference of Gaussians algorithm with the given sigma values. Recommended only for use with [the Blockhash.io algorith
src/lib.rs:261
↓ 1 callersFunctionqselect_inplace
(data: &mut [T], k: usize)
src/alg/blockhash.rs:158
↓ 1 callersMethodround_hash_size
(&self, width: u32, height: u32)
src/alg/mod.rs:123
↓ 1 callersMethodto_grayscale
(&self)
src/lib.rs:336
↓ 1 callersMethodto_hasher
Create a [`Hasher`](struct.Hasher.html) from this config which can be used to hash images. ### Panics If the chosen hash size (`width x height`, roun
src/lib.rs:270
↓ 1 callersMethodwidth
(&self)
src/dct.rs:30
Functionbench_functions
(c: &mut Criterion)
benches/byte_to_float.rs:19
Methoddist
Calculate the Hamming distance between this and `other`. Equivalent to counting the 1-bits of the XOR of the two hashes. Essential to determining th
src/lib.rs:452
Methodfmt
(&self, f: &mut fmt::Formatter)
src/lib.rs:301
Methodfrom_base64
Create an `ImageHash` instance from the given Base64-encoded string. ## Errors: Returns `InvaidBytesError::Base64(DecodeError::InvalidLength)` if the
src/lib.rs:461
Methodfrom_bools
(iter: I)
src/traits.rs:106
Methodfrom_bytes
Create an `ImageHash` instance from the given bytes. ## Errors: Returns a `InvalidBytesError::BytesWrongLength` error if the slice passed can't fit i
src/lib.rs:429
Methodfrom_iter
(iter: I)
src/traits.rs:31
Functionget_median
(data: &[T])
src/alg/blockhash.rs:150
Functiongradient_hash_impl
The guts of the gradient hash separated so we can reuse them
src/alg/mod.rs:154
Methodhamming
(&self, other: &Self)
src/traits.rs:110
Methodhash_alg
Set the algorithm used to generate hashes. Each algorithm has different performance characteristics.
src/lib.rs:199
Methodhash_image
Calculate a hash for the given image with the configured options.
src/lib.rs:324
Functionmain
()
src/bin/hash_image.rs:10
Methodmax_bits
()
src/traits.rs:37
Methodnew
(width: u32, height: u32)
src/dct.rs:17
Methodnew
Construct a new hasher config with sane, reasonably fast defaults. A default hash container type is provided as a default type parameter which is gua
src/lib.rs:139
Methodnext
(&mut self)
src/traits.rs:88
Methodpreproc_dct
Enable preprocessing with the Discrete Cosine Transform (DCT). Does nothing when used with [the Blockhash.io algorithm](HashAlg::Blockhash) which doe
src/lib.rs:233
Methodpreproc_diff_gauss
Enable preprocessing with the Difference of Gaussians algorithm with default sigma values. Recommended only for use with [the Blockhash.io algorithm]
src/lib.rs:243
Methodresize_filter
Set the filter used to resize images during hashing. Note when picking a filter that images are almost always reduced in size. Has no effect with the
src/lib.rs:192
Methodsize_hint
(&self)
src/traits.rs:95
Functiontest_bools_to_bytes
()
src/traits.rs:212
Functiontest_crop_2d_dct
()
src/dct.rs:105
Functiontest_transpose
()
src/dct.rs:120
Methodto_base64
Get a Base64 string representing the bits of this hash. Mostly for printing convenience.
src/lib.rs:470
Methodto_grayscale
(&self)
src/traits.rs:154
Methodwith_bytes_type
Construct a new config with the selected [`HashBytes`](trait.HashBytes.html) impl. You may opt for an array type which allows inline allocation of ha
src/lib.rs:150