You are on page 1of 16

Project Report on

Halftone Visual Cryptography Of Image






Department of Electronics and Communication Engineering
National Institute of Technology, Rourkela
Rourkela-769008, India









Under the supervision of : Submitted By:
Prof. A. K. Sahoo Avinash Giri
212ec5171





ACKNOWLEDGEMENT

I would like to express gratitude to my guide Prof Ajit Kumar Sahoo, for providing
me with support and best facilities for the completion of this project. I would like to
thank Faculty Members, Electronics and communication department for their constant
encouragement.
I am also grateful to Siba Prasad Mishra, Chandan Kumar, Prateek Mishra & all
my colleagues for being actively involved in my step by step progress.





















Abstract
Visual cryptography (VC) encrypts a color secret image into n halftoned image shares.
The secret image can be recovered simply by stacking these shares together without any
complex computations involved. The shares are very safe because separately they reveal
nothing about the secret image. Half toning is the key feature of visual cryptography
which provides security at the early stage of cryptography. A particular half toning
method that has been used extensively in VC scheme is so called error diffusion method.
This method provides a simple and efficient algorithm for half toning. Error diffusion
(E-D) algorithm has attracted much attention in the graphics community.























TABLE OF CONTENTS

1. INTRODUCTION
2 . HALFTONING
2.1 Constant threshold halftoning


2.2 ordered dithering
2.3 Block replacement
2.4 Error diffusion
3. CURRENT WORK IMPLEMENTATION & RESULTS
3.1 Study of digital halftoning and its different method
3.2 Floyd Steinberg Error Diffusion
3.3 Jarvis, Judice, and Ninke error diffusion

4. FUTURE WORK
Study and modelling of human visible system (HVS).
Impact of HVS models on model based halftoning.
5. IMPROVEMENT
6. CONCLUSION
7 . REFERENCES















1. Introduction

In our modern world, we are constantly exposed to different images produced
by magazines, books, posters, newspapers, televisions, etc. As an integral
part of daily life, images have evolved into many valuable commercial en-
deavors. Printing industry is one of them. Recent years have witnessed
enormous economic powers generated by printing industry businesses due
to the increasing demand for high quality printing high fidelity gray scale
images such as photographs, art work, design renderings, magazine layouts,
etc.
Digital halftoning, sometimes referred to asspatial dithering, is a major
technology used in printing images. In general terms, it is a process of
creating a binary approximation to a sampled gray scale image that create
the illusion of a continuous tone image. Currently, there are various
methods to halftone an image. In order to achieve high quality halftone
images, the conventional approach is to use a high resolution printer.
However, such printers are often slow and expensive. Thus, the research of
new halftoning techniques, which produce high quality halftoning by using
low-resolution standard printers, has been a very popular toptic in the past
three decades or so [1].
The task of the project is to implement an algorithm, which should be fast
and the printed images must look good based, on human visual perception.
In this project, we survey some of the existing methods. Further, based on
2-by-2 block replacement method, we propose an improved algorithm. The
improvements can be divided into three major parts. The first one is the
adaptive gray level region definition. Second is the inclusion of the nearest
neighbours in the analysis before halftoning. The last one is to parallelize
the algorithm in order to speed up the conversion.
This report is organized as follows .
1.A review of some common halftoning techniques is presented in section 2.
2. Presents implementation and some test results are discussed in section 3.
3.Future work is discussed in section 4.
4. Section 5 and 6 gives the conclusion and references respectively.








2.HALFTONING:
WHAT IS HALFTONING AND HOW IT WORKS

The grayscale digital image consists of 256 gray levels, while the black and
white printers only have one colored ink. So, there is a need to replace wide
range of grayscale pixels for printers. These 256 levels of gray should some-
how be represented by placing black marks on white paper. Halftoning is
a representation technique to transform the original continuous tone digital
image into a binary image only of 1s and 0s consisting. The value 1 means
to fire a dot in the current position and 0 means to keep the corresponding
position empty.
Since the human eyes have the low pass spatial-frequency prosperity, human
eyes perceive patches of black and white marks as some kind of average grey
when viewed from sufficiently far away. Our eyes cannot distinguish the dots
patterns if they are small enough. Instead, our eyes integrate the black dots
and the non-printed areas as varying shades of gray. Figure 1(b) shows a
typical halftoning image. Zooming in a part of the halftoning image, we can
see that the image is actually structured by a certain strategy of distributed
black dots.


Original image Halftoned Image Enlargement

Halftoning methods
There exist a number of advanced halftoning methods. The algorithms can
be categorized into three categories, based on their computational
complexity. The first and simplest method is to operate on each pixel
individually, without taking into account neighbors. The second is region-
based method, which quantifies each pixel using a neighborhood operation
instead of a sim- ple point wise operation. The last one is an iterative
method. Unlike the other two methods, the iterative methods normally
operate over the entire original image and iteratively try to minimize the
errors. However, so far the last type of methods are time demanding even
for images of small size. In this section we briefly introduce some common
halftoning methods as representative of the above mentioned types of
techniques:



Constant threshold halftoning
Ordered dithering
Block replacement
Error diffusion
2.1 Constant threshold halftoning:

Input: Image I, threshold T = 127
Output: Halftone image H
For each pixel( i,j) in I, set H(i,j)={ 1 if I(i ,j)T;
0 if I(i ,j)T



Halftoning image by constant threshold algorithm

The constant threshold method is the simplest and straight forward halftoning
method. Let I = {(i, j), i, j = 1, 2, ...255} describe the pixel positions in the
image. The pixel value at position (i, j ) in I is compared with some chosen
threshold value T. If it is bigger or equal to the threshold, then 1 is set at the
corresponding position in the halftoned image H, i.e. the printer fires ink.
Otherwise, 0 is set there, i.e. the printer does nothing. It produces a poor quality
rendering of a continuous tone image, losing most of the details.

2.2 Ordered dithering
Ordered dithering is an approach that provides a fixed pattern of numbers
to indicate the order of turning pixels on within a selected screen (halftone
cell) before thresholding to binary . In this method the threshold matrix,
which is also called screen, is tiled over the image using periodic replication.
The pixel value at each position (i, j ) in I is thresholded by the threshold
matrix T. In clustered dot dithering the consecutive thresholds are located
in spatial proximity. For a constant threshold halftoning patch, this method
turns pix- els on that are adjacent to one another, forming a cluster. The
final halftone dot will thus be clustered in the centre of each screen. The
clustered dot dithering method requires a trade-off between the number of
gray levels and the resolution. Due to the dot-center criterion and the
limited gray levels, the final halftoning image has poor detail rendition
and obvious contouring artifact. On the other hand, there is no additive
spot overlap. This method efficiently decreases the effect that the ink
spreads to neighboring pixels.
In the dispersed dot dithering method, the threshold matrices are arranged in
a way that the values of threshold grow separately. Figure 7 shows an
example of an 8 8 threshold matrix. This method turns pixels on indi-
vidually without grouping them into cluster, hence make the final halftone
dots disperse in each screen. The 4 4 case does not look much different
from the 8 8 case. There is no need to consider the trade-off between the
number of gray levels and the resolution. Compared with clustered dot
dithering, this method has improved detail rendition
(a) The threshold values are representing 65 levels of gray. (b) The
threshold values are representing 17 levels of gray.
2.3 Block replacement
Block replacement halftoning is a commonly used halftoning technique. In
this method each pixel in the original image is replaced by one of a predeter-
mined set of binary patterns (i.e. matrices). The dimension of the patterns
is determined by screen frequency and the print resolution [5]. For simplic-
ity, assume that each pixel is going to be replaced by a 2 2 matrix. Since
the dimension of the matrix is 2 2 then only five different gray levels can
be represented by the set of matrices.



Block replacement halftoning. Each pixel in the original image is replaced
by a 2 x 2 matrix.
The pixel belong to one of the five gray level regions is replaced by the
corresponding predetermined candidate. In contrast to the ordered dithering
method, the arrangement of the black micro dots in the patterns does not
have necessarily to be clustered or to be dispersed. Due to the low-pass
spatial frequency property of the human eye, the same gray level can be
represent by two different patterns, any of which can possibly be arranged
as a clustered dot and another as a dispersed dot. The choice of the
patterns has an impact on the characteristics of the final halftoning image.
This will be describes in detail in the next section.





2.4 Error Diffusion
Unlike the block replacement and ordered dithering methods, which treat
each pixel individually, error diffusion quantifies each pixel using a neigh-
borhood operation. In this case, the value of each output point depends
no longer only on the value of the corresponding input point.

Error Diffusion halftoning method
In this figure, H and I denote the final halftoning image and the original
image, respectively. This method moves through the original image in raster
order, normally starting from the pixel up to the left (i.e. the first element of
the matrix) and then goes through all pixels from left to right until the end.
The value of each pixel in I is quantified by the constant threshold method.
One or zero is set at the corresponding position in H. Since the pixel value
in I is replaced by 0 or 1 in H, there is a difference between the pixel value in
I and H at the position (i, j ). After computing the difference, we obtain an
error e. And then this error is pushed forward to a number of non-processed
pixels, i.e. the neighborhoods. To which neighborhoods and how this error
is pushed is decided by a error diffusion weight matrix, i.e. a error filter
w.
7/ 16
3/ 16 5/ 16 1/ 16

(a) (b)
Two error diffusion weight matrixes (a) Jarvis, Judice, and Ninke
(b) Floyd and Steinberg


In above figure two common different error diffusion weight matrices are
shown. If using the Floyd and Steinberg matrix, the error occurred at the
position (i, j ) is weighted by 7/16 and added to the neighborhood pixel at
(i+1, j ). At the same time the error is also weighted by 1/16 and added to


7/48 5/48
3/48 5/48 7/48 5/48 3/48
1/48 3/48 5/48 3/48 1/48
the neighborhood at (i+1, j+1 ) and so on. After the error has been diffused,
we get the new input image I. The same process moves to the pixel at the
next position and performs the above described steps until all pixels have
been proceed.

Using matrix (a) weight Using matrix (b) weight

Above figure shows two images being halftoned by error diffusion with
different error diffusion weight matrices. Using a larger weight matrix, the
final halftoning image has sharper details and reduces some of the artifacts.
In general, error diffusion shapes the error to make the most of the noise
energy concentrated in the high frequencies, so that the low-frequency
artifacts are minimized, made not visible for the eyes.

3. CURRENT WORK IMPLEMENTATION & RESULTS
Floyd & Steinberg Error Diffusion:

Original image Halftoned image


Jarvis, Judice, and Ninke error diffusion:

Original image halftoned image

4. FUTURE WORK
Study and modelling of human visible system (HVS).
Impact of HVS models on model based halftoning.

5. IMPROVEMENT:
The improvements can be collected in three major topics:
Graylevel Region Definition
Neighboring Method
Parallelization


6. CONCLUSION:
In this report, several digital halftoning algorithms are surveyed and we
focus on 2-by-2 block replacement method. We suggest the following im-
provements of the original 2-by-2 block replacement method, (1) Neighbor-
ing Analysis, (2) decomposition of the grayscale regions for a better visual
appearance, (3) parallelization.
Improvement 1: In the Neighboring Analysis approach, the idea is to
consider each pixels nearest neighbors (up, right, down, left) and compare
their gray level intensities. After the comparison, the stencil is rotated in
order to imitate the local changes in the image. When using this approach,
more details can be preserved in the output image comparatively to the
existing method.

Improvement 2: Instead of using fixed regions of equal length, the adap- tive
gray level range analysis defines graylevel intervals according to the peaks
of intensity histogram. The corresponding regions of the peaks are
adjusted. Using the adaptive graylevel intervals, we can distinguish more
details pixels from the background pixels, resulting in a better halftoning.
Improvement 3: Both the existing and the new method are parallelized and
their performance is compared. As the new method requires relatively more
operations per pixel, its parallel performance is better than that of the
original method and the observed speedup is nearly ideal.

References:
[1] T.N. Pappas; D.L. Neuhoff, Printer models and error diffusion,
ImageProcessing, IEEE Transactions, Jan. 1995.
[2] J. P. Allebach, DBS: retrospective and future directions, Color Imaging:
Device-Independent Color, Color Hardcopy, and Graphic Arts VI. Proc. SPIE
vol. 3963, 2000.
[3] H. R. Kang, Digital Color Halftoning, New York: IEEE Press, 1999.
[4] S. Bhatt, J. Sabino, J. Harlim, J. Lepak, R. Ronkese and C. W. Wu,
Comparative study of search strategies for the direct binary search im- age
halftoning algorithm, Proceedings of NIP 22: ISTs International
Conference on Digital Printing Technologies, Denver, CO, pp. 244-247,2006.
[5] S. Gooran, Digital Halftoning,Thesis, Linkoping University, Linkoping,
Sweden.
[6] K. T. Knox, Error Image in Error Diffusion, Proc. Of SPIE, vol. 1657,
268-279.
[7] J. F. Jarvis; C. N. Judice; W. H. Ninke, A survey of Techniques for the
Display of Continuous-tone Pictures on Bilevel Displays, Computer Graphics and
Image Processing, vol. 5, 13-40.
[8] P. T. Metaxas, Thesis Parallel Digital Halftoning by Error Diffusion,
Department of Computer Science, Wellesley College.

You might also like