Keywords

1 Introduction

An image is an artifact that represents visual insight of an event. We live in a digital world where digital images are used as a means of communication. Images are everywhere, on the Internet, social media, newspapers, etc. The authenticity of images is in question because it is very easy to edit any image using easily available image manipulating tools [1,2,3,4]. Hence, digital image forgery detection is important to authenticate the images. Image authentication methods can be classified into two modules such as active methods and passive methods. Active method is the technique in which prior information about the original image such as watermarking or signature [57] which is embedded inside the image is known for forgery detection. It is a drawback because in various situations prior information about the image is not available [8,9,10,11].

The Passive method is also known as the blind technique in which information regarding the image is not available [12, 13]. Hence, this method authenticates the image without the existence of the original information.

One of the most commonly used methods of image altering is hiding a region in the image and distorting the image information. Copy-move forgery is the most common image forgery used to hide the portion of the image. In copy-move forgery, some portions of an image are copied and posted on another area of the same image. An example of copy-move forgery is shown in Fig. 1.

Fig. 1
figure 1

Copy-move forgery: a Original image, b Copy-move forged image

The most frequently used method for image copy-move detection is block matching in which the image is divided into the same size overlying blocks then feature of each block is extracted and then each block is compared with other blocks in the same image. At last, the outcome of forgery detection is decided based on matched block features. During the feature extraction process, the essential features are chosen from the blocks using a discrete cosine transform (DCT)[1, 3]. These essential features are used to compare the blocks. DCT helps to segment the image or spectral sub-bands of differing importance corresponding to the image visual quality. The DCT is like the discrete Fourier transform which transforms the image into the frequency domain from the spatial domain as shown in Fig. 2.

Fig. 2
figure 2

Discrete cosine transforms

Fadl and Semary (accelerated method) [1] proposed a method using K-means classifier and images of 128 × 128-pixel grayscale images. The proposed method works on direct computation, without using the classifier, for an image size of any pixel with reduced computational steps.

The paper is organized as follows: Sect. 2 presents the proposed system in details. Section 3 presents the test and results and Sect. 4 is the conclusion.

2 Proposed Method

The core of the proposed method is to examine whether the input image contains copied regions or not and to identify the region from where it is copied from the same image.

The proposed method is explained in the following steps:

  1. Step 1

    The color image or gray image of any pixel value is taken as input for which copy-move detection must be performed.

  2. Step 2

    The Color image is converted from RGB to gray. Gray image is retained as it is.

  3. Step 3

    Images are segmented into equal size overlaying blocks. The total number of blocks depends on the pixel of the image. It is calculated using the following equations:

    $${\mathbf{Block}}\,{\mathbf{size}} = {\mathbf{2t}}$$
    (1)

    where t = log2 (M × N) − 12, “M” is the number of rows, and “N” is the number of columns.

    Therefore,

    $${\mathbf{the}}\,{\mathbf{total}}\,{\mathbf{number}}\,{\mathbf{of}}\,{\mathbf{blocks}} = \left( {\left( {{\mathbf{M}}*{\mathbf{N}}} \right)} \right)/\left( {{\mathbf{Block}}\,{\mathbf{size}}} \right)$$
    (2)

    The minimum value of t = 2

  4. Step 4

    Calculate the DCT for each block.

    The general for DCT is

    $$\begin{aligned} F(u,v) & = \left( {\frac{2}{N}} \right)^{{\frac{1}{2}}} \left( {\frac{2}{M}} \right)^{{\frac{1}{2}}} \sum\limits_{{i = 0}}^{{N - 1}} {\sum\limits_{{j = 0}}^{{M - 1}} {\Lambda (i) \cdot \Lambda (j)} } \\ & \quad \cdot \cos \left[ {\frac{{\pi .u}}{{2.N}}(2i + 1)} \right]\cos \left[ {\frac{{\pi .v}}{{2.M}}(2j + 1)} \right] \cdot f(i,j) \\ \end{aligned}$$
    (3)

    For the input image N by M, f(i, j) is the intensity of the pixel in row i and column j; F(u, v) is the DCT coefficient in row k1 and column k2 of the DCT matrix.

  5. Step 5

    Calculate the mean of obtained DCT of each block.

  6. Step 6

    Then, the mean of each block is matched with all other blocks in the same image.

  7. Step 7

    If the similarity is found then the block is highlighted (considered as a copied block).

3 Simulation and Results

The experimental results are discussed in this section. The tests were carried out on the MATLAB R2013a, RAM 2 GB, and processor 2.90 GHz, the images with the different pixel values, saved in BMP format, are tested to check the computational speed and robustness of the proposed algorithm.

Figure 3 shows two images: The input image and detected the image. The random rectangular region is copied and pasted onto the same image. The highlighted region represents the copied region and pasted region. The test conducted without having prior knowledge of the images with different pixel values.

Fig. 3
figure 3figure 3

ag Random rectangular region detected

Table 1 shows the computational time of forgery detection of random rectangular regions applied on images using the proposed method and method proposed by Fadl and Semary [1] (the accelerated method). As per the table, the proposed method is improved with enhanced speed compared to the accelerated method.

Table 1 Comparison of computational time between the proposed method and the accelerated method

Figure 4 shows that the performance of the accelerated method, which produces noise while detecting higher pixel value images, and hence its performance is reduced compared to the proposed method. As the pixel values are more, the accelerated method produces noise. The proposed method is more accurate even for higher pixel value. This is highlighted in the first row and last row of Table 1.

Fig. 4
figure 4

a, b Noise during detection in the accelerated method

Figure 5 shows an irregular region that is copied and pasted onto the image. The test shows the detection for the single region and multi-regions. All the images are 128 × 128 pixel values.

Fig. 5
figure 5

ac Copy-move detection for irregular regions

Table 2 shows the computational time of forgery detection of random rectangular regions applied on images using the proposed method and method proposed by Fadl and Semary [1] (the accelerated method). As per the table, the proposed method is improved with enhanced speed compared to the accelerated method.

Table 2 Comparison of computational time between the proposed method and the accelerated method

4 Conclusion

This work is robust to detect copy-move forgery efficiently, by means of DCT features and taking the mean of DCT of blocks and comparing with other blocks of the same image. It works without any prior information about the image. The proposed work is fast and more effective for any pixel values compared to existing methods.