ece738 advanced image processing data hiding (1 of 3) curtsey of professor min wu electrical &...
TRANSCRIPT
ECE738 Advanced Image Processing
Data Hiding (1 of 3)
Curtsey of Professor Min Wu Electrical & Computer EngineeringUniv. of Maryland, College Park
Min Wu @ U. Maryland 2002 2ECE738 Advanced Image Processing
Review of Last Class• Wrap up optimal 1-bit detection
– Performance is determined by SNR and signal length (# observations)– Detection under low SNR ~ use longer signal
• Cryptographic tools for secure communications– Building blocks: pseudo-random # generator, one-way func., hash– Encryption– Integrity verification (tampering detection)
=> 3rd lecture notes http://www.ece.umd.edu/class/enee739m/lec/739S02_lec3.pdf
• Today– Quick review on image processing– Intro. to data hiding: additive embedding
Min Wu @ U. Maryland 2002 4ECE738 Advanced Image Processing
What is An Image?
• Grayscale image– A grayscale image is a function I(x,y) of the two spatial coordinates of
the image plane.
– I(x,y) is the intensity of the image at the point (x,y) on the image plane.
– We can restrict the image to be bounded by some rectangle [0,a][0,b]
I: [0, a] [0, b] [0, inf )• Color image
– Can be represented by three functions, R(x,y) for red, G(x,y) for green, and B(x,y) for blue.
Min Wu @ U. Maryland 2002 5ECE738 Advanced Image Processing
Sampling and Quantization
• Computer handles “discrete” data.• Sampling
– Sample the value of the image at the nodes of a regular grid on the image plane.
– A pixel (picture element) at (i, j) is the image intensity value at grid point indexed by the integer coordinate (i, j).
• Quantization– Is a process of transforming a real valued
sampled image to one taking only a finite number of distinct values.
– Each sampled value in a 256-level grayscale image is represented by 8 bits.
0 (black)
255 (white)
Min Wu @ U. Maryland 2002 6ECE738 Advanced Image Processing
Examples of Sampling
256x256
64x64
16x16
Min Wu @ U. Maryland 2002 7ECE738 Advanced Image Processing
Examples of Quantization
8 bits / pixel
4 bits / pixel
2 bits / pixel
Min Wu @ U. Maryland 2002 8ECE738 Advanced Image Processing
Different Color Representations
• RGB• YIQ for NTSC transmission system
– National Television Systems Committee (NTSC)
– Receiver primary sys. (RN, GN, BN) as TV receivers standard
– Transmission system (Y, I, Q)• facilitate transmission of color video via monochrome TV ch.
• YUV (YCbCr) for PAL and digital video• HSV ~ Hue, Saturation, Value• CMY for printing
– Cyan, Magenta, Yellow (complement of RGB)
Min Wu @ U. Maryland 2002 10ECE738 Advanced Image Processing
Why Do Transforms?
• Fast computation– E.g., convolution vs. multiplication
• Conceptual insights for various image processing– E.g., spatial frequency info. (smooth, moderate change, fast
change, etc.)• Obtain transformed data as measurement
– E.g., radiology images (medical and astrophysics)– Need inverse transform– May need to get assistance from other transforms
• For efficient storage and transmission– Pick a few “representatives” (basis) – Just store/send the “contribution” from each basis
Min Wu @ U. Maryland 2002 11ECE738 Advanced Image Processing
Review of 1-D & 2-D Unitary Transforms
• Vector/matrix representation of 1-D & 2-D sampled signal– Representing an image as a matrix or sometimes as a long vector
• Basis functions/vectors and orthonormal basis– Used for representing the space via their linear combinations– Many possible sets of basis and orthonormal basis
• Unitary transform on input x ~ A-1 = A*T – y = A x x = A-1 y = A*T y = ai
*T y(i) ~ represented by basis vectors {ai*T}
– Rows (and columns) of a unitary matrix form an orthonormal basis• General 2-D transform and separable unitary 2-D transform
– 2-D transform involves O(N4) computation– Separable: Y = A X AT = (A X) AT ~ O(N3) computation
• Apply 1-D transform to all columns, then apply 1-D transform to rows
Min Wu @ U. Maryland 2002 12ECE738 Advanced Image Processing
Common Unitary Transforms– DFT, DCT, Haar
See also: Jain’s Fig.5.2 pp136
Min Wu @ U. Maryland 2002 13ECE738 Advanced Image Processing
Lossless Coding Tools• PCM encoding
– Fixed-length encoding of a sampled and quantized signal
• Entropy encoding– Basic ideas ~ why bring in probability distribution?
• Assign shorter codeword to commonly seen values
– Limit of compression ~ Entropy
– Huffman coding
– Run-length coding
• Predictive coding– Basic ideas and DPCM
Min Wu @ U. Maryland 2002 14ECE738 Advanced Image Processing
Transform Coding• Basic ideas
– Energy compaction via appropriate transform
– Adaptive bit allocation• allocate more bits to info.-rich coefficient bands
• General block-based transform coding– Tradeoff for block size
– Ordering & Zonal/Threshold coding
• JPEG baseline algorithm (block DCT based)
Min Wu @ U. Maryland 2002 15ECE738 Advanced Image Processing
Illustration of JPEG Baseline Algorithm
– Block diagram from Wallace’s JPEG tutorial paper– Flash demo by Dr. Ken Lam (Hong Kong PolyTech Univ.)
Min Wu @ U. Maryland 2002 17ECE738 Advanced Image Processing
Crypto is Useful, but Not Enough ……
• Encryption– Helps to protect confidentiality – Protection vanishes after decryption– Prefer a way to associate copyright info. with MM source even after
decryption/compression/transmission/etc.
• Digital cryptographic signature – Helps to authenticate sender’s identity and data integrity– Need to attach a separate signature to the data source– Audio/image/video allows imperceptible changes– Opportunities for new and seamless ways of authentication
Min Wu @ U. Maryland 2002 18ECE738 Advanced Image Processing
Multimedia Data Hiding / Digital Watermarking
• What?– Examples
• Picture in picture, words in words• Silent message, invisible images
– Secondary information in perceptual digital media data
• Why?– Seeing is believing?
• easy to modify --> authentication
– Copy with a few mouse click• easy to copy without degradation --> ownership
– Convey other information without an additional channel
Min Wu @ U. Maryland 2002 19ECE738 Advanced Image Processing
General Framework
marked media(w/ hidden data)
embedembeddata to be data to be hiddenhidden
host media
compresscompress
process / process / attackattack
extractextract
play/ record/…play/ record/…extracted extracted datadata
playerplayer
101101 …101101 …
““Hello, World”Hello, World”
101101 …101101 …
““Hello, World”Hello, World”test media
Min Wu @ U. Maryland 2002 20ECE738 Advanced Image Processing
Issues and Challenges• Tradeoff among conflicting requirements
– Imperceptibility
– Robustness & security
– Capacity• want to many bits and extract them with small prob. of errors
Robustness
Capacity
Imperceptibility
Min Wu @ U. Maryland 2002 21ECE738 Advanced Image Processing
Additive Embedding: Basic Ideas• Add a weak signal representing ownership in host media
– The weak signal (“watermark”) is known to detector– Detection by correlating a test copy with the watermark signal
• Achieving invisibility– Watermark signals with structural patterns can be easily perceived than random
noisy signals• Achieving robustness
– Watermarks added to perceptually insignificant components can easily be distorted
modulationmodulation
data to be hidden
Xoriginal source
X’ = X + marked copy
1011 …...1011 …...
Min Wu @ U. Maryland 2002 22ECE738 Advanced Image Processing
Theoretical Foundations• Optimal detection for On-Off Keying (OOK)
– OOK under i.i.d. Gaussian noise {di}
• b{0,1} represents absence vs. presence of ownership mark• Use a correlator-type detector (recall the review last week)
– Need to determine how to choose {si}
• Neyman-Pearson Detection [Poor’s book Sec.2.4]
– False-alarm ~ claiming wmk existence when nothing embedded
– Given max. allowed false-alarm, try to minimize prob. of miss detection• Use likelihood ratio as detection statistic• Determine threshold according to false-alarm prob.
n~1ifor )1 (if :
)0 (if :
1
0
bdsyH
bdyH
iii
ii
Min Wu @ U. Maryland 2002 23ECE738 Advanced Image Processing
Spread Spectrum Approach: Cox et al (NECI)
• Key points– Place wmk in perceptually significant spectrum (for robustness)
• Modify by a small amount below Just-noticeable-difference (JND)
– Use long random vector as wmk to avoid artifacts (for imperceptibility & robustness)
• Embedding v’i = vi + vi wi = vi (1+ wi)
– Perform DCT on entire image and embed wmk in DCT coeff.
– Choose N=1000 largest AC coeff. and scale {vi} by a random factor
2D DCT sort v’=v (1+ w) IDCT & normalize
Original image
N largest coeff.
other coeff.
marked image
random vector generator
wmk
seed
1.0nceunit varia zeromean, iid,~iw
Min Wu @ U. Maryland 2002 24ECE738 Advanced Image Processing
Cox’s Scheme (cont’d)
• Detection– Subtract original image from the test one before running through detector
– Original detection measure used by Cox et al.• a correlator normalized by |Y|
DCT
compute similarity
thresholdtest image
decision
wmk
DCT select N largest
original unmarked image
select N largest
preprocess
–
YY
WYWYsim
,
,),(
k watermar
watermarkno
:1
:0
NWYH
NYHXXY
–orig X
test X’
X’=X+W+N ?
X’=X+N ?
To think
To think
Min Wu @ U. Maryland 2002 25ECE738 Advanced Image Processing
Cox’s Scheme (cont’d)
• Robustness– (claimed) scaling, JPEG, dithering, cropping, “printing-xeroxing-scanning”,
multiple watermarking
– No surprise with high robustness• Equiv. to conveying just 1-bit {0,1} with O(103) samples
• Comment– must store original unmarked image “private wmk”, “non-blind” detect.
– perform image registration if necessary
– adjustable parameters: N and
Distortion none scale25%
JPG10%
JPG 5% dither crop25%
print-xerox-scan
similarity 32.0 13.4 22.8 13.9 10.5 14.6 7.0 threshold = 6.0 (determined by setting false alarm probability)
Min Wu @ U. Maryland 2002 26ECE738 Advanced Image Processing
Invisible Robust Wmk: Improved Schemes
• Apply better Human-Perceptual-Model– Global scaling factor is not suitable for all coeff.
– More explicitly compute Just-noticeable-difference (JND) • JND ~ max amount each freq. coeff. can be modified imperceptibly
• Use i for each coeff. finely tune wmk strength
– Better tradeoff between imperceptibility and robustness• Try to add a watermark as strong as possible
• Block-DCT based schemes:– Podichuk-Zeng & Swanson et al.
– Existing visual model for block DCT: JPEG
)1(' iiii wvv
Min Wu @ U. Maryland 2002 27ECE738 Advanced Image Processing
Compare Cox & Podilchuk Schemes
Original Cox Podilchuk
whole image DCT block-DCT
Embed in 1000 largest coeff. Embed to all “embeddables”
Min Wu @ U. Maryland 2002 28ECE738 Advanced Image Processing
Compare Cox & Podilchuk Schemes (cont’d)
Cox Podilchuk
Min Wu @ U. Maryland 2002 29ECE738 Advanced Image Processing
Summary
• Quick review of image processing basics• Introduction to data hiding: Additive Embedding
– Use hypothesis testing as foundations– Determine embedding domains and watermark sig.– Cox approach– Improvement (Podilchuk approach)
Min Wu @ U. Maryland 2002 30ECE738 Advanced Image Processing
Suggested reading– I. Cox, J. Kilian, T. Leighton, T. Shamoon: “Secure Spread Spectrum
Watermarking for Multimedia'', IEEE Transaction on Image Processing, vol.6, no.12, pp.1673-1687, 1997.
– Download from IEEE online journal, or http://www.neci.nj.nec.com/homepages/ingemar/papers/ip97.ps
– C. Podilchuk and W. Zeng, “Image Adaptive Watermarking Using Visual Models,” IEEE Journal Selected Areas of Communications (JSAC), vol.16, no.4, May, 1998.
– Download from IEEE online journal
– Logistics• No class on Tue. 2/12/02• This week’s office hour will be Fri. (tomorrow) 10-11am• Assignment on additive watermark will be announced
Min Wu @ U. Maryland 2002 31ECE738 Advanced Image Processing
Question for Today (QFT)
• [Hand-in] Optimal detection for OOK
– On-Off Keying under i.i.d. Gaussian noise {di}
– Determine the detection statistic, threshold, and Pe(assume equal prior probability)
• [Food-for-thought]– How to detect additive watermark without using the original?
– Attacks on additive embedding ~ making it undetectable
n~1ifor )1 (if :
)0 (if :
1
0
bdsyH
bdyH
iii
ii
Min Wu @ U. Maryland 2002 32ECE738 Advanced Image Processing
Issues and Challenges
• Tradeoff among conflicting requirements
– Imperceptibility– Robustness & security– Capacity
• Key elements of data hiding– Perceptual model– Embedding one bit– Multiple bits– Uneven embedding capacity– Robustness and security– What data to embed
Up
per
L
ayer
s
Uneven capacity equalization
Error correction
Security
……
Low
er
Lay
ers
Imperceptible embeddingof one bit
Multiple-bit embedding
Coding of embedded data
Robustness
Capacity
Imperceptibility
Min Wu @ U. Maryland 2002 33ECE738 Advanced Image Processing
Type-I Additive Embedding
• Add secondary signal in host media• Representative: spread spectrum embedding
– add a noise-like signal and detection via correlation– good tradeoff between imperceptibility and robustness– limited capacity
• host signal serves as major interferer
modulationmodulation
data to be hidden
Xoriginal source
X’ = X + marked copy
10110100 ...10110100 ...
< X’ + noise, > = < + (X + noise), >
< X’ + noise - X, > = < + noise, >
Min Wu @ U. Maryland 2002 34ECE738 Advanced Image Processing
Type-II Relationship Enforcement Embedding
• Deterministically enforcing relationship – Secondary info. carried solely in X’
• Representative: odd-even embedding– No interference from host signal– High capacity but limited robustness– Robustness achieved by quantization or tolerance zone
– Odd-even enforcing blackpixel# per block to hide data in binary image
mappingmapping{ bi }data tobe hidden X
original source
X’= f( b )marked copy
101101 ...101101 ...
even “0”odd “1”
Min Wu @ U. Maryland 2002 35ECE738 Advanced Image Processing
Conveying One-bit Through Noisy Channel (cont’d)
• Optimal detection ~ minimize prob. of errorMAP ~ maximize posterior probability
=> ML ~ maximum likelihood detector [for equal prior]
=> Minimum distance detector [for iid Gaussian noise]
=> Maximum correlation detector [for equal-energy sig.]
• Detection statistics
– [correlator] i yi si
• Prob. distribution under each hypothesis ~ N( ||s||2 , ||s||2 d 2
)
– [correlator with unit-variance] i yi si / [(i si 2) d
2 ]1/2 ~ N( ||s||/d ,1)
n~1ifor )1 (if :
)1 (if :
1
1
bdsyH
bdsyH
iii
iii
Min Wu @ U. Maryland 2002 36ECE738 Advanced Image Processing
Performance of Optimal Detector• Probability of detection error = Q (||s||/d )
– Q (x) is monotonically decreasing for non-negative x
– Signal-to-noise ratio (SNR) ~ (||s||2/n) / d 2
• Communications under very low SNR– Choose large n
• collect info. (energy) from many signal components• a basic idea behind “spread spectrum communications”
• Useful in invisible watermarking (data hiding)– Adding or subtracting a weak signal to convey one-bit hidden info.
– Will go into more details next time
• Extension for non-i.i.d. Gaussian noise
Min Wu @ U. Maryland 2002 37ECE738 Advanced Image Processing
Related Terminology• stegnography: the art/science of communicating in a hidden way
– “covered writing” (Greek)• cryptography: the study/application of secret writing techniques
– encipher and decipher messages in secret code
DEFENSEIntroduction to watermarking
PLANmagic ink
Do others …? know the data’sexistence?
know how todetect the data?
stegnography maybe not no (but may try)
cryptography yes no (but may try)
orig: watermarking
crypt: dzgvinziprmt
a b c … … x y zz y x … … c b a
Min Wu @ U. Maryland 2002 38ECE738 Advanced Image Processing
Categories of Watermarking
• digital media– speech/audio, image, video, 3D model @
• perceptible / imperceptible @
• robust / fragile @
– wrt. further compression, processing, and/or attack
• private / public– use original copy or not
focused
Min Wu @ U. Maryland 2002 39ECE738 Advanced Image Processing
Major Applications• ownership protection @
– visible wmk … still visually annoying– invisible wmk … robustness preferred
• tradeoff between invisibility and robustness• authentication @
– easy to edit digital media– detect (and locate) alteration trustworthy dig.camera
visible/invisible
robust/fragile
private/public
verifyownership
detectalteration
imagequality
visible public easy possible degradeinvisible robust ? possible hard goodinvisible fragile public no yes good
inv.
rob.
pub.
Min Wu @ U. Maryland 2002 40ECE738 Advanced Image Processing
Major Applications (cont’d)
• copy control– identify recipients– permission control on
hardware
• convey other info.– data hiding
cable co.
Shakespeare in Love
Alice
Bob
Carl
w1w2w3
SellSell
DON’T
COPY
Titanic
Rec’ble DVD Player
Min Wu @ U. Maryland 2002 41ECE738 Advanced Image Processing
Watermarking vs. Data Hiding
work for ... use orig. copy invisible robust
watermarking perceptualsource
either either either
data hiding any no usually yes generally no
• almost interchangable• some conventional distinctions
hiding
wmk
hiding
wmk
Min Wu @ U. Maryland 2002 42ECE738 Advanced Image Processing
Verify Ownership: Invisible Robust Wmk
• Encryption no longer protects decrypted image• Visible watermark: ... still visually annoying
• Invisible watermark: ... robustness is necessary
– robust wrt. common image processing techniques, distortions, and attacks
– tradeoff between invisibility and robustness
• Existing work– spread spectrum approach [ Cox et al (NECI) ]– visual model based approaches– ...