Presentation is loading. Please wait.

Presentation is loading. Please wait.

Copy-Paste Forgery Detection Exposing Digital Forgeries by Detecting Duplicated Image Regions (A. Popescu and H. Farid) Detection of Copy-Move Forgery.

Similar presentations


Presentation on theme: "Copy-Paste Forgery Detection Exposing Digital Forgeries by Detecting Duplicated Image Regions (A. Popescu and H. Farid) Detection of Copy-Move Forgery."— Presentation transcript:

1 Copy-Paste Forgery Detection Exposing Digital Forgeries by Detecting Duplicated Image Regions (A. Popescu and H. Farid) Detection of Copy-Move Forgery in Digital Images (J.Fridrich, D. Soukal, and J. Lukas) Samah Ghazawi

2 Overview Copy-Paste Forgery. Copy-Paste Forgery Detection. Possible Approaches. Exhaustive approach. Autocorrelation. Exact block matching. PCA - Principal component analysis. Copy-Paste Forgery Detection Using PCA DCT - discrete cosine transform. Copy-Paste Forgery Detection Using DCT

3 Copy-Paste Forgery The copy-paste attack in which a part of the image is copied and pasted somewhere else in the same image with the intent to cover an important image feature.

4 Copy-Paste Forgery Detection Given an image with MN pixels (image of size M×N) our task is to determine if it contains duplicated regions of unknown location and shape.

5 Possible Approaches Exhaustive approach (1). Exhaustive approach (2). Autocorrelation approach. Exact block matching.

6 Exhaustive approach (1) examine every possible pair of regions would have an exponential complexity in the number of image pixels.  Such an approach is obviously computationally prohibitive.

7 Exhaustive approach (2) In this method, the image and its circularly shifted version are overlaid looking for closely matching image segments.

8 Exhaustive approach (2)

9

10

11 Autocorrelation Autocorrelation function computes the energy of original image with shifted image for different shifts. The original and copied segments will introduce peaks in the autocorrelation for the shifts that correspond to the copied-moved segments. Autocorrelation witch computed directly for the image itself, would have very large peaks at the image corners and their neighborhoods.

12 Autocorrelation Natural images contain most of their power in low- frequencies. Computing the autocorrelation not from the image directly, but from its high-pass filtered version.

13 Autocorrelation

14 Assuming the minimal size of a copied-moved segment is K. autocorrelation copy-move detection method consists of the following steps: 1. Apply the Marr high-pass filter to the tested image. 2. Compute the autocorrelation r of the filtered image. 3. Remove half of the autocorrelation.  Autocorrelation is symmetric.

15 Autocorrelation 4. Set r = 0 in the neighborhood of two remaining corners of the entire autocorrelation. 5. Find the maximum of r, identify the shift vector, and examine the shift using the exhaustive method  this is now computationally efficient because we do not have to perform the exhaustive search for many different shift vectors. 6. If the detected area is larger than K, finish, else repeat Step 5 with the next maximum of r.

16 Autocorrelation This method is simple and does not have a large computational complexity, it often fails to detect the forgery unless the size of the forged area is at least ¼ of linear image dimensions.

17

18 Exact Block Matching

19 Image block block vector

20 Exact Block Matching

21 block vectors array ordered array

22 Exact Block Matching

23 Results

24 Exact match analysis did not show any exactly matching blocks.

25 Results If the forged image had been saved as JPEG, vast majority of identical blocks would have disappeared because the match would become only approximate and not exact.

26 And differently… Ordered array of what ?!

27 Principal Component Analysis – PCA Discrete Cosine Transform - DCT PCA of a data set X. DCT of a data set X.

28 Principal Component Analysis - PCA Mainstay of modern data analysis. Used abundantly in all forms of analysis - from neuroscience to computer graphics. Simple, non-parametric method of extracting relevant information from confusing data sets. Reduces a complex data set to a lower dimension to reveal the sometimes hidden. Computes the most meaningful basis to re-express a noisy, garbled data set.

29 Principal Components Orthogonal directions of greatest variance in data.

30 Principal Components First principal component is the direction of greatest variability (covariance) in the data. Second is the next orthogonal (uncorrelated) direction of greatest variability.  So first remove all the variability along the first component, and then find the next direction of greatest variability. And so on …

31 Principal Components

32 Principal components with larger associated variances represent interesting dynamics, while those with lower variances represent noise. The principal components are orthogonal.

33 Principal Components Dimensionality Reduction Can ignore the components of lesser significance You do lose some information, but if the eigenvalues are small, you don’t lose much. n dimensions in original data. calculate n eigenvectors and eigenvalues. choose only the first p eigenvectors, based on their eigenvalues. final data set has only p dimensions.

34 PCA The number of measurement types is the dimension of the data set. Each data sample is a vector in m dimensional space. Naïve Basis: B is the identity matrix I, X = IX.

35 PCA PCA asks: Is there another basis, which is a linear combination of the original basis, that best re-expresses our data set? (1) restricting the set of potential bases. (2) formalizing the implicit assumption of continuity in a data set.

36

37 Let The Math Begin

38 PCA

39

40

41

42

43

44 PCA - Now comes the trick

45 Copy-Paste Forgery Detection Using PCA

46

47 For color images: (1) analyze each color channel separately. or (2) build a single color block of size 3b pixels.

48 Copy-Paste Forgery Detection Using PCA

49

50

51

52

53 From the remaining pairs of blocks build a duplication map by constructing a zero image of the same size as the original, and coloring all pixels in a duplicated region with a unique grayscale intensity value.

54 Results

55

56

57

58

59 Principal Component Analysis – PCA Discrete Cosine Transform - DCT PCA of a data set X. DCT of a data set X.

60 Discrete Cosine Transform - DCT Important to numerous applications in science and engineering, from lossy compression of audio and images, to spectral methods for the numerical solution of partial differential equations. There are eight standard DCT variants, of which four are common. Fourier-related transform similar to the discrete Fourier transform (DFT), but using only real numbers.

61 DCT Transforms an image from the spatial domain to the frequency domain. Helps separate the image into parts of differing importance. Expresses a finite sequence of data points in terms of a sum of cosine functions oscillating at different frequencies.

62 DCT

63 Let The Math Begin – Again !

64 DCT

65

66 DCT basis functions Computationally easier to implement and more efficient to regard the DCT as a set of basis functions.

67 DCT

68

69 Copy-Paste Forgery Detection Using DCT Scan the image from the upper left corner to the lower right corner while sliding a B×B blocks. Calculate the DCT transform for each block. Quantize the DCT coefficients and store as one row in a matrix A.  The quantization steps are calculated from a user- specified parameter Q.  Lower values of the Q-factor produce more matching blocks, possibly some false matches.

70 Copy-Paste Forgery Detection Using DCT Lexicographically sort the rows of A. If two consecutive rows of the sorted matrix A are found, store the positions of the matching blocks in a separate list.  the coordinates of the upper left pixel of a block can be taken as its position.

71 Copy-Paste Forgery Detection Using DCT Let (i 1, i 2 ) and (j 1, j 2 ) be the positions of the two matching blocks. The shift vector s between the two matching blocks is calculated as s = (s 1, s 2 ) = (i 1 – j 1, i 2 – j 2 ) the shift vectors –s and s correspond to the same shift, the shift vectors s are normalized, if necessary, by multiplying by –1 so that s ≥ 0.

72 Copy-Paste Forgery Detection Using DCT For each matching pair of blocks, increment the normalized shift vector counter C by one. C(s1, s2) = C(s1, s2) + 1  The shift vector C is initialized to zero.  The counter C indicates the frequencies with which different normalized shift vectors occur.

73 Copy-Paste Forgery Detection Using DCT find all normalized shift vectors s(1), s(2), …, s(K), whose occurrence exceeds a user-specified threshold T: C(s(r)) > T for all r = 1, …, K.  Larger values of T may cause the algorithm to miss some not-so-closely matching blocks, while too small a value of T may introduce too many false matches.

74 Copy-Paste Forgery Detection Using DCT look at the mutual positions of each matching block pair and output a specific block pair only if there are many other matching pairs in the same mutual position. For all normalized shift vectors, the matching blocks that contributed to that specific shift vector are colored with the same color and thus identified as segments that might have been copied and moved.

75 Results the elliptic area on the orange hat has been copied to two other locations, three different shift vectors have been correctly found.

76 Results False matches

77 Results

78 DCT VS. Exact Block Matching

79 References Exposing Digital Forgeries by Detecting Duplicated Image Regions (A. Popescu and H. Farid) Detection of Copy-Move Forgery in Digital Images (J.Fridrich, D. Soukal, and J. Lukas) Wikipedia: https://en.wikipedia.org/wiki/Discrete_cosine_transformhttps://en.wikipedia.org/wiki/Discrete_cosine_transform http://www.cs.cf.ac.uk/Dave/Multimedia/node231.html A Tutorial On Principal Component Analysis - Derivation, Discussion and Singular Value Decomposition (Jon Shlens) http://mipav.cit.nih.gov/pubwiki/index.php/Autocorrelation_Coefficients http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.157.4543&rep =rep1&type=pdf http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.157.4543&rep =rep1&type=pdf

80 THANKS


Download ppt "Copy-Paste Forgery Detection Exposing Digital Forgeries by Detecting Duplicated Image Regions (A. Popescu and H. Farid) Detection of Copy-Move Forgery."

Similar presentations


Ads by Google