Académique Documents
Professionnel Documents
Culture Documents
By: Shiladitya Mandal & Ankit Vikrant Project Mentor: Mr. Manoj Pandya
Overview
Spatial domain steganography DCT domain steganography Steganography for indexed images
Before we start!
Language : C IDE: Visual Studio 2010 External Libraries used : OpenCV 2.1
since our secret message/image is a stream of bits , we can simply replace the pixel LSBs with the bits of the message.
DEMO 1
Carrier image
Secret image
After encoding
Cover Image
Stego Image
After encoding one wouldnt be able to distinguish between the original file and the one after embedding!
Demo2
Secret message embedded:
Transform Domain
Spatial domain steganography prone to data loss if cover image is cropped or compressed. Transform domain comes to the rescue! Embedding in the transform domain spreads it throughout the spatial domain. Any change in one coefficient in a transform domain will spread across the entire image in spatial domain.
Jsteg
Similar to the simple sequential LSB algorithm in the spatial domain. JSteg algorithm only differs from the Hide & Seek algorithm because it embeds the message data within the LSBs of the DCT coefficients, rather than its pixel values in the spatial domain.
Proposed technique:
Encoding For each 8x8 block extracted from the cover image perform the following operations: 1. Shift all elements of the block by CF(compression factor)=2^k where k should be less than 8. For steganography, CF of 4 or less is preferred. 2. Take DCT to obtain the matrix T(u,v).
3. Quantization: T1(u,v)=round(T(u,v)/Z(u,v));
4. Apply simple sequential LSB algorithm on the matrix obtained to encode the secret message. 5. Post encoding process: Simply reverse the process used before step 4. 5.1 Convolute the matrix obtained in 4. with the quantization matrix Z(u,v) to get T2(u,v). 5.2 Follow this by taking the inverse DCT of the matrix T2(u,v). 5.3 Now, add the CF chosen in 1. to the above matrix which gives us the final processed block.
Original Sub-image
Decompressed Sub-image
Decoding process: This too follows the same 5 steps as above except in step4 where we extract the LSB of each element of the matrix to reconstruct the hidden message provided the size of the hidden message.
Outguess
Similar to the Randomized Hide and Seek algorithm in spatial domain. PRNG helps to randomly embed the bits of the secret message in the image in transform domain making the hidden message highly covert. Encoding: After obtaining the quantized DCT in this method, the coefficients are shuffled into a seemingly random order using a PRNG according to a seed k.
The message data is then embedding using the same technique as for JSteg before finally inversing the shuffle such that the coefficients are back in the correct positions. Decoding: -Obtain the quantized DCT and then shuffle the coefficients using the same seed k that was used before for the PRNG. -We can then extract the LSBs from the matrix elements sequentially to reconstruct the covert data.
Indexed Images
The pixel values in indexed images are indexes of a palette defined for the image. In this way color images can be seen in single channel images.
Changing the LSB will not be of any help as two consecutive colors in the palette might have significant visual difference!
Randomised
High
High
Medium
Secure Sequential
High
Low
Low
Experimental results
Difference in image histograms Difference in LSB plane images. PSNR Peak Signal to Noise Ratio PSNR determines the overall statistical noise introduced in an image or a signal
PSNR
Demo 1 ( continued)
Histogram comparison
You can make out the difference in their histograms easily! ( this is the histogram of only the R plane )
Demo 2 (contd.)
Secret message embedded:
Histogram comparison
Figure: Dolphin
Figure: City
Figure: BITS
Figure: Circuit
Message Type
Color image ASCII text ASCII text Grayscale image
Dimension
449 x 359 x 3 55 bytes 55 bytes 128 x 128
PSNR (dB)
48.32 77.78 72.56 54.18
Message Type
Color image ASCII text ASCII text Grayscale image
Dimension
449 x 359 x 3 55 bytes 55 bytes 128 x 128
PSNR (dB)
48.33 77.85 72.26 54.08
Watermarking Application
When pictures are zoomed in/out in any general photo viewer, even the watermark is enlarged! Objective To develop a basic photo viewer where the watermark always has constant size.
All operations were done on this structure! IplImage is structure for image in OpenCV
Mouse movements
To zoom in/out, the user can simply draw boxes on the image, and that portion is enlarged and shown on an adjacent window. Use of Mouse callback function cvSetMouseCallback(win",callback,(void*)); We used the MOUSEMOVE, LBUTTONDOWN, LBUTTONUP
Design of watermark
A direct way cvAddWeighted ( img1, wt1, img2, wt2, alpha) It simply returns a matrix which is a result of weighted addition of 2 matrices! To insert a transparent watermark Output=cvAddWeighted(inp,x,water,1-x,0); X= transparency
We want a faint watermark which should not tamper the color of any portion of an image, esp. a map!
Solution HSV color space! H for Hue, S for saturation, and V for intensity
Future plans
Add more user friendly features such as zoom in on click and mouse scroll. Zoom output display in same window as original image. Copyright symbol at multiple positions but faintly small change in intensity Feature of removing watermark