You are on page 1of 4

Histogram Shifting

Another approach of reversible-data-hiding is the histogram shifting. In this approach the


histogram will be generated by finding the zero or minimum points which is called as peak
points. During embedding the entire image is searched. After getting the peak-pixel, it will check
whether the embedding bit is ‘1’ then the pixel is added by '1' otherwise it remains same. The
extracting is little bit easy because it is opposite of embedding process.
Embedding part

In the embedding part the, the histogram of cover-image is formed. The maximum and minimum
points are selected from the histogram. If the selected peak points are satisfactory points then
histogram will be shifted to embed the secret-data bits, if it’s not satisfactory points then other
peak points available are found. The maximum and minimum points are recorded as the
bookkeeping information for the use of extraction part. After histogram shifting is done the data
is embedded and stego-image is obtained.

When the payload is greater than the capacity of one set of zero and peak point, the calculation
utilizes two sets of points and it is sure that the following points would be maximum and
minimum. However many pairs can be used to embed the message, until all image pixels are
embedded.
Extraction part

The extraction part is quite simple, it is opposite of the embedding part. In the extraction part the
marked image is to be scanned as done in the embedding part. Then the secret-data bits have to
be extracted using the bookkeeping information. The bookkeeping information is also extracted
for shifting the histogram. After extracting the bookkeeping information the histogram is to be
shifted back to recover the minimum points. Later the original image is extracted. After
extracting the original image it needs to be checked whether it is extracted without any distortion
or not.

System Methodology

In this system reversible-data-hiding concept is used, in which there are two phases namely
embedding phase and extraction phase. In the embedding phase, firstly the cover-image and
secret-image is selected. The cover-image is divided into non-overlapping blocks and the block
difference is calculated. The difference histogram is generated and then histogram will be shifted
to right by one. The secret-data bits are embedded. In extraction phase stego- image is divided
into two blocks. Again block difference is calculated and the difference histogram is generated.
Then the secret-image and original cover-image is extracted without any distortions. The details
of each of the embedding and extraction process are explained in the next sections.
Embedding Process
In the embedding process at first the image will be chosen as cover-image. While
selecting the cover-image is checked whether the lower bound pixel and upper bound pixel is 1
and 254 respectively to avoid overflow and underflow problems in the time of embedding. After
that the cover-image is divided into non-overlapping-blocks. In each block one pixel is chosen as
reference pixel and the difference-between the reference pixel and remaining pixels in the block
are found. Then the difference histogram is generated and the histogram is shifted for embedding
the secret-information. Figure 3.1 shows the block diagram of embedding process.

The difference histogram is generated for the difference block. Find out the maximum and
minimum values in the histogram and call it as p and q respectively. The space between p+1 and
q-1 are moved by one to right and value of p+1 is left without occupied. Then to embed the data
the unoccupied space of p is used. If the secret-data bit is 1, then the difference histogram is
shifted to right by one. If the secret-data bit is 0, then the difference histogram remains same. p
and q are recorded as bookkeeping information.

Extraction Process
In extraction process the stego-image is divided into non-overlapping-blocks. In every block
choose the same maximum-pixel as reference-pixel which is the same one that is selected in the
embedding process and determine the difference-between the chosen reference pixel and
remaining pixels in the block. The difference histogram of the block difference is generated and
using this difference histogram the embedded secret-data is extracted. If pixel has the difference-
value p, extracted data bit is 0 and if it is p+1, the extracted data bit is 1. The original cover-
image is also extracted after extracting the secret-data and the lower bound pixels and the upper
bound pixels is also recovered. Finally after completing the extraction process the output is the
extracted secret-image and the recovered original cover-image.

You might also like