# A Robust Time Efficient Watermarking Technique for Stereo Images

Authors: M. A. Abdou; A. A. Saleh
Journal: Journal of Computational Engineering
 (2015)

---

## Abstract

Stereoscopic and multiview imaging techniques are used for reproducing a natural or real world scene. However, the fact that more information is displayed requires supporting technologies to ensure the storage and transmission of the sequences. Beyond these supports comes watermarking as a desirable alternative solution for copyright protection of stereo images and videos. This paper introduces a watermarking method applied to stereo images in wavelet domain. This method uses a particle swarm optimization (PSO) evolutionary computation method. The aim is to solve computational complexity problems as well as satisfy an execution time that complies with normal PCs or smart phones processors. Robustness against image attacks is tested, and results are shown.


---

## Body

## 1. Introduction

The fast development of communication technology and the exponential increase of Internet users have made the protection of intellectual property rights and the prevention of reproducing original contents a very challenging issue. Image detected by two-dimensional camera contains no depth information. However, in many systems we need depth information, for example, in automated map making, or in robotic vision and target tracking [1]. The stereo imaging system uses two or more spatially separated cameras, as shown in Figure 1. The depth information could be extracted from the differences. Stereo imaging system uses conventional lenses and digital cameras; thus acquired images could be processed in a similar way to digital images.Figure 1
Stereo imaging camera layout.Stereo Image Geometry. Stereo image geometry [2] is shown in Figure 2. Assume the optical axis of the two cameras is parallel and separated by a distance S. If an object P is to be captured, consider P located at distance X0 from the axis of one camera and at distance X1 from the optical axis of the other. The images of P are located at distances x0 and x1 from the lens axes of both cameras. Image geometry could be summarized as follows [3]:(1)x0u=X0v,x1u=X1v,where u is the distance from the lens to the detector plane, assumed to be the same with both cameras. The locations of the two images of P are given:(2)x0=uX0v,x1=uX1v.Assume that optical axis of the two cameras is separated by S:(3)X1=X0+S.Thus(4)x1=x0+uSv.Solving for v,(5)v=uSx0-x1=uSΔx.Assume that the lens focal length is f; the position of the object and image planes is given by the Gaussian lens formula:(6)1u+1v=1f.However, in most practical systems v≫u, the approximation that u≈f can also be considered: v≈fS/Δx.Figure 2
Stereo image geometry.Consideringz the distance from the image plane to object plane, that is, z=u+v, then a final expression for the distance from the image plane to the point P is given as(7)z=f1+SΔx.In stereo imaging, accuracy is also an important issue. If an error of δx in Δx and error in the depth measure of δv occurred,(8)v=v0±δv,Δx=Δx0±δx.The ideal distance from the object point P to the lens is given by(9)v0=uSΔx0.δv could be expanded in terms of δx using Taylor expansion(10)δv=uSΔx02δx.Substituting for Δx0, we get that(11)δv=v02uSδxwhich shows that for a fixed S and δx then the error in the depth measurement rises as the square of distance from the camera. So to get good depth resolution you need a large S and so large camera separation, but also for distant object we expect a poor depth resolution.2D Images Watermarking. 2D digital image watermarking is usually based on a pattern of bits inserted within the image or video signal that helps to pursue the file’s copyright information [4, 5]. Two important criteria are to be maintained: the embedded watermark should not affect the image quality (i.e., watermark should be totally invisible) and the watermark should be robust to common image attacks (i.e., lossy compression, linear or nonlinear filtering, cropping, noise, etc.) [6, 7]. Watermarking techniques are classified into two classes according to the need of the presence of the original image or not. Furthermore, most common watermarking methods use an additive watermark; that is, the watermark is added either to the image pixels in the spatial domain or to the coefficient in the transform domain. Watermarking in the transform domain gained a great importance in the previous years due to problems of dealing with raw signals. One of the remarkable transforms in the area of image processing and computer vision is the discrete wavelet transform (DWT). The DWT can be implemented using wavelet filters and downsamplers to reach four quadrants: approximation subband (LL), horizontal detail subband (LH), vertical detail subband (HL), and a diagonal detail subband (HH). This process can be repeated to the approximation subband to generate the level 2 wavelet coefficients. The process continues according to the required application [8].Aslantas et al. [9] introduced a technique that uses a fragile watermarking method based on the discrete cosine transform (DCT) and Genetic Algorithm (GA). The DCT has a slightly high degree of complexity in the calculations and the GA process needs long time to converge. Moreover, the watermarked images did not resist certain attacks like cropping and noise attack. In [4] a robust watermarking method was presented. The algorithm used the DWT environment to embed the watermark and the particle swarm optimization (PSO)—applied to raw (special domain) data—to reach invisible watermark effects. This method tried to overcome problems that emerged in [9]; and the authors assumed that using DWT and PSO instead of DCT and GA leads to better translation map, that is, matrix where the watermark bits were embedded. The PSO algorithm is summarized in Figure 3 [10].Figure 3
PSO algorithm.In [11] Hwang et al. introduced a stereo watermarking scheme based on DWT where the watermark is embedded in one of the two images (right) and extracted from the same image. The paper focused on a comparison between DCT and DWT transform performance to ensure the improvement when using the DWT. Another important method presented a new watermarking scheme designed to reach the trade-off between transparency and robustness [12]. This method was evaluated on two stereoscopic image corpora: natural image and medical data. However, the authors did not consider attacks within the stereo images.In a previous work [13], we developed a technique based onHwei-Jen Lin’s method for 2D images. The algorithm was tested and results showed good achievement of execution time while obtaining acceptable PSNRs. This paper extends the 2D algorithm presented in [13] to a modified algorithm suitable for stereo images. Moreover, different measures are used to prove the robustness of this modified algorithm to image attacks. Our goal is to achieve high image quality, better execution time, and more robustness against attacks without increasing complexity.The paper is organized as follows: Section1 gives an introduction, Section 2 describes the proposed stereo images watermark algorithm, Section 3 gives image results and moves to image attacks and robustness of the proposed work, and finally Section 4 gives the conclusion.


## 2. Stereo Images Watermarking Algorithm

Stereo photo maker is a free stereo image editor/viewer used with all operating systems. The algorithm is executed on a PC with the following specifications: operating system: Windows 8 Pro 64-bit; processor: Intel (R) Core (TM) i7-3632QM CPU @ 2.20 GHz (8 CPUs); memory: 6144 MB RAM. Figure4 shows stereo image maker software.Figure 4
Stereo image maker.The watermarking technique could be summarized in the following steps:(a)
Decompose the stereo image into its left and right images (each of size256×256).(b)
Apply one-level DWT decomposition to the left and right input images.(c)
Divide the binary watermark image (of size64×64) into separated squared blocks (2×2).(d)
Extract the HL subband of each image, and divide it into separated squared blocks of size4×4.(e)
Embed the four watermark bits into the LSBs of the four diagonal HL coefficients, as shown in Figure5.(f)
The PSO is used to train and search the optimal translation map for every squared block:(12)HLm,n=CeilHLm,n,MAPm,n=1FloorHLm,n,MAPm,n=0.(g)
Apply Inverse DWT to the embedded image.(h)
Calculate the round map (RM) from the following:(13)RMi,j=1,IDWTi,j-floorIDWTi,j≥0.50,otherwise.(i)
Then the watermarked imageIADJ is calculated using the round map from the following rules:(14)IADJi,j=CeilIDWTi,j,roundMapi,j=1FloorIDWTi,j,roundMapi,j=0.(j)
Finally, the stereo image is formed from both left and right watermarked images.The PSO [14], as the decision support algorithm, starts by creating the random swarms of particles. Every particle is represented as a string, Cik=ci1ci2⋯cim, i=1,2,…,d, where d is the swarm size (number of particles). The particle size is the same as that of the translation map (64). The population size is “d” set to 80, and the maximum number of iterations is taken equal to 10. The position and velocity of each particle are updated till all the 256 squared blocks of IDWT have reached their best translation map. In our previous work [13], PSO was used to find the best DWT coefficients in HL subband for embedding the watermark sequence. An optimal translation map was reached using PSO in extremely efficient execution time. The proposed WT domain watermarking technique [13] reduced time in watermark embedding and extraction by140% and increased PSNR by10% when compared with [4].Figure 5
Watermarking algorithm flow graph.To extract the embedded watermark, the stereo watermarked image is decomposed into its two left and right images. The DWT is applied; HL subband coefficients are where the watermark is embedded.


## 3. Results

Ten stereo images case studies (each decomposed into left and right images) are entered to the proposed system. For each stereo image three different watermarks are applied, resulting in a total of 30-image framework. Statistical measurements, Mean Square Error (MSE), Peak Signal to Noise Ratio (PSNR), and Normalized Correlation (NC), are used to validate the system’s performance. Tables1 and 2 demonstrate two of the tested cases. From Table 1, it is important to verify that the PSNR has reached 56.6 db for the stereo image, while the MSE is about 0.1 and the normalized correlation is found to be 0.3. Embedding and extraction time has reached 0.8 seconds on the normal PC which is acceptable. In Table 2, the same results are obtained except that the PSNR has dropped slightly to 56.4 db.Table 1
Stereo image watermarking measures, Case  1 with watermark 1.
The left and right image after watermarking process
Time (embedding and extraction) in seconds
0.81165
0.80791
Time using method in seconds [4]
66.2345
65.2435
PSNR between right and left (db)
57.6392
57.6535
PSNR by means of method in (db) [4]
57.9900
57.9835
Extracted watermark
NC (unattached)
0.32788
0.3335
The watermarked stereo image
PSNR stereo image (db)
56.5606Table 2
Stereo image watermarking measures, Case 2 with watermark 2.
The left and right image after watermarking process
Time (embedding and extraction) in seconds
0.83231
0.79982
Time using method in seconds [4]
64.6450
63.4225
PSNR by means of the proposed method (db)
57.5898
57.7922
PSNR by means of method in (db) [4]
58.2010
58.4322
Extracted watermark
NC (unattached)
0.31958
0.30981
The watermarked stereo image
PSNR stereo image (db)
56.4371


### 3.1. Noise Attack

Noise affects images for many reasons. During generation, transmission, or processing images could undergo severe attacks. Watermarks are also affected by noise and sometimes it is a challenge to ensure extraction of the correct watermark without being misjudged due to noise. Stereo images contaminated with noise are to be studied using our proposed algorithm and with that presented in [8]. Noise densities ranging from 0.01 to 0.1 are studied and results are registered. The proposed technique shows remarkable withstanding to noise especially for noise densities less than 0.05.


### 3.2. Cropping Attack

Cropping may be the cause of different image processing instrumentation errors. Horizontal and/or vertical cropping are tested. Results are shown in Table4.


### 3.3. Compression Effect

It is evident that images or videos could not be saved or transmitted in a raw form. Compression comes as an essential way to deal with images. Table5 shows the effect of JPEG compression on images and watermarks using the proposed technique.From the obtained results, it could be concluded that the proposed WT-PSO with translation map method has given high PSNR, minimum time, and acceptable watermarking extraction compared to time domain technique. Furthermore, the proposed algorithm withstands image attacks in stereo images. Tables1 and 2 show that the PSNR has a slight difference between both techniques; however, execution time has a great impact difference. Tables 3 and 4 prove that both techniques succeeded watermark extraction, when exposed to noise and cropping attacks. Table 5 gives a remarkable improvement: the proposed method watermark extraction while JPEG compression is successful, while the method proposed in [8] failed during extraction in stereo images.Table 3
Noise attack effect on stereo images using two different techniques at two noise densities.
Watermarked noisy stereo image at noise density =0.01
The left and right image obtained after noise attack
Extracted watermark using the proposed method
Extracted watermark by means of method in [4]
Watermarked noisy stereo image at noise density =0.05
The left and right image obtained after noise attack
Extracted watermark using the proposed method
Extracted watermark by means of method in [4]Table 4
Vertical and horizontal cropping attacks.
Stereo image with vertical cropping
Left and right images after cropping operation
Extracted watermark using proposed method
Extracted watermark using method in [4]
Stereo image with horizontal cropping
Left and right images after cropping operation
Extracted watermark using proposed method
Extracted watermark using method in [4]Table 5
JPEG compression attacks.
(a)
Watermarked images before and after compression
Before compression
192 KB
After compression
17.3 KB
(b)
Left and right images for compressed image
Left and right images
Extracted watermark using proposed method
Extracted watermark [4]
Failed
FailedWhen talking about algorithm complexity, the order of complexity does not change since using PSO in spatial domain or in frequency domain does not affect the order of complexityO(n2). MATLAB cyclomatic complexity has been calculated based on image sizes and iterations used to execute the whole code. Studies show a correlation between a code cyclomatic complexity and its testability. This means that in codes with higher complexity there exists a high probability of error when fixing, enhancing, or refactoring the code. Results show that MATLAB complexity is approximately the same in both the proposed and the compared algorithms.


## 3.1. Noise Attack

Noise affects images for many reasons. During generation, transmission, or processing images could undergo severe attacks. Watermarks are also affected by noise and sometimes it is a challenge to ensure extraction of the correct watermark without being misjudged due to noise. Stereo images contaminated with noise are to be studied using our proposed algorithm and with that presented in [8]. Noise densities ranging from 0.01 to 0.1 are studied and results are registered. The proposed technique shows remarkable withstanding to noise especially for noise densities less than 0.05.


## 3.2. Cropping Attack

Cropping may be the cause of different image processing instrumentation errors. Horizontal and/or vertical cropping are tested. Results are shown in Table4.


## 3.3. Compression Effect

It is evident that images or videos could not be saved or transmitted in a raw form. Compression comes as an essential way to deal with images. Table5 shows the effect of JPEG compression on images and watermarks using the proposed technique.From the obtained results, it could be concluded that the proposed WT-PSO with translation map method has given high PSNR, minimum time, and acceptable watermarking extraction compared to time domain technique. Furthermore, the proposed algorithm withstands image attacks in stereo images. Tables1 and 2 show that the PSNR has a slight difference between both techniques; however, execution time has a great impact difference. Tables 3 and 4 prove that both techniques succeeded watermark extraction, when exposed to noise and cropping attacks. Table 5 gives a remarkable improvement: the proposed method watermark extraction while JPEG compression is successful, while the method proposed in [8] failed during extraction in stereo images.Table 3
Noise attack effect on stereo images using two different techniques at two noise densities.
Watermarked noisy stereo image at noise density =0.01
The left and right image obtained after noise attack
Extracted watermark using the proposed method
Extracted watermark by means of method in [4]
Watermarked noisy stereo image at noise density =0.05
The left and right image obtained after noise attack
Extracted watermark using the proposed method
Extracted watermark by means of method in [4]Table 4
Vertical and horizontal cropping attacks.
Stereo image with vertical cropping
Left and right images after cropping operation
Extracted watermark using proposed method
Extracted watermark using method in [4]
Stereo image with horizontal cropping
Left and right images after cropping operation
Extracted watermark using proposed method
Extracted watermark using method in [4]Table 5
JPEG compression attacks.
(a)
Watermarked images before and after compression
Before compression
192 KB
After compression
17.3 KB
(b)
Left and right images for compressed image
Left and right images
Extracted watermark using proposed method
Extracted watermark [4]
Failed
FailedWhen talking about algorithm complexity, the order of complexity does not change since using PSO in spatial domain or in frequency domain does not affect the order of complexityO(n2). MATLAB cyclomatic complexity has been calculated based on image sizes and iterations used to execute the whole code. Studies show a correlation between a code cyclomatic complexity and its testability. This means that in codes with higher complexity there exists a high probability of error when fixing, enhancing, or refactoring the code. Results show that MATLAB complexity is approximately the same in both the proposed and the compared algorithms.


## 4. Conclusion and Future Work

An algorithm for stereo image watermarking has been developed. The algorithm applies PSO in wavelet domain based on translation map to better embed the watermark in both left and right images. Obtained results were compared withHwei-Jen Lin’s method. Remarkable improvement in execution time has been obtained; that is, the proposed WT domain watermarking method has reduced timein watermark embedding and extraction by approximately150%. Furthermore, more robustness, especially in compression attack, has been shown. Finally, the proposed algorithm has not increased either the order of complexity or the code cyclomatic complexity.In our future work, comparison with other efficient methods known in the literature will be performed and other types of attacks should be considered.



---

*Source: 964385-2015-07-28.xml*