Half-Tone Watermarkin g Multimedia Security
Jan 04, 2016
Half-Tone Watermarking
Multimedia Security
2
Outline
• Half-tone technique
• Watermarking Method
• Measurement
• Robustness
• Conclusion
3
What is Half-tone?
• Term used in the publishing industry for a black-and-white photograph, indicating the many shades of grey that must be reproduced
• In printing, a continuous tone image, such as a photograph, that has been converted into a black-and-white image
• Halftone images appear routinely in books, magazines, newspapers, printer outputs, and fax documents
4
Application to Halftone
• Fax machines
• ink jet printers
• Laser printers
• Magazines
• Newspapers
• All of them represent continuous tone images with small dots of one (or a few) colors of ink.
5
Example-Lena
6
Halftone technique
• Bit-plane• 1 bit quantizer by medium value• Pseudo-random-noisy binarization• Dithering
– average dithering– random dithering– ordered dithering (1973)
• Error Diffusion (1976)
7
Average Dithering
• Choosing a certain constant gray level, in particular the average value of image pixels, and using it as a global threshold in deciding whether a pixel should be quantized to 0 or to 1.
• Simple• Quantization contouring is
quite perceptible.
8
Ordered Dithering
• It compares the pixel intensities with some pseudo-random threshold patterns or screens in order to determine its two-tone output.
0 32 8 40 2 34 10 42
48 16 56 24 50 18 58 26
12 44 4 36 14 46 6 38
60 28 42 20 62 30 44 22
3 35 11 43 1 33 9 41
51 19 59 27 49 17 57 25
15 47 7 39 13 45 5 37
63 31 45 23 61 29 43 21
0 8 2 10
12 4 14 6
3 11 1 9
15 7 13 5
0 2
3 1
9
Ordered Dithering-Example
• Pattern :
• A pixel is “157”– 256/4=64– 64*2 < 157 < 64*3
• Halftone :
0 2
3 1
0 2
3 1
10
Random Dithering
• Simple and easy to implement– Generate a random
number 1..256; – if it is greater than the
image value, plot the point black
– a lot of "white noise", But free from "artifacts" by digital signal processing
11
Error Diffusion(1/2)
• It compares the sum of image pixel intensity and error from the past with a fixed threshold to determine the output
• The halftone error is fed forward to its adjacent neighbor using a kernel
• Best quality and slowest
12
Error Diffusion(2/2)
1. find the closest color available
2. Calculate the difference between the value in the image and the color you have
3. divide up these error values and distribute them over the neighboring pixels which you have not visited yet
13
Error Diffusion(2/2)
1. find the closest color available• A pixel is “157”. Xij = vij =157• 157 > 128(Threshold) bi,j = 128
14
Error Diffusion(2/2)
2. Calculate the difference between the value in the image and the color you have
• 157 - 128 = 29
15
Error Diffusion(2/2)
3. divide up these error values and distribute them over the neighboring pixels which you have not visited yet
• 29*(7/48) add to next pixel
• …………………………………
16
Performance
Gray LeverGray Lever AverageAverage RandomRandom OrderOrder DiffusionDiffusion
17
Error Diffusion-Example(1/2)
112 0 0
0 157 34
232 121 21
112 0 0
0 128 34
232 121 21
1.1. 128 < 157 <256128 < 157 <256 the closest color is 128 is 128
2.2. Calculate the difference Calculate the difference between the value in the between the value in the image and the color you image and the color you havehave157-128 = 29157-128 = 29
18
Error Diffusion-Example(2/2)
112 0 0
0 128 34
232 121 21
3.3. divide up these error values andivide up these error values and distribute them over the neigd distribute them over the neighboring pixels which you have hboring pixels which you have not visited yetnot visited yet
7/16
3/16 5/16 1/16
29*29*
112 0 0
0 128 47
237 130 23
19
Halftone vs. watermarking
• Copyright, data, or time
• Although there are many existing image data hiding and watermarking methods, most are designed for multi-tone images and could not be applied to halftone image directly
20
Classification
• Pixel-wise: Change the values of (usually pseudo-randomly chosen) individual pixels (Fu and Au, 2000; Fu and Au, 2002a;)
• Block-wise: Divide the host image into blocks and modify some characteristic of each block.– Alternating between two different dithering matrice
s to halftone a image (Baharav and Shaked, 1998; Hel-Or, 2001; Pei and Guo, 2003)
Data Hiding Watermarking for Halftone Images
Author: Ming Sun Fu, Oscar C. AuSource: IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL.11, NO.4, APRIL 2002
22
Realignment
• Error correction code
• To help realignment : – the 4 corner pixels are forced to be zero– A predefined synchronization codeword embe
d in the center portion of the image
23
M.F. Fu & Oscar C. Au
• Data hiding without original multitone image– Data Hiding Self Toggling (DHST)– Data Hiding Pair Toggling (DHPT)– Data Hiding Smart Pair Toggling (DHSPT)
• Data hiding with original multitone image– Data Hiding Error Diffusion (DHED)– Modified Data Hiding Error Diffusion (MDHED)
24
Data Hiding - Self Toggling(1/2)
• Encoder1. pseudo-random number generator with a known
seed decide where to be embedded
2. Force the pixel at the location to be either 0 or 255
• Decoder– The same random number generator with the
same seed is used to identify the location
25
• Extremely simple
• Low perceptual quality– Salt-and pepper noise– A clusters of connected pixels may be formed
0 2
3 1
Data Hiding - Self Toggling(2/2)
26
Data Hiding Pair Toggling
• Master pixel :– A pixel at a pseudo-random location needs to self-t
oggle
• Slave pixel :– One of the neighborhood pixels is chosen randomly
to self-toggle
• Still large salt-and-pepper noise
DHSTDHST DHPTDHPT
27
Data Hiding by Smart Pair Toggling(1/4)
• Minimizes the connectedness of the cluster
• DHSPT is the same as DHPT except that the choice of the slave pixel for complementary toggling
• A function to Measure how connected the pixel at (m, n) is with neighboring pixels of the same color
28
Data Hiding by Smart Pair Toggling(2/4)
Where w(i) = 1 for i = 1, 3, 6, 8 w(i) = 2 for i = 2, 4, 5, 7
x1 x2 x3
x4 x0 x5
x6 x7 x8
8
10 ),()(),(
iixxfiwnmcon
yx
yxyxf
,
,
0
1),(
The con(m,n) is a measure of how connected the The con(m,n) is a measure of how connected the pixel at (m, n) is with neighboring pixels of the sapixel at (m, n) is with neighboring pixels of the same colorme color
1 2 1
2 x0 2
1 2 1
29
Data Hiding by Smart Pair Toggling(3/4)
•Maximum con(m,n) = 12 all the same
•If x0 is toggled to and the 8 neighboring are not changed, then
conbefore(m,n) 、 conafter(m,n)-the connection before and after toggling
8
1
8
100 12)(),(),()(
),(),(
iiii
afterbefore
iwxxfxxfiw
nmconnmcon
0x
1),(),( 00 ii xxfxxf
30
Data Hiding by Smart Pair Toggling(4/4)
• The slave candidate with minimum conafter(m,n) is chosen
• Horizontal or Vertical– conbef(m,n)+conaft(m,n)=10
• Otherwise - conbef(m,n)+conaft(m,n)=11
0
00 0),(),(
xx
xxfxxf
i
ii
otherwisenmcon
horizontalveritcalnmcon
nmcon
DHSPTbefore
DHSPTbefore
DHSPTafter
),(11
),(10
),(
31
• Data hiding without original multi-tone image– Data Hiding Self Toggling– Data Hiding Pair Toggling– Data Hiding Smart Pair Toggling
• Data hiding with original multi-tone image– Data Hiding Error Diffusion– Modified Data Hiding Error Diffusion
M.F. Fu & Oscar C. Au
32
Data hiding with original multi-tone image
• Requirement– Original image is available– Error diffusion
• Start off with DHST
• Using error diffusion to diffuse the self-toggling distortion to many neighboring pixels to achieve higher visual quality
33
DHED and MDHED
• DHED– DHST is first applied followed by regular error
diffusion– After DHST, error diffusion is applied to the rest of the
pixels• MDHED
– The error diffusion is modified to become non-causal such that the error is fed not only to future pixels but also to past pixels
34
Data Hiding Error Diffusion
),(),(),(
128),(,255
128),(,0),(
),('),(),(
)1,(7)1,1(3),1(5)1,1(16
1),('
jibjivjie
jiv
jivjib
jixjixjjv
jiejiejiejiejix
7/16
3/16 5/16 1/16
35
quality measure
• Subjective :– Typically, halftone quality is measures by j
ust “eyeballing” the original and halftone• Objective
– The human visual system acts like a low-pass filter
– MPSNR
36
Modified PSNR(1/2)
• Attempt to model the human visual system1. A simple inverse halftone Hlow is generated w
ith a low pass filter (EX : 5*5 Gaussian low-pass filter)
Original ImageOriginal Image
Halftone ImageHalftone Image
Normal PSNRNormal PSNRcomputationcomputation
14741
41626164
72641267
41626164
14741
273
1
37
Modified PSNR(2/2)
2. Hlow is then fed into the regular PSNR function to generate the MPSNR
– O(x,y) : the original grayscale image
– Hlow : halftone image though low-pass filter
– SxSy : image size
yx
low
SS
yxOyxHMSE
2),(),(
MSEMPSNR
2255log10
An Extension of DHSPT to color Half-tone Images
Author: Mitsuji, Masayuki Inoue and Yoko KitamuraSource: International Symposium on Communications and Information Technologies 2004(ISCIT 2004)
39
An Extension of DHSPT to color - 2004
• Extend to color images
• Luminance components are considered into the objective function for deciding the toggling position for visual compensation
• A simple extension– RGB(255,0,255) → (0,255,0)– Low image quality
40
Color DHSPT-Proposed Method(1/3)
OriginalOriginalImageImage
Y componentY component
HalftoneHalftoneImageImage
EmbedddEmbedddImageImage
y componenty component
YCbCrYCbCrtransformtransform
CompensatedCompensatedImageImage
HalftoningHalftoning DHSTDHST DHSPTDHSPT
|Y-y||Y-y|
41
Color DHSPT-Proposed Method(2/3)
1. The embedding positions are decided by the random number and their color components are toggled
2. Only Y component is considered, because of its significance for human visual nature
3. If the Y difference between original and toggled image is small, the effect of toggling is inconspicuous
nmnmnm yYD ,,,
42
Color DHSPT-Proposed Method(3/3)
4. The evaluation measure by DHSPT for each component in 3*3 neighbor
5. These measures are combined for the evaluation of appropriate position for toggling as a pair and they given as
),(
),(
),(
,,,
,,,
,,,
nm
nm
nm
conDDB
conDDG
conDDR
Bnmnmnm
Gnmnmnm
Rnmnmnm
otherwisenmcon
horizontalveritcalnmcon
nmcon
DHSPTbefore
DHSPTbefore
DHSPTafter
),(11
),(10
),(
nmnmnm yYD ,,,
6.6. Find the minimumFind the minimum
Improved Techniques for Watermarking Halftone Images
Author: Phil Sherry and Andreas SavakisSource:ICASSP-2004
44
Proposed improvement
• Data Hiding Cell Parity (DHCP)
• Data Hiding Mask Toggling (DHMT)
• Dispersed Pseudorandom Generator (DPRG)
45
Data Hiding Cell Parity
• Encoding the data stream in the parity domain instead of individual pixel
• Parity is contained within the 2*2 area
• If embedded bit is equal to parity, no action is performed. Otherwise, a complementary toggle is performed
2mod PParityT T T T
T P P T
T P P T
T T T T
The main motivation to increase DHSPT candidate search space (820)
46
Data Hiding Mask Toggling
• A post-halftoned watermark that works by encoding two bits in the 2*2 area
• Each 2-bit data is assigned a set of five possible encoding masks
• The masks maintain the cell intensity and minimizing visual degradation
High-Capacity Data Hiding in Halftone Images Using Minimal-Error Bit
Searching and Least-Mean Square Filter
Author: Soo-Chang Pei, Jing-Ming GuoSource: IEEE Transactions on Image Processing, VOL. 15, NO.6,June 2006
48
Stand EDF flow chat
1. find the closest color available
2. Calculate the difference between the value in the image and the color you have
3. divide up these error values and distribute them over the neighboring pixels which you have not visited yet
49
3 bit gray code and information bit
50
Generate the Gray code
• Generate the 3-bit Gray code and address each codeword with a corresponding information bit 0 or 1
• The information bits 0 and 1 are arranged alternately, and the table is divided into two groups
51
Hiding Data
• If the information bit 0 is embedded into the host EDF images, then we check if the binary output vector Bi,j is mapped to 0-group
– If yes, then no bit in this vector should be varied– if no, then we just need to modify one bit in this vector
52
Proposed high-capacity MEBS data-hiding encoder
53
Minimal Error Bit Searching(1/2)
• Encoder– Be used for judging which bit in the vector is the most
suitable candidate1. Find the complementary binary vector of the temporary
binary output vector
1
0
,0
,1,....,2,1|
,
,,,,
kji
kjik
jikjiji b
b
if
ifbwherenkbB
jiB ,
jiB ,
2. Calculate all the differences between the gray outputs and the complementary binary outputs, where k=1,2,..,n
kji
kji
kji bve ,,,
kjiv ,
54
Minimal Error Bit Searching(2/2)
3. Suppose ;then, the modified binary output vector is formed as
nkee kji
mji ,....,2,1|min ,,
nji
mjijijiji bbbbB ,,
2,
1,
', ,....,,......,,
•Decoder :•Using the table lookup method (LUT)•Ex : from the gray code table, {1,0,1} represents “1” had been embedded
55
Modified MEBS
• When the capacity gets as high as 50%, the watermarked image quality will be degraded
kji
kji
kji bve ,,,
otherwisebv
bvERRifERR
bvERRifERR
ekji
kji
kji
kjithth
kji
kjithth
kji
,,
,,
,,
, ,
, The best choice is 135
56
Robust Watermarking
• Divide each original gray-level images of size into several cells of size
• In each cell, embed the same information bit• Use the majority voting to recover the damaged
portion caused by all kinds of distortions
57
Pei’s Measure
• For an image with size P*Q– Wm,n : the human visual system (HVS) coeffi
cient at position (m,n)
– Xi,j : the original image
– Bi,j : the halftone image
P
i
Q
j Rnmnjminmji bwx
QPPSNR
1 1 ,,,,
2255**
LMS’s distribution
58
Result
• In this paper, a high-capacity data-hiding method in halftone image using the MEBS technique is proposed
• From the experimental results, they prove that, when the capacity is as high as 33.33%, good qualities of the embedded halftone images can be achieved
59
Conclusion
• Halftone is still dominant in usual office
• challenge– Physical challenges : scanner resolution– Affine Transformation : Rotation 、 Translati
on– Dirt and Stains– ……..
60
Reference
• S.F. Ming and C.A. Oscar, “Data Hiding Watermarking for Halftone Image,” IEEE Trans. on Image Processing, April 2002
• Mitsuji Muneyasu, Masayuki Inoue and Yoko Kitamura, ”An Extension of DHSPT to Color Half-tone Images,” ISCIT 2004
• Phil Sherry and Andreas Savakis, “Improved Techniques for Watermarking Halftone Images,” ICASSP 2004
• Kimiyoshi Arishima, Makoto Kitamura & Fumitaka Ono, “A study on the data hiding rate for halftone images,” Signal Processing and Its Applications, August 2005
• S. C. Pei and J. M. Guo, "High-capacity data hiding in halftone images using minimal error bit searching," IEEE International Conference on Image Processing, Singapore, Oct 2004
• J. M. Guo, S. C. Pei, and H. Lee, "Watermarking in halftone images with parity-matched error diffusion," IEEE International Conference on Speech, Acoustics, and Signal Processing , U.S.A. March 2005
• S. C. Pei, and J. M. Guo, “High capacity data hiding in halftone images using minimal error bit searching and least mean square filter,” IEEE Trans. Image Processing, vol. 15, no. 6, pp. 1665-1679, June, 2006