blockhash-0.1.0.0: Blockhash perceptual image hash algorithm

Copyright(c) Kwang Yul Seo 2016
LicenseBSD-style
MaintainerKwang Yul Seo <kwangyul.seo@gmail.com>
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

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.

Synopsis

Documentation

data Image Source #

Constructors

Image 

Instances

newtype Hash Source #

Constructors

Hash 

Fields

Instances

hammingDistance :: Hash -> Hash -> Int Source #

Calculate the hamming distance for two hashes in hex format

blockhash Source #

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

data Method Source #

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.