1. Introduction
Modern widespread use of electronic devices and the popularity of social media allows people to easily obtain and share digital images in the manner they prefer. However, at the same time, the improvements in digital image processing software allows anyone to freely alter digital images. After an attacker has modified an image, the authenticity and integrity of the information in that image may be compromised. When an image is maliciously falsified, the top priority in the image processing field is to be able to restore the original image to the greatest extent. To solve this problem, digital image watermarking technology was invented. Digital watermarking capitalizes on the redundancy in digital images to embed hidden information, namely, a watermark, into the image. There are three kinds of watermarks: fragile watermark, semi-fragile watermark and robustness watermark. Among them, fragile watermark is often used in image tampering detection due to its sensitivity [
1]. Thus far, scholars have carried out numerous studies in this field and achieved fruitful results, some of which are listed below.
Singh D. and Singh S.K. [
1] proposed a fragile watermarking scheme in which the watermark is generated from the five most significant bits (MSBs) of each pixel and embedded into the three least significant bits (LSBs) corresponding to the mapped block. Shivani et al. [
2] introduced a self-recovering fragile watermark scheme that embeds 10-bit of recovery data and 2-bit of authentication data into the LSBs of the corresponding mapped block. This method has a high capability for tampering detection and can recover an image effectively. However, it is not suitable for images containing random noise or that have undergone JPEG compression. Roy and Pal [
3] proposed a multiple watermarking method that had an improved peak signal-to-noise ratio (PSNR) but that value was achieved at the cost of higher computational complexity. EI’arbi and Amar [
4] suggested an image authentication algorithm with recovery capabilities based on neural networks. The methods in References [
1,
2,
3,
4] are all based on discrete cosine transforms (DCT). Javier et al. [
5] introduced a watermark scheme for authentication and self-recovery. Inverse halftoning techniques and median filtering were also used to improve the quality of the recovered image. However, to prevent image tampering attacks, both [
4] and [
5] take only JPEG compression into account.
Al-Otum [
6] proposed a semi-fragile watermarking technique based on a modified discrete wavelet transform quantization-based algorithm. The proposed method is suitable for grayscale image authentication and for tamper detection but was not tested for its ability to handle geometric attacks. Wang et al. [
7] developed a three-level strategy to improve tamper detection accuracy and introduced a new block classification scheme based on singular value decomposition (SVD). The length of the generated recovery watermark differs within different blocks. Compared to References [
8,
9], this method achieved substantial improvements in tamper detection accuracy and recovery ability.
Using self-recovery blocks, Dhole and Patil [
10] proposed a modified fragile watermarking scheme in which the detected tampered blocks were used to localize the erroneous regions of the tampered image, while the error-free blocks were used to recover the tampered blocks by applying block chaining. However, room still exists to improve image recovery. Dadkhah et al. [
11] presented an SVD-based algorithm that used active watermarking that achieved both satisfactory self-recovery capability and was efficient at tamper detection. However, further research needs to be carried out for situations in which the recovery information is damaged by using the block-neighboring characteristic. Based on SVD, Zhang et al. [
12] introduced a pixel-based fragile watermarking algorithm for image authentication. To guarantee the security of the proposed method, they used the Arnold transform twice during the watermark embedding process.
To distinguish the image block type, Hsu and Tu [
13] introduced the concept of smoothness; based on the smoothness value, different watermark embedding, tamper detection and recovery strategies were applied. However, in terms of recovery capability, this method is highly applicable only to images with low variation. Sarreshtedari et al. [
14] introduced a self-embedding method for digital images in the JPEG domain that applies source coding to recover the lost content using hierarchical trees, by which set partitioning is performed, and applies low-density parity check coding algorithms. Later, Fan and Wang [
15] noted that the scheme in Reference [
14] is ineffective when the tampering involves the channel parity bits; in such cases the method will use the wrong channel parity bits to perform channel decoding. They also indicated that the scheme had no ability to detect tampering. Lu and Liao [
16] introduced a novel multipurpose watermarking scheme that simultaneously embeds both robust and fragile watermarks. However, their approach requires further exploration to eliminate the need to store and retrieve the mapping file and the hidden watermarks. Lee and Lin Reference [
17] proposed an effective dual watermark scheme that detects tampered regions hierarchically. A secret key and a public mixing algorithm are used for tamper recovery. However, this method does not perform as well when the tampered area is trivial as when it is large. Qian et al. [
18] proposed a novel fragile watermark scheme that uses a dual domain watermark for authentication, tamper detection and image recovery. Later, in Reference [
19], Chetan and Shivananda introduced a method that improves the visual quality of the recovered image and can detect the tampered area accurately. In addition, according to the objective index PSNR, its recovery capability outperforms the method in Reference [
18].
To enhance the recovery capability of restored images, this paper presents an improved method. Based on the good performance of SVD and edge detection, variable watermark information can be generated corresponding to block classifications. During image recovery, a median filter is applied to smooth and remove noise, followed by three operations on the original restored image that produce a satisfactory effect. Therefore, in the proposed method, SVD and edge detection are used for tamper detection; then, median filtering is used during image recovery. Finally, the corresponding pixels of the original restored image are replaced with the best results among the three operations.
The remainder of this paper is organized as follows.
Section 2 provides a brief introduction to the method in Reference [
7]. In
Section 3, the proposed method is discussed in detail.
Section 4 reports the experimental results and provides analyses. Finally, the paper is concluded in
Section 5.
4. Experimental Results and Analysis
To avoid occasionality, we put the proposed method into practice to test its performance under six different tampering conditions. In this experiment, we adopted the methods proposed by Tong et al. [
8], Chen et al. [
9] and Wang et al. [
7] for comparison purposes. Eight test images from the CVG-UGR image database [
22] are displayed in
Figure 6: all of which have a size of
. We executed our experiments on MATLAB R2016a.
To ensure fairness and consistency, we conducted objective assessments of the experimental results as measured uniformly by PSNR and structural similarity (SSIM) [
23]. The PSNR value reflects the differences in corresponding pixels between two images. The larger the PSNR value is, the better the objective quality of the result is. When the PSNR exceeds 35 dB, humans are unable to discern the difference between two images. However, the PSNR value does not completely reflect with the subjective effect. Therefore, we also introduce the SSIM value, which measures image quality from three aspects: brightness, contrast and structure. Similar to PSNR, the SSIM value is positively correlated with the objective quality.
4.1. Performance in Watermark Embedding
To test the differences between SVD and edge detection, the proposed method and the method with only SVD [
7] are compared along four aspects: the number of smooth blocks
, the number of texture blocks
, the value of PSNR in dB and the value of SSIM. The results are listed in
Table 1.
The proposed method marks more texture blocks with the implementation of edge detection, which also proves that SVD cannot extract all the edge information. As the number of texture blocks increases, more information can be stored in the watermarks; therefore, the PSNR values generally show a downward trend. However, all the values exceed 35 dB, which means that the information is invisible. The SSIM value indicates the similarity between the watermarked image and the original image. Similar to the PSNR, the higher the SSIM value is, the better the objective quality of the results is.
4.2. Analysis of Different Tampering Test Results
In this section, the edge detection and filtering operation performances are tested. For comparison, the differences among the four methods are as follows: the method in Reference [
8] uses only chaotic mapping; the method in Reference [
9] uses variable watermarks extracted from roughness information; the method in Reference [
7] extracts texture information and uses neighborhood adjustment and the proposed method extracts texture and edge information and also adds the final filtering operation. Due to the diversity of images and tampering operations, the tampered regions have different characteristics. Some mainly contain smooth information, while some are full of texture details. To analyze the adaptability and performance of the methods under different conditions, different images are selected and displayed in the following subsections.
4.2.1. Text Addition Attack
A text addition attack introduces some of textual information to a watermarked image—the word “LENA” in this experiment. The images in
Figure 7 show the experimental results and
Table 2 gives the PSNR and SSIM values of the four different methods.
By comparing the four images listed in
Figure 7e–h, it is obvious that tamper detection is more accurate when using watermarks with texture information. However, the addition of edge information causes tamper detection more sensitive to edge changes, resulting in a higher false alarm rate. From the recovery results shown in
Figure 7i–l, it can be seen that the final results of [
8,
9] do not fully recover the tampered region. But with neighborhood adjustment, both the proposed method and the method in Reference [
7] restore the detection area without any visible missing information. However, the PSNR and SSIM values in
Table 2 show that the quality of the final image is slightly better after the filtering operation.
4.2.2. Copy-Move Attack
A copy-move attack involves copying part of an original image and moving it into another image.
Figure 8 displays the specific process and
Table 3 gives the PSNR and SSIM values of the different methods. As shown in
Figure 8c, a part of the sky is copied from image Car1 and moved into the top of the watermarked Goldhill image. Based on
Figure 8e–h, the tamper detection performance is essentially the same as that of the text addition attack and indicates that texture information and neighborhood adjustment play a significant role in image authentication and tamper location discovery. Although edge information is also an important part of an image, it reduces the detection accuracy and increases the redundancy. Compared with the other three recovery results in
Figure 8i–k, the final image of the proposed method visually appears more similar to the watermarked image. Moreover, the values listed in
Table 3 objectively demonstrate its quality. The tampered area consists of a large scale of smooth background at a distance, which is suitable for exploiting the advantages of the median filter. In this case, the image after filtering operation exhibits a better quality.
4.2.3. Splicing Attack
Unlike a copy-move attack, a splicing attack extracts a portion of a watermarked image and then splices it into another watermarked image.
Figure 9 displays the tamper location and recovery results for the different methods and
Table 4 lists their PSNR and SSIM values.
Figure 9c shows that a car from the watermarked image Car1 was inserted into the same position in another watermarked image, Car2. In
Figure 9e, the tamper detection result locates only a portion of the boundary of the tampered region but the other three methods detect the tampered region correctly. This results occurs because the method in Reference [
8] cannot achieve independent block authentication. Comparing the images in
Figure 9j–l and the values listed in
Table 4, the proposed method and the methods of [
7,
9] all achieve high performance; however, the proposed method is the best. The reasons are as follows. In this experiment, the tampered region in the Car2 image contain only smooth information. Therefore, no jagged edges or confused areas affect the recovery quality. In addition, median filtering removes some noises without affecting the edge characteristics, further improving the subjective and objective qualities of the final image.
4.2.4. Image Deletion Attack
An image deletion attack is used to remove part of an image; this operation can be approximately reconstructed after image recovery. The tamper detection and recovery results are shown in
Figure 10 and partially enlarged details are presented in
Figure 11.
Table 5 lists the PSNR and SSIM values of the different methods. As
Figure 10e–l shows, all four methods achieve high tamper location and image recovery performances.
Figure 11 shows some of the differences.
Figure 11a shows some black noise. Compared with
Figure 11b,
Figure 11c presents a clearer visual effect and
Figure 11d has the smoothest edges among all the results. With the threshold adjustment process, several unsuccessfully restored pixels are recovered. Meanwhile, the filtering operation, effectively smooths the jagged edges without confusing their characteristics. However, as shown by comparison values listed in
Table 5, the objective quality of the proposed method does not outperform the best result, obtained by [
7]. This can be explained by the drawback of the median filter. As can be seen in the enlarged images, several details exist in single or small pixel regions that can easily be lost if they are not in the middle. However, this problem can be solved by threshold adjustment to a large extent. In general, the proposed method achieves a better visual effect and a fairly good objective quality compared with the other methods.
4.2.5. Content-Only Attack
A content-only attack is an operation that tampers with the image content without changing the embedded watermark information. After tampering, the watermark information in the image is well preserved. However, the new watermark generated by the tampered image will be different from the original embedded watermark. The results of each method are displayed in
Figure 12 and
Table 6 gives their PSNR and SSIM values.
In
Figure 12c, the airplane stems from the original image Airplane and the 5 MSBs of its information are inserted into the watermarked image Clock. If the authentication watermark is completely irrelevant to the image content, then this type of attack cannot be detected and located, as shown by the detection results in
Figure 12e. Therefore, the three methods shown in
Figure 12f–h all generate watermarks from the image itself. In
Figure 12k–l,
Figure 12k eliminates several of the black noises in
Figure 12i through its neighborhood adjustment, while
Figure 12l has a gap in the dark vertical line on the left due to the filtering operation. The background line in the tampered area interferes with the median filtering operation, making it unable to apply its full advantages. Combining the results of the deletion attack and the content-only attack, we can conclude that while the proposed method improves the subjective quality of the restored image, it is unsuitable for tampered regions containing details within a single pixel or small area.
4.2.6. Large Area Attack
This tamper type is used primarily to test the performance of the filtering operation. The location and recovery results are shown in
Figure 13.
Due to the implementation of chaotic mapping, even though the original image is largely tampered, most of the affected pixels can still be detected and recovered by the watermark information extracted from the corresponding blocks. Moreover, the neighborhood adjustment is used to further recover the tampered area from the neighboring pixel values. This approach generates a fully restored image but with more distortion. As shown in
Figure 13, the proposed method with edge detection can identify all tampered areas. However, just as in the previous attacks, many misjudgments are present.
Figure 13e shows the obvious confusions in the restored region, which is exactly what we want to improve. After the filtering operation, the final result of the proposed method possesses better quality as reflected by the PSNR and SSIM values displayed in parentheses in the corresponding figure captions.
As the enlarged images in
Figure 14 show, due to the median filtering, the woman’s chin, hand and right leg are clearer and contain less noise. Meanwhile, the texture information on the scarf demonstrates that the threshold adjustment can offset the detail loss caused by filtering.
4.3. Selection of Threshold in Filtering Operation
The filtering operation of the proposed method uses an adjustable threshold set to a pixel value. Different values lead to different qualities in the final results. After many tests with different pixels, the optimal threshold value was found to be the range from 110 to 150.
Figure 15 clarifies the relationships of the pixel threshold value to the recovery quality in different tampering experiments, where each image name reflects its relative tampering type. In
Figure 15, the horizontal ordinate represents the pixel threshold, which ranges from 110 to 150 at a step size of 5. On the vertical axis, we label the highest PSNR values both among the methods [
7,
8,
9] and under different thresholds. As shown in
Figure 15, the optimal pixel threshold varies among different images; thus, it should be selected according to different tests. In addition, the PSNR values after the threshold adjustment are close to or even better than those of the previous methods. This result demonstrates that the proposed method can achieve a great visual effect without losing the objective quality of an image.