Skip to main content

perceptual_hash

Function perceptual_hash 

Source
pub fn perceptual_hash(img: &DynamicImage) -> u64
Expand description

A 64-bit perceptual hash (pHash): the image is reduced to 32×32 grey, transformed with a 2-D DCT, and each of the 8×8 lowest frequencies becomes a bit, set when it is above their median (the DC term excluded from the median).