You are on page 1of 8

MINOR PROJECT

SYNOPSIS



IMAGE COMPRESSION AND
WATERMARKING






NOVEMBER-2013




SUBMITTED BY: SUBMITTED TO:

ROHAN PATHAK(11102380) MR. VIJAY KHARE
BHARAT SOBTI(11102204)

SUMMARY
In the past few decades, an unprecedented demand for a more viable and efficient techniques
for storing information is being face. Both industrial and private customers are demanding
this for a wide range of applications which allow them to exchange, receive, or transmit
information without the inconvenience of large file sizes. Furthermore, the advance of
technology has made the exchange of data, whether by the consent of the owner or not, very
easy.

It is estimated that the total amount of the data that are stored on the world's storage devices
could be further compressed with existing compression algorithms by a remaining average
factor of 4.5:1. It is estimated that the combined technological capacity of the world to store
information provides 1,300 exabytes (1 exabyte= 1 billion gigabytes) of hardware digits in
2007, but when the corresponding content is optimally compressed, this only represents 295
exabytes.

This project aims to study the lossy data compression technique in images used in popular
image storing formats such as jpeg, mainly handling natural images and photographs so as to
make the transmission of data easy, efficient.
Also, we have studied basic watermarking techniques so as to making such files safe from
plagiarism.

The rapid growth of digital imaging applications, including desktop publishing, multimedia,
teleconferencing, and high-definition television (HDTV) has increased the need for effective
and
standardized image compression techniques.

The basic technique used for compression was through Discrete Cosine Transform and using
the Huffman Algorithm.





















INTRODUCTION


MATLAB (matrix laboratory) is a fourth generation programming language developed by
MathWorks. Matlab is an interpreted language for numerical computation. It allows one to
perform numerical calculations, and visualize the results without the need for complicated
and time consuming programming. Matlab allows its users to accurately solve problems,
produce graphics easily and produce code effeciently. This is extremely helpful in image
processing as images can be easily represented as a matrix and thus mathematically
manipulated. Data compression, also known as source coding and bit rate reduction involves
encoding a given information using fewer bits than the original representation. Compression
is broadly divided into two types-

1) Lossless Compression which reduces bits by identifying and eliminating statistically
redundant data while not losing any data.
2) Lossy Compression instead finds unnecessary information and ends up removing it. Thus
some data is lost.
We will be using Lossy Compression as we will be concentrating on compressing and
watermarking photographs.

To achieve optimum compression in tandem with watermarking we have used digital image
watermarking technique though we haven't used quality filteration techniques as they are
patented. To achieve this we have broken up the image into it's RGB components to achieve
colour watermarking. Such watermarking is desirable over other techniques as it is
comparatively easier to achieve and extremely robust as the watermarking is done on a
frequency level.

For compression we have used the DCT technique using the Huffman algorithm. Converting
the image into a 2d matrix using DCT and DCT2 and then removing redundant values
according to the algorithm. We have then used IDCT to form the compressed image.















WATERMARKING


Any image is in fact a function of at least 2 dimensions, holding three components I= f(x,y)
where f is the colour value, There are three types of images-

Colour Image :- f- (R, G, B), where the values range from 0 to 255

Gray Scale Image:- f- (R=G=B) where the values range from 0 to 255

Binary Image:- f-0, i.e, black and white image

Basic steps used for watermarking-
Image Acquisition-
We can use two methods for this-
1)An image stored in the computer.
2)Captured through a camera.

To convert image into a processable format-
As it isn't possible to process a coloured image directly we have to convert it to either
grayscale or binary. However to achieve coloured watermarking we can break the image to
individual components, i.e, RGB. We have utilised this method.

Watermarking-
First we have to find the size of the images. It is only possible when the image to be
watermarked is larger then the watermarking image. We have applied the watermarking on
the left top of the image. We have assumed the watermarking image has a black background
as the method only applies parts of the watermarking image in other colours except black.
We break the watermarking image to it's components as well.
We then check pixel by pixel if the value of the watermarking components, i.e i, is less then
10 thus checking if the colour of the pixel is black. We ignore this pixel and carry on
checking subsequent pixels. When a pixel of value greater then 10 is found we then copy this
pixel value to the image to be watermarked. In practise we have checked for the value to be
less then 100 as it gives a sharper and more accurate result. We have then restored the image
to it's original coloured format along with the now applied watermarking through it's
components.














Compression


For compression we have first converted the image to a 2d matrix using Discrete Cosine
Transform Function (DCT-II). The DCT, and in particular the DCT-II, is often used in signal
and image processing, especially for lossy data compression, because it has a strong "energy
compaction" property .Most of the signal information tends to be concentrated in a few low-
frequency components of the DCT.


1)The image pixel values are transformed into equal number of coeffiecients which represent
the amount of each frequency.
Highest frequency
Lowest

2)We then convert the 2d matrix to 1d, then assigning the values to an array. The DCT itself
does not achieve compression, but rather prepares the image for compression.
3)Once in the frequency domain the image's high-frequency coefficients can be coarsely
quantised so that many of them (>50%) can be truncated to zero.

4)The coefficients can then be arranged so that the zeroes are clustered (zig-zag collection)
and Run-Length Encoded.

6)The remaining data is then compressed with Huffman coding


















RESULT-

Original Image-

Image size- 28.7KB (800X600)
Watermarked Image-

Image size- 31KB (800X600)
Watermarking Image-

Image size- 5KB (256X192)
Compressed Image-

Image Size-24KB (800X600)
Matlab version used-7.12.0.635 (R2011a).

REFERENCES

Andrew B Watson, Image Compression using Discrete Cosine Transform, Nasa
Ames Research Centre.,Mountain View, Silicon Valley, California, USA,
Mathematica Journal, 4(1), 1994, p. 81-88
I. El-Fegh et. all, " Color Image Watermarking based on the DCT-Domain ofThree
RGB Color Channels", Department of Electrical Engineering, Faculty of Engineering,
Al-Fateh University, Tripoli, Libya, WES Confrence, 2000, p.36-41.
Lin, C.Y., Wu, M., Bloom, J.A., Cox, I.J., Miller,M.L., and Lui, Y.M.: Rotation,
scale, and
translation resilient watermarking for images,,IEEE Trans. Image Process., vol. 10,
pp. 767782, 2001
G. Langelaar, I. Setyawan, R.L. Lagendijk, Watermarking Digital Image and Video
Data, IEEE Signal Processing Magazine, Vol 17, pp 20-43, September 2000
J.R. Hernandez, M.Amado, and F. Perez-Gonzalez, DCT-Domain Watermarking
Techniques for Still Images: Detector Performance Analysis And a New Structure,
IEEE Trans. Image Processing, vol. 9, pp 55-68, Jan. 2000

You might also like