International Journal of Research and Reviews in Computer Science (IJRRCS) Vol. 3, No. 4, August 2012, ISSN: 2079-2557 © Science Academy Publisher, United Kingdom www.sciacademypublisher.com/journals/index.php/IJRRCS
1768
Stereo Image Watermarking Using Random Least Significant Bit and Arnold Transform Osama Hosam City of Scientific Researches and Technology Applications, Alexandria, Egypt 21934 Email:
[email protected]
Abstract – Security of transferring data through channels has lots of concern especially if the transferred data is important. In stereo images, the scene is reconstructed from pair of images; the resulting is the 3D information which in some applications needs to be transferred through insecure channel. The security is important to protect the data from eavesdropping. We have proposed novel technique to secure the transferring of the 3D data by watermarking the stereo images. The watermark will be the 3D data. First the image will be scrambled by Arnold transform, then the 3D data (Watermark) will be embedded into the stereo images by Random Least Significant Bit watermarking. The watermark will be dispersed over the image. Results showed that our technique successfully protected the 3D when transferred through insecure channel. Keywords – Stereo Image watermarking, Disparity estimation, Correspondence, Stereo Reconstruction
1.
Introduction
Large contents of multimedia applications are distributed through the Internet. If there is no procedure to control their copyright and ownership, it will be easily copied and forged. Stereo watermarking techniques helped to keep the ownership of the documents and enabled network users to transfer data without the fair of illegal coping or hacking. Multiple applications relied on using images to extract the third dimension. Approaches for detecting the third dimension of an image are shape from shading [1], shape from texture [2], shape from motion [3], and shape from stereo [4]. However if it is needed to transfer the 3D data of stereo images, it will be transferred through insecure channel, Figure. 1. This will expose the data to be hacked or stolen in case of eavesdropping. To overcome this problem a verity of algorithms has been proposed in literature.
Figure 1. Stereo Image Watermarking System.
A blind multiple watermarking schemes were proposed [5] to deal with the content protection problem of DIBR 3D images. An object-oriented method for stereo images watermarking has been proposed in [6]. Their scheme has relied on the depth extraction of stereo images to embed the watermark. They have embedded the watermark in wavelet domain by using the quantization index modulation method. Two different stereo image watermarking schemes has been proposed in [7] they have used the disparity map and DCT. The watermark data is embedded into the right image of the stereo pair in the frequency domain by using DCT and the disparity between the left and right stereo images is extracted. Then the disparity data and the left image are transferred together through the communication channel. When received, the watermarked right image is reconstructed from the received left image and the disparity data through the adaptive matching algorithm. Then the watermark is extracted from the right image. The same authors proposed the same technique but with DWT in [8]. Stereo-image coding algorithm using digital watermarking in fractional Fourier Transform (FrFT) and singular value decomposition (SVD) has be proposed in [9]. For the purpose of the security, the original (left stereo) image has been degraded and watermark (right disparity map) is embedded in the degraded image. This watermarked degraded stereo image is processed in an insecure channel. At the receiver's end, both the watermarked image (left stereo image) and watermark images are found by the decoding process. The same procedure in [9] has been applied in [10, 11] but with using Arnold transform [10] to degrade the host image. Also they applied real coded genetic algorithm (RCGA) to estimate the optimal order of Arnold transform and the strength of the watermark to fulfill the required security and robustness. In [11] the host image is degraded by using ZIG-ZAG sequence then the watermark is embedded
Osama Hosam / IJRRCS, Vol. 3, No. 4, pp. 1768-1773, August 2012
1769
by using wavelet decomposition and singular value decomposition, the watermark is optimized by using real coded genetic algorithm. The estimated disparity map in the current stereo watermarking approaches contains mismatches and the security is still vulnerable. The disparity estimation is done in one level with applying the wavelet decomposition which is still not enough to estimate an accurate disparity map. Also, the security can be breached by applying the same sequence of watermark embedding on the host image to extract the watermark. In our approach, we have enhanced stereo watermarking approaches in two ways. First, the disparity estimation is enhanced by applying two levels of correspondence, the features of the stereo images are matched then a dense disparity map is obtained by applying a Wavelet based matching. Second, we have used a random LSB method combined with a key after degrading the host image by using Arnold transform. The host image is degraded and the watermark is embedded “Randomly” by dispersing it all over the host image, this procedure makes it impossible for any hacker to estimate the contents of the image or extract the watermark. In addition the watermark can’t be extracted unless the receiver has the watermarking key. In section 2 we will show our disparity estimation algorithm which done in two levels, Feature based matching and Wavelet based matching. In section 3 we will show how we enhanced the stereo watermarking algorithms by applying the Random LSB watermarking. In section 4 we will show our experimental results. In section 5 we will show our conclusion.
2.1. Feature Based Matching The features will be extracted using the Histogram segmentation. The features which will be extracted from both the right and the left images will be region segments; it will be extracted as follow: Histogram segmentation [13] can be viewed as an operation that involves tests against a function T of the form
2.
Disparity Map Estimation
The disparity for the pair of stereo images is done in two steps; the first step is to extract the feature of the pair of images and then compare these features together, this step is called Feature-based matching [12]. The comparison is done according to specific properties for each feature. The second step is Wavelet-based matching, in this step we are going to make dense matching by comparing the pair of images window by window leading to a more accurate matching. The overall algorithm of disparity estimation is shown in Figure. 2.
T = T [ x, y , p ( x, y ), f ( x, y )]
(1)
where f(x,y) is the gray level of the point (x,y) and p(x,y) denotes some local property of this point, The Histogram of the left and right images is obtained then three threshold values will be selected in the Histogram that will divide the image into four groups g1,g2,g3, and g4 each group contains different gray level region segments [14]. The proposed histogram segmentation can be defined as, ⎧ g1 ⎪g 2 ⎪ Pixl ( x, y ) ∈ ⎨ ⎪ g3 ⎪⎩ g 4
if 0 < f ( x, y ) ≤ T 1 if T 1 < f ( x, y ) ≤ T 2 if T 2 < f ( x, y ) ≤ T 3
(2)
if T 3 < f ( x, y ) ≤ 255
For each group a series of (low, medium and high) resolution images will be created, which is the multiresolution images for each group. It is created by reduction in size by a factor of two using Gaussian convolution filter h(x) [15], 2
h( x) = 2π σAe −2π σ
2 2
x
(3)
where σ is the standard deviation of the Gaussian curve. A binary map for each of multi-resolution images will indicate, for each pixel, whether it belongs to the group or not, as shown by equation (4).
⎧1 g ( x, y ) = ⎨ ⎩0
if f ( x, y ) > T if f ( x, y ) ≤ T .
(4)
Thus the pixels labeled 1 correspond to the region segment, whereas pixels labeled 0 correspond to the background. Finally the open operator of the morphology filter will be applied on the low resolution images for each group to remove the small region segments which may incur errors. The region segments as the feature elements will be used to get the disparity map (it is not the final disparity map). Using the low resolution images for each group the properties for each region will be obtained for the left and right images then the correspondence between regions will be done, finally the disparity map will be obtained. The properties for each region [16] will be: Centroid: find x, y coordinates of the center of the region. The center of the region can be obtained as the half of the height and width of the region. Area, A: can be calculated by counting the number of pixels in the region N −1 N −1
Ai = ∑∑ I i (r , c).
(5)
r =0 c =0
Figure 2. The proposed disparity map estimation algorithm.
where Ai is the area of the region i, and r, c represent the row and column values respectively. Figure. 3 shows how the
Osama Hosam / IJRRCS, Vol. 3, No. 4, pp. 1768-1773, August 2012
1770
correspondence is done by using the Centroid for each region. Perimeter, p is obtained by performing edge detection and counting the “1” pixels. Thinness ratio, T: has a maximum value of 1, corresponding to a circle, and decreases as object gets thinner or perimeter gets more convoluted:
respectively. {AIl , Di Il , i = i,2,3} and {AIr , Di Ir , i =i,2,3} represent their 1-level wavelet decomposition. For each pixel in the left image AIl , the corresponding pixel in the right
⎛ A⎞ T = 4π ⎜⎜ 2 ⎟⎟ ⎝p ⎠
(6)
Irregularity or compactness ratio, 1/T, reciprocal of the thinness ratio. Aspect ratio, also called elongation or eccentricity, ratio of bounding box:
c − c +1 Aspect Ratio = max min rmax − rmin + 1
image is found and then drawing a fixed length window around that pixel and compare it with the corresponding pixel. This type of convolution is done through the horizontal scanning line between both images, also not all the corresponding scan line pixels will be done; only the pixels lie inside the corresponding feature taken form the Feature based matching. The measure which will be used is the SSD (Sum of Squared Deviations) which quantifies the difference between intensity patterns:
C=
(7)
∑ [ AI ( x + ξ , y + η ) − AI ( x + d + ξ , y + η )]
(ξ ,μ )
l
r
AI ( x + ξ , y + η ) ∑ AI ( x + ξ , y + η ) ∑ ξ μ 2
(ξ ,μ )
l
(8)
2
r
( , )
The disparity estimate for a pixel x,y is the one which minimizes SSD error: d(x,y) = arg min C(x,y,d)
(9)
The comparison will be done window by window; SSD will be calculated by calculating the difference between the current window in the left image and all windows on the right image which lie in the corresponding scan line and region. The candidate window will be the window which has the minimum SSD error. Figure 3. Adopting centroid comparison in the correspondence problem, the red points in the left image are the original position of the centroid, the green points in the right image are the centroids of the candidate regions. The rectangles in the right represent the region which contains the candidate regions.
2.2. Wavelet Based Matching After Feature extraction and feature-based matching, we will narrow the search regions for each pixel. The results of the feature-based disparity will be used in Wavelet based matching [11]. For each feature in the left image we are going to use the corresponding feature in the right image to minimize the search range when making Wavelet based matching. There are some advantages of estimating the disparity of stereo images by using wavelet representation • The edge information like the length and orientation of lines which are available in wavelet domain may be used to enhance the disparity estimation. • We are going to use the image after applying wavelet decomposition, this will reduce the image size significantly and save some bits when transmit the disparity map. • Using the coarse to fine estimation in the multiresolution wavelet representation, the disparity will be more efficiently estimated in the wavelet domain. Our main aim is to generate a watermark image by estimating the disparity-image. In this way, we can use this disparity-image as the watermark image. The main advantage is that the computational cost reduces to one fourth in stereo matching. Let I l , I r represent the left and right stereo images
3.
Watermark Embedding and Extraction
When transferring the watermarked image into a secure channel, the watermarked image should be secured. We have used the concept of image degradation in our algorithm, as an example the degradation by using the ZIG-ZAG degradation sequence [11]. We have used Arnold Transform [17] in our algorithm to scramble and degrade the host image. First the left image – The left stereo image will be the host image - will be degraded by applying the Arnold transform, and then the algorithm of Random LSB will be applied to the degraded image. The degraded watermarked image will be safely transferred through a secured channel. When the degraded image is received by an authorized receiver, it will be used to extract the embedded watermark. Also the original image can be restored by applying the inverse Arnold transform which restores the left stereo image to its original state. The proposed watermark embedding and extraction algorithm is shown in Figure. 4
Figure 4. The proposed watermark embedding and extraction.
Osama Hosam / IJRRCS, Vol. 3, No. 4, pp. 1768-1773, August 2012
1771
The Arnold transform is added to the watermarking phase to make it impossible for any hacker to know the contents of the host image or extract its 3D information.
4.1. Image Acquisition Techniques We have used the Object registration device Figure. 5(a) to collect most of our dataset. The Object Registration is a device used to take a stereo pair of an object to be reconstructed into a 3D model. We can take more than one image for the same view. By identifying the zoom properties for each camera and specifying the distance between the pair of cameras we can easily identify the whole parameters which are needed to take a prefect stereo pair.
3.1. Arnold Transform Let N x N is the size of the original image I, N is the dimension of the watermark image. To enhance the security of our system and increase the imperceptibility we process the original image with Arnold Transform to obtain the scrambled image I’. Arnold transform scrambles the original image by splicing and clipping that realign the image pixels. The Arnold transform [18, 19] can be described as
The camera
⎡ x ' ⎤ ⎡1 1⎤ ⎢ '⎥ = ⎢ ⎥ ⎣ y ⎦ ⎣1 2⎦
⎡ x⎤ ⎢ y ⎥ (mod N ) ⎣ ⎦
(10)
The object
where x,y are the coordinates of the pixels in the original image, x’, y’ are the pixel positions of the scrambled image. The transform changes the pixel positions several times. A scrambled image can be generated as follow PxT',+y1' = APxT, y (mod N ) T
(11)
T +1
where APx , y and Px ', y ' are the pixel of the original image and the degraded image respectively. A is the Arnold transform. 3.2. Random LSB Watermarking The main idea of LSB watermark embedding is that precision in many image formats is greater than that perceivable by average human vision Therefore; an altered image with slight variations in its colors will be indistinguishable from the original by a human being, just by looking at it. By using the least significant bits of the pixels' color data to store the hidden message, the image itself is seemed unaltered. A Random LSB embedding algorithm will be used, in which the secret data are spread out among the image data in a seemingly random manner. This can be achieved if both the sender and receiver having the same secret key or share a secure key. This key can be used to generate pseudorandom numbers, which will help extracting the secret image by defining the place and the order in which the secret data is laid out. The advantage of that method is that it incorporates some cryptography concepts that diffuse the secured data. However, it goes beyond just making it difficult for an attacker knows that there is a secret message. It also makes it harder to determine that there was a secret message in the first place. The reason is because the randomness makes the embedded message seem more like noise statistically than in the straight forward embedding method. The combination of Arnold transform and random LSB embedding prohibited steganalysis algorithms to detect the secured data.
4.
Experimental results
In this section we are going to introduce the image acquisition techniques and devices that we have used to collect our dataset and then we present our results for the proposed disparity estimation algorithm and the Random LSB stereo image watermarking technique.
Figure 5. the image acquisition techniques, (a) The Object Registration device. Source: City of Scientific Researches and Technology Applications, Informatics Research Institute, Alexandria, Egypt (b) Aircraft Stereo images
Here we can use one camera to take our stereo pair instead of two. The idea is to take the first picture of the view then we move the camera using the moving parts of the object reg. – notice the arrows in Figure. 5 (a). Then the camera position is changed and we can easily take another image of the same view. In addition, we have used stereo images taken by an Aircraft. Stereo images from an Aircraft are pair of aerial photos taken sequentially. A camera on board an aircraft takes pictures of the Earth at different times and thus from different positions, Figure. 5 (b) 4.2. Disparity Estimation Disparity is estimated in two levels; the first level is Feature based matching. The features are extracted as regions and the properties for each region will be calculated, then a correspondence between the left and right images will be calculated. The second level is the wavelet base level in which the correspondence is done pixel by pixel. Due to the two levels approach we have reduced the correspondence mismatches to its minimum. In Tab. 1 we have presented how our algorithm enhances the matching process, almost all the available disparity estimation algorithms have done the correspondence in one level but in our algorithm we have applied two levels of matching. Table 1. A comparison between our algorithm and the related algorithms with respect to the accuracy of correspondence. Algorithm Quantization and Modulation [6] DCT based [7] DWT based [8] Fractional Fourier transform (FrFT) [9] Genetic Algorithm (GA) [10] Our Algorithm
Number of matching levels 1 level
Mismatches 23 %
1 level 1 level 1 level
21 % 29 % 19 %
1 level
16 %
2 levels
4%
Osama Hosam / IJRRCS, Vol. 3, No. 4, pp. 1768-1773, August 2012
1772
The mismatches can occur if a feature in the left image is assigned to a feature in the right image which is not its correct corresponding feature. Also as mentioned in [4], the increasing of occluded regions will affect the accuracy of matching. The occluded regions are the regions which appear in one image and disappear into the other. In Feature based matching, we have created multi-resolution images by Gaussian Pyramids. We have applied the correspondence on a lower resolution image, since we will need to compare a lower resolution image when making correspondence by applying wavelet decomposition. For example the Pentagon image is 512 x 512, we will create multi-resolution images as (512 x 512, 256 x 256, 128 x 128), also we will apply wavelet decomposition on the original Pentagon image to create 256 x 256 image. So in the first and the second levels, the correspondence will be done on the 256 x 256 images. This way the embedded watermark (disparity map) size will be reduced to half the size of the original image. In Figure. 6 We made a comparison between our disparity estimation method and the related work. We notice how our disparity is more accurate than the other methods. For example in Figure. 6 (b) the table is not appeared as one part, instead just one part of it appeared and the other is hidden due to the shadow of the head. In Figure. 6 (c) we notice some parts around the camera in white color - The white color represents the nearest object and the black color represents the farthest object- it appeared in the disparity map that these parts are near the camera but in fact they are deep in the image.
only know this key, if the image is hacked, the hacker will not be able to extract the watermark, he can’t even know the contents of the image. Our procedure assured 100% secure stereo image watermarking. The PSNR value is used to measure the quality of watermarking in our proposed stereo image watermarking. The PSNR value between host image I and the host image I’ is calculated as
⎛ 255 ⎞ PSNR = 20 log10 ⎜ ⎟ ⎝ RMSE ⎠
(12)
where
RMSE =
[
1 m n ∑∑ I (i, j ) 2 − I ' (i, j) 2 m * n i =1 j =1
] (13)
Lower values of PSNR mean less invisibility of the watermark, while higher PSNR represents better invisibility of the watermark in the host image. In Tab. 2 The image quality after embedding is approximately intact due to the high PSNR. The embedded watermark can be safely watermarked without affecting the image quality, this increased the watermark invisibility. Table 2. The measured PSNR Image Name Image Size Watermarked image size PSNR
Pentagon 512 x 512 256 x 256
Tsukuba 512 x 512 256 x 256
House 128 x 128 46 x 46
Tree 256 x 256 128 x 128
41.1708
42.0021
40.2145
40.8962
Building Random LSB is straightforward, which made our implementation for the proposed algorithm simple. However in the related algorithms they need to implement GA, DCT, DWT, and FFT which complicated the implementation process. The security of Random LSB stereo image watermarking is higher than the related algorithms; we achieved the lowest cost of implementation.
5.
Figure 6. The proposed disparity estimation algorithm results applied on Tsukuba image, (a) The original image (b) the disparity map obtained in [7] (c) disparity map obtained in [9] (d) The disparity map obtained in [6] (e) The disparity map obtained in [10] (f) The disparity map obtained by our proposed approach.
4.3. Random LSB stereo watermarking The host image is first degraded by applying Arnold transform. The degradation process is applied on the host image to hide the contents of the image. When the image is transmitted through insecure channel it will be partially protected since the contents are not known. The host image will be completely protected when the watermark is embedded by applying the Random LSB procedure. The 3D information or the watermark will be embedded randomly by using a key. The transmitter and the receiver
Conclusion
The process of stereo image reconstruction is enhanced by applying two levels of disparity estimation. The first level is comparing each feature in the left image with the features in the right image; the feature-based disparity is used in Wavelet based matching to make denser disparity estimation. The obtained disparity has higher quality than that of the related algorithms. A highly secure stereo image watermarking system has been implemented. The Random LSB is applied together with a key to increase the security of the watermarked images. We have applied our technique on multiple stereo images, the results showed how the technique enhanced the quality of the extracted disparity map and the security of the watermark. In our future work, we will move to watermarking the resulting 3D model by directly embedding data into the 3D model itself. The stereo matching process will be executed and the resulting stereo model will be subjected to watermarking process by changing some of its geometrical and topological features.
Osama Hosam / IJRRCS, Vol. 3, No. 4, pp. 1768-1773, August 2012
References [1] [2]
[3]
[4]
[5]
[6] [7]
[8]
[9]
[10]
[11]
[12]
[13] [14]
[15] [16] [17]
[18] [19]
[20]
Ecker, A.; Jepson, A.D. "Polynomial Shape from Shading", Computer Vision and Pattern Recognition (CVPR), 2010 IEEE Conference DOI: 10.1109/CVPR.2010.5540219 , Page(s): 145 - 152, 2010 Sharma, A.; Namboodiri, A. " Object Category Recognition with Projected Texture”, Computer Vision, Graphics & Image Processing, 2008. ICVGIP '08. Sixth Indian Conference Page(s): 374 – 381, DOI: 10.1109/ICVGIP.2008.62, 2008. Marques, M.; Costeira, J. " Optimal shape from motion estimation with missing and degenerate data” Motion and video Computing, 2008. WMVC 2008. IEEE Workshop Page(s): 1 – 6 DOI: 10.1109/WMVC.2008.4544046, 2008 Osama Hosam, Xingming Sun “Three Dimensional Reconstruction Using Enhanced Shape from Stereo Technique” the proceeding of “ Eight IEEE/ACIS International Conference on Computer and Information Science” pages 627-632, 2009 Yu-Hsun Lin, Ja-Ling Wu. “ A novel blind watermarking scheme for depth-image-based rendering 3D images” Proceedings of the 1st international workshop on 3D video processing, Pages: 39-44. doi: 10.1145/1877791.1877803, 2001 Campisi, P.: Object-oriented stereo-image digital watermarking. Journal of Electron Imaging 17(4), 043024 (2008) Hwang, D.C., Bae, K.H., Lee, M.H., Kim, E.S.: Real-time stereo image watermarking using discrete cosine transform and adaptive disparity maps. In: SPIE Proc. on Multimedia Systems and Applications VI, Orlando, Florida, USA, vol. 5241, pp. 233–242 (2003) wang, D.C., Bae, K.H., Lee, M.H., Kim, E.S.: Stereo image watermarking scheme based on discrete wavelet transform and adaptive disparity estimation. In: SPIE Proc. on Mathematics of Data/Image Coding, Compression, and Encryption VI, with Applications, vol. 5208, pp. 196–205 (2004) Gaurav Bhatnagar, Sanjeev Kumar, Balasubramanian Raman, and Nagarajan Sukavanam “Stereo image coding via digital watermarking“ Journal of Electronic Imaging Vol. 18, 033012, doi:10.1117/1.3210015,(2009) Sanjeev Kumar, Balasubramanian Raman, And Manoj Thakur “Real Coded Genetic Algorithm Based Stereo Image Watermarking” IJSDIA International Journal of Secure Digital Information Age, Vol.1, No.1, June 2009 S. Kumar and R. Balasubramanian, “An Optimally Robust Digital Watermarking Algorithm for Stereo Image Coding “ Recent Advances In Multimedia Signal Processing And Communications, Studies in Computational Intelligence, Volume 231/2009, 467493, DOI: 10.1007/978-3-642-02900-4_18, 2009. Osama Hosam, Xingming Sun “Stereo Image Reconstruction Using Adaptive Window Approach” the proceeding of “ and International Conference on Advanced Computer Theory and Engineering, ICACTE2009, pages 33-41, September 2009 Gonzalez, Woods, "Digital Image Processing", 2nd edition, Prentice Hall, 2001. Han-Suh Koo and Chang-Sung Jeong, "An Area-Based Stereo Matching Using Adaptive Search Range and Window Size", Department of Electronics Engineering, Korea University, Korea, 2001. G. Wei, W. Brauer, and G. Hirzinger, "Intensity- and Gradient-Based Stereo Matching Using Hierarchical Gaussian Basis Functions," IEEE Trans. PAMI, vol. 20, no. 11, pp. 1143-1160, Nov. 1998. S. E. Umbaugh, "Computer Vision and Image Processing," pp. 125130, Prentice Hall, 1998. Zhong, N., He, Z., Kuang, J., Zhou, Z.: An optimal wavelet-based image watermarking via genetic algorithm. In: Proc. of third IEEE Int. Conference on Natural Computation (ICNC), vol. 3, pp. 103–107 (2007) Yang Y. L, Cai N, Ni G. Q. Digital Image Scrambling Technology Based on the Symmetry of Arnold Transform. Journal of Beijing Institute of Technology, 15(2): 216-219, 2006. [19]Chaokun Wang, Jianmin Wang, Ming Zhou, Guisheng Chen, Deyi Li, "ATBaM: An Arnold Transform Based Method on Watermarking Relational Data," mue, pp.263-270, 2008 International Conference on Multimedia and Ubiquitous Engineering (mue 2008), 2008. Osama Hosam, Lincong Yang, Wei Liang, Xingming Sun, "Watermarking 3D Triangular Mesh with High Visual Quality", JDCTA: International Journal of Digital Content Technology and its Applications, Vol. 4, No. 4, pp. 107 ~ 116, 2010.
1773