Image Fingerprinting System Using Perceptual Hash

Overview

Digital fingerprints are perceptual features of a multimedia object encoded in fixed size bits.

Perceptual Hash vs Cryptographic Hash

The system map an arbitrary length of information into a small and fixed size of bits. The resulting fingerprint then can be compared of similarity. 

Procedures of the system

Existing images are indexed into signature hash and store as a key in database. Query image hash can be retrieved using hamming distance search with multi-index hashing.

Fingerprinting Process

Process of fingerprint construction consists of the following stages:

An image is normalized by two step processes: downsampling and gray-scale transformation.

 

After the normalization, the DCT coefficient of the image is calculated to formulate a fingerprint block. The fingerprint block can be encoded into bits.

1.Downsampling

In order to reduce high frequency details of an image while preserving structural information of the image, the image is resize down to a 32 x 32 pixels lower resolution image 

2.Greyscale transformation

To transform the color based on RGB color model to a greyscale representation, the  luminance channel  of an image is calculated, which is given by

Y_{yx} = 0.2126R_{yx} + 0.7152G_{yx} + 0.0722B_{yx}
Yyx=0.2126Ryx+0.7152Gyx+0.0722ByxY_{yx} = 0.2126R_{yx} + 0.7152G_{yx} + 0.0722B_{yx}

3.Discrete Cosine Transform

The discrete cosine transform, abbreviated (DCT) represents an image as a sum of sinusoids of varying frequency and magnitudes. 

3.Discrete Cosine Transform

DCT Energy Compaction Property

Most of the visually significant information is concentrated in just a few lower coefficients of the DCT. For this reason, DCT is ideal to construct the digital fingerprint.

The property is also useful for image and audio lossy compression.

3.Discrete Cosine Transform

C_{u} = \begin{Bmatrix} \frac{1}{\sqrt{2}} & if \, u = 0\\ 1& otherwise \end{Bmatrix}
Cu={12ifu=01otherwise}C_{u} = \begin{Bmatrix} \frac{1}{\sqrt{2}} & if \, u = 0\\ 1& otherwise \end{Bmatrix}
C_{v} = similar\,\,to\,\,the\,\,above
Cv=similartotheaboveC_{v} = similar\,\,to\,\,the\,\,above
F_{vu} = \frac{1}{4}C_{v}C_{u}\sum_{y=0}^{N-1}\sum_{x=0}^{N-1}S_{yx}cos\begin{pmatrix} v\pi\frac{2y+1}{2N} \end{pmatrix}\begin{pmatrix} u\pi\frac{2x+1}{2N} \end{pmatrix}
Fvu=14CvCuy=0N1x=0N1Syxcos(vπ2y+12N)(uπ2x+12N)F_{vu} = \frac{1}{4}C_{v}C_{u}\sum_{y=0}^{N-1}\sum_{x=0}^{N-1}S_{yx}cos\begin{pmatrix} v\pi\frac{2y+1}{2N} \end{pmatrix}\begin{pmatrix} u\pi\frac{2x+1}{2N} \end{pmatrix}

4.Fingerprint Block Construction

B_{yx} = \begin{Bmatrix} 1 & if \, S_{yx} > threshold\\ 0 & otherwise \end{Bmatrix}
Byx={1ifSyx>threshold0otherwise}B_{yx} = \begin{Bmatrix} 1 & if \, S_{yx} > threshold\\ 0 & otherwise \end{Bmatrix}

Truncate the DCT coefficient to 8 x 8

Compute average of Alternate Coefficient

Apply Binary threshold using the average value

4.Fingerprint Block Construction

5.Fingerprint Matching

Images are considered as matched if the Hamming distance (Bit Errors) between the fingerprints is below a certain input threshold.

Experimental Results

Experimental Results

PHASH

By nxxcxx

PHASH

  • 393