7
1 Detection of Structural Tampering in a Digital Image Using Canny Edge Detector Vinod Mall, Member, IEEE, Anil K. Roy, Senior Member, IEEE, Suman K. Mitra, Senior Member, IEEE, and Shivanshu Shukla, Member, IEEE Abstract—The verification of authenticity of digital images has become a challenging problem due to easy availability of image editing software which can also be used to tamper the images. Content based digital signature is being used by researchers for detecting malicious tampering operations. In the proposed scheme, Canny Edge Detector has been used to extract the feature vectors of the image through edge detection. This information is then used to generate a hash vector for tampering detection and localization. The suitable mathematical index has been developed to quantify the amount of tampering using the hash generated from digital content of the image. Index Terms—Image Tampering, Canny Edge Detector, Hash function, Gaussian filter, Digital Watermarking, Image com- pression, Content preserving manipulation, Tampering detection, Tampering localization, Similarity value, cryptographic digital signature. I. I NTRODUCTION T HE volume of digital images has increased manifold in the recent time and so has the availability of image processing and editing software such as Photoshop, Adobe etc. Omni pervasive presence of internet has caused huge amount of images to flow all over. Free availability of image editing software allows the users to make the changes in the image rather easily. In many situations, the change in the image may be done with completely bona fide purposes. However, there are situations where tampering in the image may be done with criminal or mala fide intention. This poses serious problems if the image is to be used as evidence in the court of low. Tampering done through copy and move operation may be used to defame people. This can also be used for arousing communal and ethnic feelings by putting derogatory forged images on social networking sites. Therefore, it becomes a challenge to develop efficient detection tools which can meet the ever growing problem of image tampering. So far, no single method had been developed which can detect all kinds of tampering operations due to the fact that these operations are carried out through very diverse methods such as cut and paste forgery, stretching and rotation operations, contrast enhancement through gamma correction, JPEG compression to cover up touched areas in the image etc. Each type of tampering requires a specific method to detect it efficiently. Therefore, it is essential that large number All authors are affiliated with Dhirubhai Ambani Institute of Information and Communication Technology, Gandhinagar, Gujarat 382007, India. Corre- sponding author: Anil K. Roy, e-mail: anil [email protected]. of such methods are developed which combined together, can detect all possible tampering operations. In some earlier work, cryptographic digital signatures were used to check the integrity of the image. However, any alteration even of the size of few bits may badly jeopardize the capacity of the signature. This drawback puts serious limitation on the use of this technique. In other methods which use content based hash generation, change in hash signature may happen because of harmless manipulations such as low pass filtering and JPEG compression which do not amount to malicious tampering and should be ignored. Therefore, robustness against harmless manipulations is a prerequisite and this will remain an important consideration in designing an efficient algorithm. Various techniques used for tampering detection can be classified under two categories namely (a) watermark based techniques [1], [2], [3], [4], [5] and (b) hash generation based techniques [6], [7], [8]. Watermarking technique uses embedding an imperceptible code into the image to generate watermarked image. The extracted watermark by the receiver is used to authenticate the image. Hash generation techniques extract features of the image and generate a hash value from these features. The generated hash is sent as header either along with the image or separately. For efficient detection, hash functions should have following properties: 1) Sensitivity: The detection algorithm should be sensitive which means that it should be able to detect even very minute tampering operations. 2) Robustness: The hash generation should be able to ignore content preserving manipulations such as JPEG compression, contrast enhancement and blurring etc. 3) Extremely low collision probability: Each generated hash should correspond to exactly one image. Ideally speaking, no two images should correspond to single hash value. Similarly no two hash values should cor- respond to single image. It means that the collision probability of hash generation should be extremely low. 4) Compact size: Hash should have maximum content information of the image but should not be too long to handle from memory and processing time consideration. II. REVIEW OF EXISTING METHODS Lot of work have been done by various researchers using hash generation techniques. Content based hash generation 978-1-4799-0400-6/13/$31.00 ©2013 IEEE

[IEEE 2013 2nd International Conference on Informatics, Electronics and Vision (ICIEV) - Dhaka, Bangladesh (2013.05.17-2013.05.18)] 2013 International Conference on Informatics, Electronics

Embed Size (px)

Citation preview

Page 1: [IEEE 2013 2nd International Conference on Informatics, Electronics and Vision (ICIEV) - Dhaka, Bangladesh (2013.05.17-2013.05.18)] 2013 International Conference on Informatics, Electronics

1

Detection of Structural Tampering in a DigitalImage Using Canny Edge Detector

Vinod Mall, Member, IEEE, Anil K. Roy, Senior Member, IEEE, Suman K. Mitra, Senior Member, IEEE, andShivanshu Shukla, Member, IEEE

Abstract—The verification of authenticity of digital images hasbecome a challenging problem due to easy availability of imageediting software which can also be used to tamper the images.Content based digital signature is being used by researchersfor detecting malicious tampering operations. In the proposedscheme, Canny Edge Detector has been used to extract the featurevectors of the image through edge detection. This information isthen used to generate a hash vector for tampering detection andlocalization. The suitable mathematical index has been developedto quantify the amount of tampering using the hash generatedfrom digital content of the image.

Index Terms—Image Tampering, Canny Edge Detector, Hashfunction, Gaussian filter, Digital Watermarking, Image com-pression, Content preserving manipulation, Tampering detection,Tampering localization, Similarity value, cryptographic digitalsignature.

I. INTRODUCTION

THE volume of digital images has increased manifoldin the recent time and so has the availability of image

processing and editing software such as Photoshop, Adobeetc. Omni pervasive presence of internet has caused hugeamount of images to flow all over. Free availability of imageediting software allows the users to make the changes inthe image rather easily. In many situations, the change inthe image may be done with completely bona fide purposes.However, there are situations where tampering in the imagemay be done with criminal or mala fide intention. This posesserious problems if the image is to be used as evidencein the court of low. Tampering done through copy andmove operation may be used to defame people. This canalso be used for arousing communal and ethnic feelingsby putting derogatory forged images on social networkingsites. Therefore, it becomes a challenge to develop efficientdetection tools which can meet the ever growing problem ofimage tampering.

So far, no single method had been developed which candetect all kinds of tampering operations due to the factthat these operations are carried out through very diversemethods such as cut and paste forgery, stretching and rotationoperations, contrast enhancement through gamma correction,JPEG compression to cover up touched areas in the imageetc. Each type of tampering requires a specific method todetect it efficiently. Therefore, it is essential that large number

All authors are affiliated with Dhirubhai Ambani Institute of Informationand Communication Technology, Gandhinagar, Gujarat 382007, India. Corre-sponding author: Anil K. Roy, e-mail: anil [email protected].

of such methods are developed which combined together, candetect all possible tampering operations.

In some earlier work, cryptographic digital signatureswere used to check the integrity of the image. However, anyalteration even of the size of few bits may badly jeopardizethe capacity of the signature. This drawback puts seriouslimitation on the use of this technique. In other methodswhich use content based hash generation, change in hashsignature may happen because of harmless manipulationssuch as low pass filtering and JPEG compression which donot amount to malicious tampering and should be ignored.Therefore, robustness against harmless manipulations is aprerequisite and this will remain an important considerationin designing an efficient algorithm.

Various techniques used for tampering detection can beclassified under two categories namely (a) watermark basedtechniques [1], [2], [3], [4], [5] and (b) hash generationbased techniques [6], [7], [8]. Watermarking technique usesembedding an imperceptible code into the image to generatewatermarked image. The extracted watermark by the receiveris used to authenticate the image. Hash generation techniquesextract features of the image and generate a hash value fromthese features. The generated hash is sent as header eitheralong with the image or separately. For efficient detection,hash functions should have following properties:

1) Sensitivity: The detection algorithm should be sensitivewhich means that it should be able to detect even veryminute tampering operations.

2) Robustness: The hash generation should be able toignore content preserving manipulations such as JPEGcompression, contrast enhancement and blurring etc.

3) Extremely low collision probability: Each generatedhash should correspond to exactly one image. Ideallyspeaking, no two images should correspond to singlehash value. Similarly no two hash values should cor-respond to single image. It means that the collisionprobability of hash generation should be extremely low.

4) Compact size: Hash should have maximum contentinformation of the image but should not be too long tohandle from memory and processing time consideration.

II. REVIEW OF EXISTING METHODS

Lot of work have been done by various researchers usinghash generation techniques. Content based hash generation

978-1-4799-0400-6/13/$31.00 ©2013 IEEE

Page 2: [IEEE 2013 2nd International Conference on Informatics, Electronics and Vision (ICIEV) - Dhaka, Bangladesh (2013.05.17-2013.05.18)] 2013 International Conference on Informatics, Electronics

2

is gaining popularity. Different techniques employing thisconcept have come out with varying degree of success interms of sensitivity, robustness and collision probability. Imageauthentication was approached by using intensity histogrammethod [9]. The fact that the blocks in an image can bechanged while keeping the histogram intact, puts a limitationson the capability of this method. Encryption of the histogrambecomes another major issue in the context of its security.An interesting algorithm was proposed [6] to address thetampering detection and collision probability issues. However,it does not address the tampering detection and localizationaccuracy for varying size of tampering area. An alternativemethod, Approximate Image Message Authentication Code, togenerate a hash was proposed recently [10]. However, issueof collision probability was not addressed satisfactorily. Inanother work feature points of an image were used to generatedigital signatures depending on public kep encryption [11].Feature detection in this method is based on the so calledScale Interaction Model. What followed was a proposal ofa public key based fault resilient and compression resistanthash method [12]. However, none of these methods triedto develop an index to quantify the amount of tamperingin the image. Another method constructed structural digitalsignature from image content in wavelet transform domain andused it for image authentication [13]. It addressed the issueof hash security comprehensively. Robust digital signaturewas also reported to be generated by Radon Transform andprinciple component analysis [14]. In a very different approacha non-negative matrix factorization was used to define ahash function which addressed the issue of robustness andsensitivity [15] elaborately.

III. DETECTION OF STRUCTURAL TAMPERING USINGCANNY EDGE DETECTOR

The structural information in an image is contained in theedges existing in it. Any alteration, removal or insertion of anedge amounts to structural tampering in the image. This canbe affected through bringing part of a different image intothe original one or by removing the part of original imageor sometimes removing a part followed by inserting segmentof a different image. Proposed method aims that generatinga hash value corresponding to the edge content of the image.As the structural information of the image is representedby the luminance value of the pixels, only Y component ofY CrCb scheme will be used to determine the edges and findhash value consequently.

For this purpose, the image will be divided into a number ofblocks. Size of the blocks will be decided by required accuracyof tampering detection and localization. Canny Edge Detectorwill be used to detect the edges in the image [16]. A suitablehash function will be used to generate a hash value dependingon the edge information in the block.

A. Canny Edge Detector

Canny Edge Detector is used to obtain an efficient rep-resentation of the image by locating the edges in it. This

representation is highly appropriate as we are interested in thestructural information which is very adequately representedthrough edges. It helps in reducing the amount of data inthe image without compromising the structural properties inthe hash representation. The detector should have followingproperties:

1) Detection: The edge detector should be able to detectall edge points while minimizing the probability ofdetecting non-edges.

2) Localization: The detected edges should match with thelocation of real edges in the image

3) Uniqueness of response: There should be exactly onedetected edge corresponding to every edge existing inthe image.

The first step in Canny Edge Detection algorithm isSmoothening. In this step, the image is smoothened by usinga Gaussian filter. This is done in order to remove the noisein the image, such as camera noise which can be mistakenfor edge or edges. This is followed by finding the gradientof the edge which measures the sudden gray scale intensitychange. Sobel Operator is used to determine the gradient ateach pixel location. The gradients in X and Y direction, Gx

and Gy respectively are found using following operators:

KGX =

−1 0 1−2 0 2−1 0 1

,

and

KGY =

1 2 10 0 0−1 −2 −1

.

The resultant edge strength G is given by G =√Gx

2 +Gy2. Direction of the edge is given by the angle

Θ = arctan

[|Gy||Gx|

], (1)

After finding out the magnitude and gradient of the edges,Non-maximum Suppression is carried out to convert theblurred edges in the image to sharp edges. This is achievedby preserving all local maxima and deleting the rest. Theoutput of non-maximum suppression is the edges representedby pixel strength at each pixel. Many of these edges maybe true edges and some may be due to noise. To rejectthese noisy edges, a thresholding mechanism is applied.Canny Edge Detector uses double thresholding to make surethat only the edge pixels stronger than upper threshold arecategorized as strong edges. Edge pixel value lesser thanlower threshold are categorized as weak and hence rejectedstraight away. Hysteresis method of edge tracking is used totrack semi-weak edges whose pixel values lie between upperand lower thresholds. It detects semi-weak edges which areconnected with strong edges and are retained. The semi-weakedges which are not connected with strong edges are rejected.

The proposed technique uses the output of Canny EdgeDetector to generate a hash value for each block in the image.

978-1-4799-0400-6/13/$31.00 ©2013 IEEE

Page 3: [IEEE 2013 2nd International Conference on Informatics, Electronics and Vision (ICIEV) - Dhaka, Bangladesh (2013.05.17-2013.05.18)] 2013 International Conference on Informatics, Electronics

3

The output which is in the form of 1s and 0s is summed upand divided by total numbers of pixels in the block to assigna hash value to the particular block. This index will be calledAverage Edge Index of the block and is denoted by e. Asmentioned above, e is defined as

eij =

∑l=q,m=ql=1,m=1Xlm

q2, (2)

where Xlm is random variable representing values of (l,m)th

pixel of Canny Edge Detector output. Value eij representshash values of (i, j)th block of size q × q. Such eijs whencalculated for all the blocks in the image and arrangedaccording to their position in the image, constitute a hashmatrix. This hash matrix is then used for tampering detectionand localization. All the rows of the matrix when puttogether in form of a single row, they constitute hash vectorfor that image. The hash vector representation is a veryappropriate mathematical entity to find out a quantitativemeasure of the tampering. Hash vector, thus generated isconverted into a binary string and can be sent as a header tothe person who needs to check the integrity of received image.

After the hash matrices for original and tampered imageshave been calculated, they are compared using a distancefunction D to find out whether tampering has taken placeor not and if so, what is the amount of tampering. If thedistance function measure is zero then, the image is originalone or equivalently, no tampering has been done. If valueof D is non-zero but very small then tampering belongs tocategory of harmless manipulation. Sufficiently large value ofD corresponds to malicious tampering. Any efficient detectiontechnique should be able to distinguish between harmlessand malicious tampering clearly. If there is sufficient gapbetween D values corresponding to harmless and maliciousmanipulation, a threshold can be decided to categorize theimages accordingly [17].

IV. ROBUSTNESS AGAINST CONTENT PRESERVINGMANIPULATION

The proposed hash generation technique based on computa-tion of Average Edge Index method should be sensitive to veryminute structural tampering. It should also be able to ignoreharmless manipulation such as contrast enhancement, lowpass filtering, brightness improvement etc. It will be shownthat the proposed method is actually robust against some ofthe content preserving manipulations as well as sensitive tovery minute tampering operations. In an earlier work [17], itwas shown that proposed method based on hash generationtechnique using computation of correlation coefficients wasrobust against harmless operations such as blurring. Here, itwill be shown that the proposed technique is robust againstchange in brightness level and low pass filtering operation.

V. SELECTION OF THRESHOLD VALUE OF D

Let IO, IH and IT be original, harmlessly manipulatedand tampered images respectively. If we describe the hashmatrices of these images as HM(IO), HM(IH) and HM(IT )

respectively then following conditions should be satisfied forrobust and sensitive detection respectively.

D[HM(IH), HM(IO)] < DC1, (3)

andD[HM(IT ), HM(IO)] > DC2, (4)

where DC1 is the highest possible distance between originaland harmlessly manipulated image and DC2 is the lowestpossible distance between original and tampered image. IfDC1 and DC2 are sufficiently separated then a threshold DT

can be decided which will discriminate between IO, IH and ITefficiently with extremely low-false alarms. Thus the combinedcondition becomes,

D[HM(IH), HM(IO)] << DC1 < DT (5)

andDT < DC2 << D[HM(IT ), HM(IO)]. (6)

VI. TAMPERING DETECTION USING CANNY EDGEDETECTOR

Y component of Y CrCb representation of an image is usedfor experiments as only Y contains the structural information.For the time being, square images of pixel size L×L will bediscussed. The proposed method comprises of following steps:

1) The image under consideration is divided into a numberof blocks. The block size is so chosen that L is integralmultiple of side of the block.

2) Edges in each block are detected using Canny EdgeDetector giving 1s where the edge exists and 0s whereit does not.

3) Average Edge Index of the block is calculated by sum-ming all the 1s present and dividing it by total numberof pixels in the block. This index forms the hash valuefor the block under consideration.

4) Hash values for different blocks are then arranged attheir respective locations to give hash matrix for theimage.

5) The above process is done for original as well as thetampered image.

6) The absolute difference of hash matrices correspondingto original and tampered images is computed whichgives tampering area.

Essentially what we have proposed in this paper can beillustrated in the following figure 1.

The size of sampling block is equal to the size of theblock in which we wish to divide the image. In the presentcase, sampling size was taken to be 50 × 50. As mentionedabove, a single hash value (average edge index) is assignedto a block, any tampering of size lesser than 50× 50 will beshown over full block size. This is not a problem if we wantto detect the existence of tampering only and where accuracyin localization of tampered area is not a concern. But if thetampering area is less than 50 × 50 and we want to locateit more accurately then the sampling block size should bereduced accordingly.

978-1-4799-0400-6/13/$31.00 ©2013 IEEE

Page 4: [IEEE 2013 2nd International Conference on Informatics, Electronics and Vision (ICIEV) - Dhaka, Bangladesh (2013.05.17-2013.05.18)] 2013 International Conference on Informatics, Electronics

4

Fig. 1. This flow chart shows the sequence of steps that are taken to findour similarity value of two images, one of which is essentially the originalimage.

Mathematical analysis was done by finding average edgeindex of original and tampered images denoted by eo and etfor 30 images using equation 2. It is observed that eo and etare suitably separated such that it enables us to arrive at anindex S that can distinguish between original and tamperedimages which is described in section IX.

To show the robustness of Canny Edge Detector, 30 imagesof 50 × 50 sizes were taken. For this average edge index oforiginal images eo was found out using Canny Edge Detector.Same set of images was then low pass filtered (blurred) andaverage edge indices eb were calculated by detecting the edgesand using equation 2. These two values were plotted on agraph (figure 3) which showed that blurring of the imagesdid not affect average edge index value of the image. Therobustness of the proposed method can also be proved forcontent preserving manipulations such as change in averagebrightness level and minor contrast changes. In this paper wewill prove the robustness against change in brightness leveland blurring only.

VII. GENERATION OF HASH VECTOR

Hash vector for the image comprises of hash values of theblocks arranged in a single row. To achieve this, square imageof size M×M is divided into blocks of size (q×q) by movinga sampling block of the same size (q × q) discretely over theimage. The sampling block is shifted by q/2 pixels startingfrom the left top corner of the image to create overlappingblocks. After first row is completed, the sampling block isshifted q/2 pixels downwards and same process is repeated forthe second row. This discrete movement of the sampling blockis repeated for the complete image to create a total number oft2 blocks. Therefore,

t =2M

q− 1. (7)

Once the division of the image in blocks has been done,average edge index is found out for all t2 blocks using Canny

Edge Detector algorithm. Let eij be the average edge index ofthe (i, j)th block where i, j = 1, 2, 3, ..., t. The values of eijare arranged according to block location to get the E matrixfor the image. This E matrix for the image is converted intoa hash matrix H by defining hij for each block as below:

hij = pi−1,j + pi,j + pi+1,j + pi,j+1 + pi,j−1, (8)

where i, j = 1, 2, 3, ..., t.

Fig. 2. The central block is at ith row and jth column of the blocks of theimage. The four neighbouring blocks are obtained by shifting the samplingblock by half block width to the left (i, j-1), right (i, j+1), up (i-1, j) anddown (i+1, j).

Here one precaution needs to be taken for the blocks lyingon periphery of the image. For calculating h′ijs, some of therequired e′ijs will fall outside the image boundary. In that casethe eij falling outside the image is replaced by the nearest eijlying on the periphery but within the image. The matrix soobtained forms the hash matrix of the image and comprisesof hash values hij corresponding to its constituent blocks.

VIII. TAMPERING DETECTION

Using the algorithm described above, the hash matrices fororiginal image, i.e., Ho, and tampered image, i.e., Ht, arefound out. Absolute difference of the two matrices |Ho −Ht|is found out which is suitably normalized and converted into agrey scale matrix which gives the tampering area in the image.

IX. SIMILARITY VALUE

As discussed earlier, the structural information of theimage is predominantly contained in the edges. Anymalicious tampering will cause these edges to be destroyed,removed or modified. Average edge index is an indexwhich describes the amount of edges in a particular blockquantitatively. Therefore, tampering in an image can besuitably expressed through eij values and hence hij values.Change in eijs will, in turn, change the elements of hashmatrix. This change in hash matrix is used to detect thetampering.

Once the detection of tampering in the image has beendone and accurately localized, it is desirable that the amountof tampering is properly quantified. Though lot of workhas been done to detect and localize the tampering, theexisting methods do not give a suitable mathematical index

978-1-4799-0400-6/13/$31.00 ©2013 IEEE

Page 5: [IEEE 2013 2nd International Conference on Informatics, Electronics and Vision (ICIEV) - Dhaka, Bangladesh (2013.05.17-2013.05.18)] 2013 International Conference on Informatics, Electronics

5

for the purpose of quantification. Here, a mathematicalquantity called Similarity Value is being proposed. This valuewill be extracted from the elements of hash matrix whichin turn depends on the feature vectors of the image. Asthe name suggests, Similarity Value S should have highervalue for similar images as compared to two dissimilar images.

For finding a mathematical formulation for similarity value,two images A and B are considered. Their correspondinghash matrices Ha and Hb are computed using the algorithmdescribed above. We convert these hash matrices into corre-sponding hash vectors Ha and Hb by concatenating the rowsof hash matrices in a single row. Now, a ratio R is defined asbelow:

Ri =exp

[min

(Ha

i ,Hbi

)]exp

[max

(Ha

i ,Hbi

)] , (9)

where i = 1, 2, 3, ..., t2. From equation 9 it can be con-cluded that Ri moves closer to 1 as Ha gets closer to Hb. Theratio Ri is the numerical ratio of hash values for ith block oftwo images A and B. It can be observed that value of Ri is1 if corresponding hash values of ith block in the two imagesare same, i.e., they have same average edge index. If there ischange or tampering in any of the two images, value of Ri

will move to a lesser value. Thus, R quantifies the similaritybetween corresponding blocks in the two images which arebeing compared. To compare the similarity between the twoimages, an index called Similarity Value S is defined as below:

S(Ha,Hb

)=

∏Ri∈RS

Ri∏Ri∈RL

Ri. (10)

The numerator represents product of m smallest values ofRi and the denominator is product of m largest values ofRi. Choice of m is arbitrary but it should generally be largerthan the number of tampered (different) blocks to get accuratevalue of S. It can be easily concluded that value of S is 1 forsimilar images, moves away from 1 towards 0 with increase intampering and it tends to 0 for completely dissimilar images.

X. SIMILARITY VALUE AS EFFICIENT TAMPERINGQUANTIFICATION INDEX

Formulation of this index for quantifying the tamperingarea in an image, is a major improvement over existingtampering detection techniques. Though extremely efficient,S is mathematically simple and easy to calculate. It varieswith structural and spatial tampering inflicted in the image.Results to this effect have been shown in Table I.

XI. TAMPERING DETECTION AND LOCALIZATION (TDL)

In the proposed algorithm, size of the sampling blockdecides the area unit in the image which is representedthrough a hash value and these hash values when arranged attheir respective block positions, give the hash matrix for theimage. As full block area is represented through one singlehash value, sampling block size becomes the area unit overwhich tampering is localized. Even in cases where tampering

area is much less than block size, the detected area will beshown as full block size. It means that there is a need toincrease the accuracy of tampering localization in cases wheretampered area is smaller than the sampling block size. Thisis achieved by reducing the block size in the proposed method.

Normally, block size of 50 × 50 is good enough to findout whether tampering has taken place or not and localizesit with reasonable amount of accuracy. However, for smallersize tampering, block size of 25 × 25 or even 20 × 20 canbe chosen. Result of smaller block size for tampering areadetection is shown in Table II. As we go on reducing thesampling block size, the number of blocks generated in theimage will increase. For example for 25× 25 block size, thenumber of block will become 4 times than that when using50× 50 block size. This will increase the size of hash matrixand consequently the length of the hash vector. For an imageof 400 × 400 size, they will be 1000 elements in the hashvector. This increased length can be a major considerationin the context of memory and proessing time capability ofthe system. A trade-off is achieved to optimize accuracy oftampering detection and hash vector length.

XII. EXPERIMENTS AND RESULTS

Canny Edge Detector was used to detect tampering fora set of 100 images of 400 × 400 size. Each image wasdivided into 225 blocks using sampling block of 50 × 50size. Edge Detector was applied to each block to capturethe edge information present in it. From the edge contentof the blocks, their average edge indices eijs were foundout and hash matrix was formed. Random tampering wasinflicted into all 100 images and above process was repeatedto compute their hash matrices. The tampering area is thenfound out by computing the absolute value of the differenceof two hash matrices, i.e., |Ho − Ht|.

To study the variation in similarity value S, a set of 30images was taken. The algorithm proposed above was used tofind value of S for these images. It is observed that value ofS changes with amount of spatial and structural tampering.If the amount of tampering is large then value of S for thatpair of images will be less and vice versa.

Robustness of the proposed algorithm against harmlessmanipulation was tested for 30 images. Two types of suchmanipulations (a) change in brightness level of image and (b)low pass filtering operation were considered for this purpose.Brightness level of the images were changed by +20 and −20and its effects on average edge index was observed. It wasfound that there is no noticeable change in average edge index,proving the robustness of the algorithm against brightnesschange. The second harmless manipulation was carried outthrough Gaussian low pass filter with σ = 0.3. Its effect onaverage edge index was found out. Again, the effect of lowpass filtering was very minimal on e up to a significant valueof standard deviation of the filter. These results are plotted infigure 3.

978-1-4799-0400-6/13/$31.00 ©2013 IEEE

Page 6: [IEEE 2013 2nd International Conference on Informatics, Electronics and Vision (ICIEV) - Dhaka, Bangladesh (2013.05.17-2013.05.18)] 2013 International Conference on Informatics, Electronics

6

Fig. 3. Average edge indices for 30 images have been plotted in this graph forthe original image, with brightness level changed by +20 and −20 and afterlow pass filtering (blurred) for showing the effects of harmless manipulations.It is evident that there is no appreciable change in these average edge indicesfor any image.

XIII. CONCLUSION

In the proposed hashing algorithm the objective was (a) tocome out with a detection technique which is sensitive even tominute structural tampering operations, (b) to develop a robusttechnique which can efficiently ignore harmless manipulationssuch as low pass filtering and change in brightness level ofthe image, and (c) to define a mathematical index which canaccurately quantify the amount of tampering. The algorithmwas tested for a database of 100 images and result wasfound to be promising. The method for tampering detectionand localization was extremely accurate in pinpointing thetampered region. However, increase in accuracy for small areatampering detection is associated with increase in length ofhash vector. Therefore, a trade-off has to be done betweendesired accuracy and hash vector length. Also, requirement ofextremely low collision probability for hash function is beingdone in our future work. Canny Edge Detector was used forthe first time to generate content based hash and its resultswere found to be promising. This was expected as Canny EdgeDetector exploits the edges in the image and edge being highlyrepresentative of structural details, the hash generated was veryaccurate. High degree of robustness was observed becauseof the fact that edges represent high differential pixel valueswhile harmless manipulations are normally low differentialpixel values. Double thresholding employed in Canny EdgeDetector easily removed low frequency noise which may havebeen introduced in the image through low pass filtering orchange in brightness level, thus making it extremely robustwithout compromising the sensitivity.

REFERENCES

[1] Z. Guojuan and L. Dianji, “An overview of digital watermarking inimage forensics,” in Computational Sciences and Optimization (CSO),2011 Fourth International Joint Conference on, April 2011, pp. 332–335.

[2] F. Khelifi and J. Jiang, “Perceptual image hashing based on virtualwatermark detection,” Image Processing, IEEE Transactions on, vol. 19,no. 4, pp. 981–994, April 2010.

[3] N. Dharwadkar, B. Amberker, and A. Gorai, “Non-blind watermarkingscheme for color images in rgb space using dwt-svd,” in Communica-tions and Signal Processing (ICCSP), 2011 International Conferenceon, Feb. 2011, pp. 489–4933.

[4] J. Fridrich and M. Goljan, “Robust hash functions for digital watermark-ing,” Information Technology: Coding and Computing, InternationalConference on, vol. 0, p. 178, 2000.

[5] P. W. Wong and N. Memon, “Secret and public key image watermarkingschemes for image authentication and ownership verification,” ImageProcessing, IEEE Transactions on, vol. 10, no. 10, pp. 1593 –1601, oct2001.

[6] Z. Tang, S. Wang, X. Zhang, and W. Wei, “Perceptual similaritymetric resilient to rotation for application in robust image hashing,”in Multimedia and Ubiquitous Engineering, 2009. MUE ’09. ThirdInternational Conference on, june 2009, pp. 183 –188.

[7] F. Ahmed, M. Siyal, and V. U. Abbas, “A secure and robusthash-based scheme for image authentication,” Signal Processing,vol. 90, no. 5, pp. 1456 – 1470, 2010, ¡ce:title¿Special Section onStatistical Signal amp; Array Processing¡/ce:title¿. [Online]. Available:http://www.sciencedirect.com/science/article/pii/S0165168409002497

[8] R. Venkatesan, S.-M. Koon, M. Jakubowski, and P. Moulin, “Robustimage hashing,” in Image Processing, 2000. Proceedings. 2000 Interna-tional Conference on, vol. 3, 2000, pp. 664 –666 vol.3.

[9] M. Schneider and S.-F. Chang, “A robust content based digital signaturefor image authentication,” in Image Processing, 1996. Proceedings.,International Conference on, vol. 3, sep 1996, pp. 227 –230 vol.3.

[10] R. Ge, G. Arce, and G. DiCrescenzo, “Approximate message authenti-cation codes for n -ary alphabets,” Information Forensics and Security,IEEE Transactions on, vol. 1, no. 1, pp. 56 – 67, march 2006.

[11] S. Bhattacharjee and M. Kutter, “Compression tolerant image authen-tication,” in Image Processing, 1998. ICIP 98. Proceedings. 1998International Conference on, vol. 1, oct 1998, pp. 435 –439 vol.1.

[12] D.-C. Lou and J.-L. Liu, “Fault resilient and compression tolerantdigital signature for image authentication,” Consumer Electronics, IEEETransactions on, vol. 46, no. 1, pp. 31 –39, feb 2000.

[13] C.-S. Lu and H.-Y. Liao, “Structural digital signature for image authen-tication: an incidental distortion resistant scheme,” Multimedia, IEEETransactions on, vol. 5, no. 2, pp. 161 – 173, june 2003.

[14] F. Lefebvre, J. Czyz, and B. Macq, “A robust soft hash algorithmfor digital image signature,” in Image Processing, 2003. ICIP 2003.Proceedings. 2003 International Conference on, vol. 2, sept. 2003, pp.II – 495–8 vol.3.

[15] V. Monga and M. Mihcak, “Robust and secure image hashing vianon-negative matrix factorizations,” Information Forensics and Security,IEEE Transactions on, vol. 2, no. 3, pp. 376 –390, sept. 2007.

[16] J. Canny, “A computational approach to edge detection,” Pattern Analy-sis and Machine Intelligence, IEEE Transactions on, vol. PAMI-8, no. 6,pp. 679 –698, nov. 1986.

[17] V. Mall, A. Roy, S. Mitra, and K. Bhatt, “Non-blind method of detectionand localization of structural tampering using robust hash-like functionand similarity metric for digital images,” in TENCON 2012 - 2012 IEEERegion 10 Conference, nov. 2012, pp. 1 –6.

978-1-4799-0400-6/13/$31.00 ©2013 IEEE

Page 7: [IEEE 2013 2nd International Conference on Informatics, Electronics and Vision (ICIEV) - Dhaka, Bangladesh (2013.05.17-2013.05.18)] 2013 International Conference on Informatics, Electronics

7

No. Original Image Image with small tampering Image with large tampering Similarity Value Similarity Valuefor Small Tampered Area for Large Tampered Area

1 0.500975 0.449958

2 0.7328 0.459967

3 0.649599 0.41979

TABLE ITHE SIMILARITY VALUE CHANGES ACCORDING TO THE AREA OF TAMPERING IN THE IMAGES.

No. Original Image Tampered Image Localization of tampering Localization of tamperingusing 50× 50 block using 20× 20 block

1

2

3

TABLE IIACCURACY IN LOCALIZATION OF TAMPERING IN THE IMAGES IS ACHIEVED BY REDUCING THE SAMPLING BLOCK SIZE. HERE WE HAVE TAKEN IMAGES

WITH SMALL TAMPERING AREA.

978-1-4799-0400-6/13/$31.00 ©2013 IEEE