| Copyright | (c) Kwang Yul Seo 2016 |
|---|---|
| License | BSD-style |
| Maintainer | Kwang Yul Seo <kwangyul.seo@gmail.com> |
| Stability | experimental |
| Portability | portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Data.Blockhash
Description
Perceptual image hash calculation tool based on algorithm descibed in Block Mean Value Based Image Perceptual Hashing by Bian Yang, Fan Gu and Xiamu Niu.
Documentation
Constructors
| Image | |
Fields
| |
hammingDistance :: Hash -> Hash -> Int Source #
Calculate the hamming distance for two hashes in hex format
Arguments
| :: Image | RGBA image data |
| -> Int | The number of blocks to divide the image by horizontally and vertically |
| -> Method | Method |
| -> Hash | The result |
Calculate perceptual hash for an RGBA image
Constructors
| Precise | Precise method puts weighted pixel values to blocks according to pixel area falling within a given block and provides more accurate results in case width and height are not divisible by the number of bits. |
| Quick | Quick method uses rounded block sizes and is less accurate in case image width and height are not divisible by the number of bits. |