1 Introduction

In the recent years, the internet, multimedia, and imaging technologies are playing an imperative role in our daily life. The internet users share a massive amount of multimedia contents such as text, audios, videos and images over the social media every day. The accessibility of high-resolution, inexpensive digital cameras and user-friendly image manipulation software have made the integrity of image contents questionable. The security concern of digital image contents arose a long time ago. Therefore, numerous techniques have been suggested to determine the truthfulness of image contents [1]. These techniques can be grouped into two classes: active and passive (blind) [2].

Digital watermarking [3] and digital signatures [4] fall into the active class. Watermarking requires embedding of watermark robust to tampering attacks into the image for content verification. Digital signature requires transmission of image signature and a private key generated by an algorithm with the original image. As both the techniques require additional information, they are grouped as active techniques. The requirement of additional information also makes the application of such technique limited in practice [5].

Consequently, passive techniques have gained more attention of the researchers recently. A substantial amount of research is focused on region duplication (or copy-move) forgery detection (RDFD) [1]. In region duplication forgery (RDF), an image region is duplicated onto a different region of the same image, with the aim of concealing or replicating some essential contents [2]. Since the source and destination of duplicated regions are the same image, they have identical color and texture attributes that make the tampering more effective. Figure 1 demonstrates the examples of RDF attack. For the examples presented in the left column of Fig. 1, a region is duplicated to conceal undesirable objects in the authentic image. In the other case, an object is replicated to create contents that are not in the authentic image. The duplicated regions are well blended at the desired locations, and become very difficult to identify visually. To investigate the image RDF, there exist two types of systems: keypoint-based and block-based [6]. The keypoint-based systems compute features only on image regions with high entropy. Subsequently, similar features within the image are matched in order to detect the RDF [7]. In contrast, block-based systems sub-divide an image into square blocks and extract feature representation for each block. Thereafter, all the features of image blocks undergo a matching process of similarity check.

Fig. 1
figure 1

Examples showing the RDF attack

This paper proposes an efficient technique for RDFD in digital images using the low approximation (LL) sub-band of the stationary wavelet transform (SWT). The proposed technique analyzes the similarity between image regions for tampering detection. The SWT is a translation invariant transform that makes it distinctive over the discrete wavelet transform (DWT) and is more appropriate for detection of duplicated regions. Most of the existing studies mentioned in the related work (Section 2) use an overlapping block of size 8 × 8 pixels for detection of region duplication image forgeries. However, what if the block size is different? Therefore, different block sizes (4 × 4, and 8 × 8) are used to investigate the effects of block size on accuracy detection. The study shows that the selection of block size needs attention while evaluating the accuracy of the system in terms of precision and recall. Thus, the following concerns are considered in this study:

  • What is the most suitable block size in order to get higher accuracy performance (precision and recall)?

  • What is the effect of block size on block regions that are falsely detected as duplicated (false positive) and the duplicated regions that are falsely missed (false negative) during the comparison and matching step?

In addition, the results of the proposed technique are compared with state-of-the-art techniques [8,9,10], that shows the prominence and effectiveness of the proposed technique. Compared to [8,9,10], the key benefits of the proposed technique are:

  • Utilization of reduced size feature vectors for blocks representation,

  • Lower computational complexity, and

  • Unveiling multiple region-duplication forgeries efficiently.

The paper is arranged as follows: Section 2, presents the overview of related work in the domain of RDFD. The proposed technique is described in Section 3. The experiments are discussed in Section 4. Finally, the concluding notes are given in Section 5.

2 Related work

In literature, many techniques have been proposed for RDFD. Fridrich et al. [11], suggested the first technique for RDFD using DCT. The technique divides the image into small overlapping blocks. The DCT coefficients obtained from overlapping blocks forms the features vectors. The drawback of the technique is high computational time. Popescu and Farid [12], utilized principal components analysis (PCA) to reduce the length of feature vectors of [11] for detecting the duplications. Myna et al. [13] proposed a technique utilizing log-polar coordinates and wavelet transform for RDFD. Exhaustive searching is performed for duplication detection by mapping the similar blocks to log-polar coordinates, however, a phase correlation is adopted for similarity test. Christlein et al. [14], presented a technique using Fourier-Mellin transform (FMT) based features and kd-tree are employed for similarity measure. This technique performed excellently in the absence of geometric transformations over the duplicated blocks. Ryu et al. [15] suggested a scheme for duplication detection by using the Zernike moments of the image blocks as rotation invariant features. Huang et al. [16], proposed an improved DCT coefficients based technique to detect the duplicated regions. The length of feature vectors is reduced through truncation process to only [p × B2] elements. The DCT coefficients are quantized to make the technique effective against the compression attack. Zimba and Xingming [9], proposed a technique by combining the DWT and PCA for duplication detection, however, the technique is not efficient. Muhammad et al. [17], suggested an RDFD technique through the undecimated dyadic wavelet transform (DyWT). The proposed technique employees LL1 and HH1 sub-bands of DyWT for forgery detection. Sekeh et al. [18], exposed the tampering in digital images through a block clustering technique. The algorithm generates clusters of similar blocks and feature matching is performed within the same clusters. Lynch et al. [19], came up with an expanding block algorithm for RDF detection. This technique performed well against image post-processing operations or when the tampered areas are made lighter or darker. YunJie et al. [20], proposed a technique based on dual-tree complex wavelet transform. The method performed better for rotated duplicated regions and JPEG compressed images. Alahmadi et al. [21], suggested a duplication detection method utilizing LBP and DCT based features. The classification of images is performed using SVM. Ulutas et al. [22], proposed a frame and mirroring detection technique through binary features. The technique is shown to be efficient for duplication detection with lower computational time. Hayat and Qazi [10], proposed a masked-based technique using DWT and DCT for region duplication detection. First, the low approximation sub-band of DWT is extracted that followed the application of DCT over the small overlapping image blocks for RDFD.

3 The proposed technique for RDFD

This section presents an efficient block-based forensic technique for exposing RDF in digital images utilizing the translation invariant SWT. Different from existing techniques, the proposed technique further splits image blocks (4 × 4 and 8 × 8) into four triangular regions in order to obtain the reduced feature vector length. Hence, the algorithm extracts moment of the first order as features corresponding to each triangular region that is further utilized for duplication detection.

The discussion above draws forth the framework of the proposed RDFD technique as depicted in Fig. 2. The implementation details of the proposed technique are given in the following sub-sections.

Fig. 2
figure 2

The framework of the proposed technique based on SWT for RDFD

3.1 Pre-processing the question image

We have taken an RGB color image and transformed it into Y C b C r color space, represented by the following mathematical equations;

$$\begin{array}{@{}rcl@{}} Y&=&\left( \frac{77}{256} \right)R + \left( \frac{150}{256} \right)G + \left( \frac{29}{256} \right)B\\ C_{b}&=&-\left( \frac{44}{256} \right)R-\left( \frac{87}{256} \right)G+ \left( \frac{131}{256} \right)B + 128\\ C_{r}&=& \left( \frac{131}{256} \right)R-\left( \frac{110}{256} \right)G-\left( \frac{21}{256} \right)B + 128 \end{array} $$
(1)

where R (Red), G (Green) and B (Blue) are the three channels of the color image

The Y C b C r color space was adopted as a part of ITU-R BT.601 during the standardization process of digital video encoding. The Y C b C r color space reflects the fact that the human eye can perceive the brightness of a given color due to variation in the wavelength of the light [23]. Moreover, the Y C b C r color space contains the information in the form of separate channels that are luminance (grayscale) and chrominance (color) channels. The luminance channel of the Y C b C r color space holds more spatial information as comparted to the channels of other color spaces such as RGB color space channels. Therefore, the luminance channel (Y ) of the Y C b C r color space is adopted for region duplication forgery detection in digital images that is denoted by GI.

3.2 Feature extraction

The proposed technique decomposes GI into different sub-bands of translation invariant SWT. In SWT, the input 2D image is convolved by applying low (l) and high (h) pass filters to obtain the approximation and detailed coefficients. The detailed discussion on SWT could be found in literatures [24] and [25].

For an image GI, of size M × N, the SWT at i th level is given by:

$$ {LL}_{i+1}\left( a,b \right)=\sum\limits_{x} \sum\limits_{y} {l_{x}^{i}} {l_{y}^{i}} {LL}_{i}\mathrm{(}a+x,b+y) $$
(2)
$$ {LH}_{i+1}\left( a,b \right)=\sum\limits_{x} \sum\limits_{y} {l_{x}^{i}} {h_{y}^{i}} {LL}_{i}(a+x,b+y) $$
(3)
$$ {HL}_{i+1}\left( a,b \right)=\sum\limits_{x} \sum\limits_{y} {h_{x}^{i}} {l_{y}^{i}} {LL}_{i}(a+x,b+y) $$
(4)
$$ {HH}_{i+1}\left( a,b \right)=\sum\limits_{x} \sum\limits_{y} {h_{x}^{i}} {h_{y}^{i}} {LL}_{i}(a+x,b+y) $$
(5)

where a = 1, 2, 3, …, M; b = 1, 2, 3, …, N.

The L L, L H, H L, and HH obtained using (02-05) of an image, represents the approximation, horizontal, vertical and diagonal sub-bands, respectively. The approximation (L L) sub-band of size M × N is further considered for implementation of the proposed RDFD technique, which is most suitable for detection of duplicated regions.

Therefore, the proposed technique divides LL into overlapping blocks B i of size w × w pixels (w = 4, 8). Therefore, we can obtain N b of overlapping blocks from LL.

$$ N_{b}=\left( M-w+1 \right)\times \left( N-w+1 \right) $$
(6)

For feature extraction, the proposed technique further divides each block B i (i = 1, 2, 3…, N b ) into triangular regions T 1, T 2, T 3, T 4, as exemplified in Fig. 3. For each B i , we represent μ 1, μ 2, μ 3, μ 4 as features of T 1, T 2, T 3, T 4 respectively. Hence, we obtain feature vectors for duplication detection through a mathematical representation, as follows:

$$ \mu =\frac{\sum {f(x,y)}} {n}, (f(x,y)\in T_{i}, i=1, 2, 3, 4) $$
(7)

where μ represents the moment of first order as features of B k , corresponding to each T i . Thus, features extracted from B k can be arranged in a sequence to produce a feature vector of size 1 × 4 as described in (8)

$$ \hat{\mu} =\left[ { \mu}_{1},\mu_{2},\mu_{3},\mu_{4} \right] $$
(8)
Fig. 3
figure 3

Proposed triangular feature vector extraction process for different block sizes

One additional problem related to block-based RDFD techniques is the computational complexity that is directly associated with the length of feature vectors and number of overlapping blocks. The feature matrix contains the number of blocks in the form of rows and the number of columns denotes the number of features. The lexicographic sorting when applied over this matrix, is a major source of computational complexity. Therefore, the techniques with smaller length of feature vectors are computationally efficient compared to the techniques with larger length of feature vectors. A comparison between the proposed technique and state-of-the-art techniques [8,9,10] in terms of feature length is given in Table 1. In comparison with [8,9,10], the proposed technique utilizes the same size w × w pixels (w = 4, 8) of overlapping blocks B i for an input image. However, the length of feature vector of the proposed technique is reduced, which indicates the proposed technique is more efficient and has lower computational complexity. A comparison of computational complexity (in seconds) of feature extraction from an image block B k of size w × w pixels (w = 4, 8) is also shown in Table 2. Table 2 shows that the proposed technique is computationally efficient for feature extraction process as well compared to other techniques.

Table 1 Computational complexity comparison in terms of feature length
Table 2 Computational complexity comparison (in seconds) for feature extraction from an image block

3.3 Similar block pairs searching

A feature matrix f m of size N b × 4 is created by arranging all the feature vectors extracted according to the details given in Section 3.2, represented by following mathematical equation;

$$ f_{m}=\left[ {\begin{array}{*{20}c} \widehat{\mu_{1}}\\ {\begin{array}{*{20}c} \widehat{\mu_{2}}\\ {\vdots} \\ \widehat{\mu_{N_{b}}}\\ \end{array}} \\ \end{array}} \right] $$
(9)

Before instigating the process of similar block pairs searching, the matrix f m is sorted lexicographically and organizes all the feature vectors of similar blocks closer to each other. Thereby, sorting process reduces the similarity search and makes the algorithm computationally more efficient. In the meantime, top left corner coordinates of all the image blocks B i are recorded. The matrix f m after sorting is denoted by f s m .

Since the image blocks are overlapping and the duplicated regions are supposed to be non-overlapping, a block distance (T b d ) threshold is employed to make a decision, whether a pair of feature vectors corresponds to non-overlapping regions. For this, let us consider (x i , y i ) and (x j , y j ) are the top left corner coordinates of two blocks denoted by the feature vectors μ i and μ j of f s m , then:

$$ \forall \sqrt {\left( x_{i}-x_{j} \right)^{2}+\left( y_{i}-y_{j} \right)^{2}} \ge T_{bd} $$
(10)

In addition, if a pair of feature vectors satisfy above block distance criteria (10), the proposed technique consider these feature vectors for similarity test to meet the second requirement of RDFD. Therefore, the proposed technique computes the similarity between two feature vectors using (11). If the distance of similarity is smaller than a preset threshold T s , then the inquired image blocks will be considered as a candidate for RDF.

$$\begin{array}{@{}rcl@{}} \widehat{\mu_{i}}=\left[ {\mu_{i}^{1}}, {\mu_{i}^{2}}, \mu_{i}^{3}, {\mu_{i}^{4}} \right]\\ \widehat{\mu_{j}}=\left[ {\mu_{j}^{1}}, {\mu_{j}^{2}}, \mu_{j}^{3}, {\mu_{j}^{4}} \right]\\ \forall \sqrt{\sum\limits_{f=1}^{4} \left( \mu_{i}^{f}- {\mu_{j}^{f}} \right)^{2}} < T_{s} \end{array} $$
(11)

3.4 Post-processing of duplication detection result

Finally, the proposed technique generates the desired output image I o by highlighting all the duplicated blocks detected during the similar block pairs searching process as described in Section 3.3. The morphological opening operation is also applied to I o to eliminate the isolated regions and to fill the holes in the highlighted regions of I o .

4 Experimental results

The experimental results demonstrating the efficacy of the proposed technique are presented in this section. The performance of the technique is evaluated over a publically available image dataset (CoMoFoD [26]) designed for image duplication detection. All the experiments are carried out on a notebook computer with Intel C i5 2.4 GHz processor 6 GB RAM running M a t l a b2015a. The following sub-sections describe the testing dataset, parameter setup and evaluation metrics, visual results of the proposed technique and the accuracy performance comparison with other techniques.

4.1 Testing dataset

The CoMoFoD dataset comprises 100 original and 100 forged images with the size 512 × 512 pixels. The performance of the proposed technique is measured by comparing the detection results with the ground-truth image available with each forged image in the dataset. Each image implements block-based RDFD technique using the low approximation sub-band (LL) of SWT with the block size 4 × 4 and 8 × 8. The input images used in the experiments are presented in Fig. 4.

Fig. 4
figure 4

Images used in the experiments

4.2 Parameter setup and evaluation metrics

In our experiments, all the parameter values are set as: w = 4, 8 (block size), N r = 10 (No. of neighboring feature vectors to compare), T s = 0.0015 (similarity threshold) and T b d = 40 (block distance threshold).

The robustness of the proposed technique is evaluated using performance evaluation metrics known as precision ‘p’ and recall ‘r’ [8, 27] that are defined as follows:

$$ p=\frac{FR\cap DR}{DR} $$
(12)
$$ r=\frac{FR\cap DR}{FR} $$
(13)

where FR is the f o r g e d r e g i o n and DR is the d e t e c t e d r e g i o n.

In addition, F 1 score is also computed by taking account of both the metrics ‘p’ and ‘r’. Therefore, it reflects the overall accuracy of duplication detection. The F 1 score is defined [27] as follows:

$$ F_{1}=\frac{2\times p\times r}{p+r} $$
(14)

4.3 Visual results of the proposed technique

In the proposed technique, we implemented a block based RDFD technique using the low approximation (LL) sub-band of SWT with overlapping blocks of size 4 × 4 and 8 × 8. In order to show the efficacy of the proposed technique, different experiments are realized with regular and irregular shaped forged regions. The RDF detection results of the proposed technique with overlapping blocks of size 4 × 4 and 8 × 8 are shown in Fig. 5. The visual results shown in Fig. 5 are demonstrating the algorithm is capable of unveiling forgeries in digital images precisely. However, the visual results presented in Fig. 5(5), (7), and (10), exhibit the block size 4 × 4 produces more false detection compared to block size 8 × 8. Here, it is important to note that false detection effects the accuracy of the duplication detection technique in terms of ‘p’ and ‘r’.

Fig. 5
figure 5

Visual results of the proposed technique for overlapping blocks of size 4 × 4 and 8 × 8

4.4 Comparison of accuracy performance

The duplication detection results of the proposed technique are compared with state-of-the-art techniques [8,9,10], for tampered images from the CoMoFoD dataset as described in Section 4.1. The accuracy of the proposed technique is measured through ‘p’ and ‘r’ and to visualize the overall accuracy of the proposed technique F 1 score is also computed as shown in Figs. 6 and 7. In our experiments, all the input images are tested to evaluate the effect of different overlapping blocks (4 × 4 and 8 × 8) for detecting the forgeries. The experimental results demonstrate that the performance of block size 4 × 4 is lower in terms of ‘p’ and ‘r’ as compared to block size 8 × 8.

Fig. 6
figure 6

Detection accuracy of forged images with state-of-the-art technique [8] for block size 4 × 4

Fig. 7
figure 7

Detection accuracy of forged images with state-of-the-art techniques [8,9,10], for block size 8 × 8

The overlapping block size 4 × 4 identified the duplicated regions precisely. While a large number of image regions have been identified incorrectly as duplicated, it is also observed that the smaller block size increases similarity between image blocks, thereby increasing false matches during the detection process. Therefore, smaller block size affects the detection accuracy of the RDFD technique in terms of ‘p’. On the contrary, overlapping block size 8 × 8 produced lower number of false matches as compared to block size 4 × 4. Therefore, block size 8 × 8 can perform more precisely for detecting the duplicated regions in terms of ‘p’.

The detection of duplicated regions also affects the detection accuracy in terms of ‘r’. It is observed that the overlapping block size 4 × 4 can produce larger accuracy in terms of ‘r’. Due to the fact that small sized overlapping block can identify duplicated regions accurately. Moreover, small sized overlapping block decreases the number of false negative that is duplicated regions falsely missed in the process of duplication detection. The detection accuracy in terms of ‘r’ for block size 8 × 8 is relatively lower than the block size 4 × 4 where if the regions are smaller in size than block size 8 × 8. For the analysis of overall detection accuracy, F 1 score is adopted for 4 × 4 and 8 × 8 overlapping block sizes. F 1 scores indicated that the overall accuracy of overlapping block size 8 × 8 is higher as compared to overlapping block size 4 × 4.

Figure 6 exhibit that the proposed technique has higher accuracies in detecting the duplicated regions in comparison to the technique of Alkawaz et al. [8] for block size 4 × 4. Furthermore, the plot of F 1 scores in Fig. 6 illustrate that the overall accuracy is greater than 86% in most of the cases. Figure 7 also demonstrates the similar response that the proposed technique has higher accuracies in detecting the duplicated regions in comparison to the techniques of Alkawaz et al. [8], Zimba and Xingming [9], and Hayat and Qazi [10] for block size 8 × 8. The plot of F 1 scores in Fig. 7 shows that the overall accuracy is greater than 91% for all the cases.

It is evident from the results given in Figs. 6 and 7 that the proposed technique outperformed DCT [8], DWT and PCA [9], and DWT and DCT [10] in terms of both the ‘p’ and ‘r’, due to the following reasons: a) the first order moment based features computed over the low approximation (LL) components of SWT are more discriminative compared to DCT [8], DWT and PCA [9], and DWT and DCT [10] based features, for that reason, decreases the occurrence of false positive and false negative, b) the post-verification process of the proposed technique is more capable of filtering out falsely matched identical block pairs. The superiority of the proposed technique is quite obvious with respect to the overall accuracy (F 1 scores) as can be observed from Figs. 6 and 7. The prominence of the proposed technique is also quite glaring with respect to the statistical results tabulated in Tables 3 and 4. As can be seen from the tables, the recall values of the proposed technique and the reference techniques are comparable for different block sizes. However, the precision values for different block sizes of the proposed technique are higher than that of DCT, DWT and PCA, and DWT and DCT, that demonstrates the strength of the proposed technique as the false detection rate is very low.

Table 3 Comparison of average detection accuracy for block size 4 × 4
Table 4 Comparison of average detection accuracy for block size 8 × 8

5 Conclusion

This paper has presented an efficient and effective technique for detecting duplicated regions in digital images through stationary wavelet transform based features. This paper mainly investigates the affect of different block sizes such as 4 × 4 and 8 × 8 for RDFD in digital images. The results of the experiments showed that the overlapping block size 4 × 4 produce more false detection thereby r affecting the accuracy performance of the algorithm. On the contrary, the overlapping block size 8 × 8 impressively performed better for RDFD in terms of ‘p’, ‘r’ and F 1 score. The proposed technique not only reduces the false detection, but also uses reduced length of feature vector which helps in improving the execution time of the algorithm. The experimental results are also compared with state-of-the-arts [8,9,10] in the domain of RDFD. The results demonstrate that the DCT [8], DWT and PCA [9], and DWT and DCT [10] based features performed poorly, while the proposed moment of first order based features exhibited good performance as discussed in Section 4.4. It is also concluded that accuracy performance of the size of overlapping blocks is influenced by the size of the duplicated regions, the distance measure between the duplicated regions represented by feature vectors and the threshold value used in the algorithm.