Reversible Watermark Algorithm Based on the Diamond Pixel Pairs Complementary Embedding

Zhengwei Zhang, Fenfen Li, Xiu Li, Yu Liu, Xinlei Zhang, Shenghua JinResearch Square 2023

Abstract

To enhance the invisibility of existing reversible watermarking algorithms and improve the embedding capacity, a reversible watermarking algorithm based on diamond pixel pairs complementary embedding is proposed. To prevent pixel value overflow, the carrier image is preprocessed and divided into blocks first. Then the pixel blocks are divided into two half-planes, gray and white. Finally, the watermark is embedded in the horizontal and vertical directions: the target pixel in the smooth pixel block and the 4 reference pixels in the cross neighborhood are subtracted, and the histogram is constructed according to the difference value. The first embedding is performed in the gray half-plane using the histogram shift method, and then the second embedding is performed in the white half-plane. The same method is used in the vertical direction to embed to balance the distortion caused by the horizontal embedding process. The experimental results show that under the same embedding capacity, the mean PSNR (Peak Signal-to-Noise Ratio) of this algorithm is 6.92 dB higher than that of the non-complementary embedding scheme; compared with other related algorithms, under the same PSNR value, this algorithm has better embedding performance.

Introduction

In sensitive fields such as medical imaging, satellite photography, and military intelligence, maintaining the absolute integrity of digital assets is critical. Traditional digital watermarking techniques often introduce permanent alterations to an image. Reversible Data Hiding (RDH) addresses this by allowing users to extract hidden data and perfectly reconstruct the original "cover" image. The primary challenge in RDH is the "capacity-distortion" trade-off: hiding a large volume of data without introducing noticeable visual artifacts. This paper proposes a novel approach using "diamond pixel pairs" and a complementary embedding strategy to push the boundaries of image fidelity in RDH.

Methodology

The proposed algorithm utilizes a multi-stage pipeline to optimize both prediction accuracy and distortion compensation.

Preprocessing and Block Division

To ensure perfect reversibility, the algorithm first identifies pixels at the extreme ends of the grayscale (0-2 and 253-255) that might "wrap around" during embedding. These are adjusted, and their original states are recorded in a location map. The image is then divided into 8x8 blocks, which are prioritized for embedding based on local smoothness.

Diamond Pixel Pair Prediction

A core innovation of this method is the diamond-shaped neighborhood predictor. Instead of relying solely on adjacent horizontal or vertical neighbors, this approach considers four reference pixels in a cross shape plus diagonal elements. This configuration captures directional features like edges and slopes more effectively, resulting in smaller prediction errors and, consequently, less distortion.

The diamond pixel arrangement and prediction neighborhood illustrated on the Lena test image.

Complementary Embedding Strategy

The algorithm employs a checkerboard partitioning scheme, dividing pixel blocks into gray and white half-planes. This allows one set of pixels to serve as stable references while the other set is modified during the embedding process.

Checkerboard partitioning and scanning sequence used to organize pixel blocks for data embedding.

The "complementary" aspect involves a two-pass embedding process. Data is first embedded in the horizontal direction. Subsequently, a second embedding pass is performed vertically, specifically designed to "offset" the pixel value shifts introduced during the first pass. This balancing act significantly reduces the overall visual impact of the watermark.

Experimental Results

The algorithm was evaluated using standard 512×512 grayscale test images from the USC-SIPI database, including "Lena," "Plane," and the high-texture "Baboon."

  • Superior Image Quality: Under identical embedding capacities, the proposed algorithm achieved a mean PSNR 6.92 dB higher than non-complementary schemes.
  • High Fidelity: For smooth images like "Plane," the PSNR reached 63.29 dB, making the watermark virtually indistinguishable from the original.
  • Texture Resilience: Even on complex images like "Baboon," the algorithm maintained a PSNR of 55.51 dB, outperforming several state-of-the-art methods.
  • Perfect Reversibility: In all experimental cases, the original carrier image was 100% restored after watermark extraction.

Conclusion

By combining a diamond-shaped prediction neighborhood with a complementary horizontal-vertical embedding strategy, this algorithm offers a significant improvement in the invisibility of reversible watermarks. While the method currently faces a capacity ceiling due to its reliance on smooth regions, future work will focus on refining the predictor and exploring machine learning to identify even more optimal embedding locations.

Summary updated

BibTeX
@inproceedings{zhang2023reversible,
  author = {Zhengwei Zhang and Fenfen Li and Xiu Li and Yu Liu and Xinlei Zhang and Shenghua Jin},
  title = {{Reversible Watermark Algorithm Based on the Diamond Pixel Pairs Complementary Embedding}},
  booktitle = {Research Square},
  year = {2023},
  doi = {10.21203/rs.3.rs-3416329/v1},
}
Figure