Skip to main content

Table 2 Proposed image hashing in details (From input image to generation of final hash)

From: Robust image hashing using ring partition-PGNMF and local features

 

Input: Image

1.

Pre-processing: The input image (I) is rescaled to a fixed size n × n by bilinear interpolation, and changed from the RGB to the YCbCr representation. The Y and \(\left| {{\text{Cb}} - {\text{Cr}}} \right|\), known as luminance and chrominance constituents of the image which may be used to create the hash. However, we have selected n = 256 and Y channel only for this study

2.

Global features extraction using ring partition-PGNMF

 

a.

Let us consider the Y component of the pre-processedimage;

 

b.

Divide Y into m rings and produce a secondary image \({\mathbf{L}}\) by using Eqs. (5–14)

 

c.

Apply PGNMF to L, and obtain the coefficient matrix \({\mathbf{H}}\)

 

d.

Concatenate the matrix coefficients to give the hash of length \({\mathbf{Q^{\prime}}} = nk\) by global feature

 

e.

A secret key K1 randomly generates a row vector \({\mathbf{X}}_{1}\). The first intermediate hash\(\left( {\mathbf{Q}} \right)\) is formulated as \({\mathbf{Q}} = \left[ {\left( {{\mathbf{Q^{\prime}}} + {\mathbf{X}}_{1} } \right) {\text{mod }}256} \right]\)

3.

Extraction of local features

 

a.

Detect C numbers of largest salient regions from pre-processed image Y

 

b.

The C numbers of position vectors of four dimensions are formed using the coordinates of the top left corner, and width/height of each rectangle around the salient regions. It is denoted by position vector \({\mathbf{f}}^{k} \left( {k = 1, 2, \ldots , C} \right)\)

 

c.

The texture features are computed for C number of salient regions. Fig. 6 shows that 96% of the images have less than 6 salient regions. We have used 2900 images to test the number of salient regions as shown in Fig. 6. Only a few of the images have more than 6 salient regions. There is a trade-off between the hash length and number of salient regions. When the value of C is large, fewer salient regions will be left out but will produce a longer image hash. We have taken C = 6, empirically as an optimal trade-off between hash length and the salient maps that will be left out. For every salient region, local texture features, that include coarseness (δ 1), contrast (δ 2) and kurtosis (δ 3) are computed and rounded to form C element texture vectors \({\mathbf{z}}^{k} \left( {k = 1, 2, \ldots , C} \right)\) of three dimensions

 

d.

The position vector \(\left( {\mathbf{F}} \right)\) is concatenated with the texture vector \(\left( {\mathbf{Z}} \right)\) to give local feature vector \({\mathbf{B^{\prime}}} = \left[ {{\mathbf{F}} {\mathbf{Z}}} \right] = \left[ {{\mathbf{f}}^{1} \ldots {\mathbf{f}}^{C} {\mathbf{z}}^{1} \ldots {\mathbf{z}}^{C} } \right]\). For an image having lesser than 6 salient regions, the position and texture features are set to zero for the missing ones

 

e.

A secret key K2 randomly generates a row vector \({\mathbf{X}}_{2}\). The second intermediate hash \(\left( {\mathbf{B}} \right)\) is formulated as \({\mathbf{B}} = \left[ {\left( {{\mathbf{B^{\prime}}} + {\mathbf{X}}_{2} } \right) {\text{mod }}256} \right]\)

4.

Finally, the two intermediate hash vectors are concatenated and pseudo-randomly scrambled on the basis of secret key K3 to obtain the final hash \(\left( {\mathbf{M}} \right)\)

 

Output: Final Hash