Cryptography Reference
In-Depth Information
.Thereare 5 16 = 152587890625
possible watermarks in this example, although it will not always be
practical to tell the difference between them all. Let these values be
represented by
values from the set
{−
2
, −
1
,
0
,
1
,
2
}
w i,j| ,where 0
≤ i<m
and 0
≤ j<n
.Inthiscase,
m
=
=4 .
The watermark is inserted by breaking the image into 4
n
×
4 blocks
and adding the values into the pixels. Pixel
p i,j +
w i mod m,j mod n . If the value is too large or too small, it is replaced
with either the maximum value or zero, usually 255 and 0.
How is the watermark recovered? By averaging pixels. Let
p i,j
is replaced with
w a,b be
the average intensity of all pixels,
p i,j ,suchthat
i
mod
m
=
a
and
w 0,1
j
mod
n
=
b
.Inthe 4
×
4 example,
is the average of pixels like
p 0,1 ,p 4,1 ,p 8,1 ,p 0,5 ,p 4,5 ,p 8,9 ,etc.
The success of this step assumes that the patterns of the image
do not fall into the same
rhythm as the watermark. That is,
theaveragevalueofallofthepixelswillbethesame.Alightpicture
may have a high average value while a dark picture may have a low
average value. Ideally, these numbers balance out. If this average
value is
m × n
S
, then the goal is to find the best watermark that matches
w − S
.
This is easy if the image has not been cropped or changed.
w − S
should be close to, if not the same as, the inserted watermark. The
only inaccuracy occurs when the watermark value is added to a pixel
and the pixel value overflows.
Recovering the watermark is still simple if the image is cropped in
the right way. If the new boundaries are an integer multiple of
m
and
w and
n
pixels away from the original boundaries then the values of
w
will still line up exactly.
This magical event is not likely and any of the
possible orien-
tations could occur. One solution is to compare the values recovered
from the image to a database of known watermarks. This takes
mn
kmn
steps, where
is the number of known watermarks. This may not be
a problem if the systemuses only a small number of watermarks, but
it could become unwieldy if
k
grows large.
Another solution is to create a canonical order for the watermark
matrix. Let
k
p
and
q
be the canonical offsets. The goal is to find one
pair of values for
so that we always find the same order for the
watermark, no matter what the scheme. This is a bit cumbersome
and there are other solutions.
p
and
q
z i,j =5 4i+j . Five is the number of possible
values of the watermark.
1. For this example, let
)= z i,j (2 +
2. Let
F
(
w, p, q
w (i+p)mod4(j+q)mod4 ) .
Search WWH ::




Custom Search