program homework implementation of the improved spread spectrum watermarking system
TRANSCRIPT
Program Homework
Implementation of the Improved Spread Spectrum Watermarking System
2
Reference
• Ingemar J. Cox, Joe Kilian, F. Tomson Leighton, and Talal Shamoon, “Secure Spread Spectrum Watermarking for Multimedia,” IEEE Trans. On Image Processing, vol. 6, no. 12, December 1997
• H. S. Marvar and A. F. Florencio, "Improved Spread Spectrum: A New Modulation Technique for Robust Watermarking," IEEE Trans. on Signal Processing, vol. 51, no. 4, April 2003
3
Basic Knowledge
• 2-D DCT• DCT pattern for an 8x8 block• https://en.wikipedia.org/wiki/Discrete_cosine_transform
Middle Band
Low Band
High Band
Spread-Spectrum Watermarking
5
Spread Spectrum
• General form
• Note:• This notation is a little different from Cox 1997,
“Secure Spread Spectrum Watermarking for multimedia”• To match this form to Cox 1997
• V, X are respect to x, u• u = ()T
• b=1
6
Spread Spectrum
• Define• The watermark W = b1 b2 … bn ( ex. n = 1000 )
bi ~ N(0,1)Use Sign(.) to convert bi into 1 or -1
• The Cover Image C is transformed by N×N DCT. Ct=DCT(C).The coefficients to be altered X = x1 x2 … xm
(m coefficients in the Ct except DC, m: extract pattern length)• How to choose X: many heuristics
• In zigzag order choose an interval length = m• Max m coefficients in zigzag order• Random sample m coefficients• m coefficients with largest DCT value• …
7
Spread Spectrum
• Define• The scaling parameter α (e.g. α = 0.1~100 ?)• Extract pattern: (), Length of = m
• can be generate by an N(0,1) + sign(.)• We can use to spread b into many frequency band and extract
it from embedded image
8
Spread Spectrum
• Basic Idea• = + α * b *
• : watermarked signal• : original signal• α: scaling factor for watermark strength• b: watermark bit ()• : extract pattern ()
• Use to spread signal b into many frequency band• In this talk we take s = x + α * b * for example
As you know si = xi(1+ α * b *) can also be our embedding method!!
9
Spread Spectrum
• Embedding Illustrate• Given an image I• Transform color domain from rgb to ycbcr, and then we chose y
channel to embed our watermark • Perform 2-D DCT to y channel• Chose m elements from middle band to get
Middle Band =
Low Band
High Band
= ( )
10
Spread Spectrum
• Embedding Illustrate• Given an Watermarking bit b• Use pattern to spread b’s information into many frequency band• = + α * b *
• Where
b =
�⃑�=(±1⋮
±1)
α = 0.1~100
= ( ) =( )
11
Spread Spectrum
• Extracting Illustrate• Given a watermarked I• Transform color domain from rgb to ycbcr, and then we chose y
channel to extract our watermark • Perform 2-D DCT to y channel• Chose m elements(the same elements in embedding process) from
middle band to get
Middle Band =
Low Band
High Band
= ( )
12
Spread Spectrum
• Extracting Illustrate• Recall: Embedding function
• = + α * b * • Calculate similarity sim =
• Ideal case We can get sim = α * b * = α * b
• Use sign(sim) to extract watermark bit b
13
Spread Spectrum
• So far, we can embed just “1” bit message into imageBut, how can we embed “n” bits?
• 3 Ways• Code division
• Use different extract pattern(orthogonal extract patterns are suggest)
• Frequency division• Embed message into different frequency band
• Spatial division• Slice image into many blocks each block embeds 1 bit
message
Improved Spread-Spectrum Watermarking
15
Improved Spread Spectrum
• Define• The watermark W = b1 b2 … bn ( ex. n = 1000 )
bi ~ N(0,1)Use Sign(.) to convert bi into 1 or -1
• The Cover Image C is transformed by N×N DCT. Ct=DCT(C).The coefficients to be altered X = x1 x2 … xm
(m coefficients in the Ct except DC, m: extract pattern length)• How to choose X: many heuristics
• In zigzag order choose an interval length = m• In this homework we suggest you to use it
• Max m coefficient in zigzag order• Random sample m coefficient• m coefficient with largest DCT value• …
16
Improved Spread Spectrum
• Define• The scaling parameter α (α = 0.1~100 ?)
• The interference control parameter λ • Around 1 will have better performance
• Extract pattern: (), Length of = m• can be generate by an N(0,1) + sign(.)• We can use to spread b into many frequency band and extract
it from embedded image
17
Improved Spread Spectrum
• Basic Idea• = + (α * b -λ * ) *
• , , α, b, : the same as Spread Spectrum• λ: control parameter of cover interference• <a, b>: inner product of vector a and b
• Use lambda term to remove cover interference
18
Improved Spread Spectrum
• Embedding Illustrate• Given an image I• Transform color domain from rgb to ycbcr, and then we chose y
channel to embed our watermark • Perform 2-D DCT to y channel• Chose m elements from middle band to get
Middle Band =
Low Band
High Band
= ( )
19
Improved Spread Spectrum
• Embedding Illustrate• Given an Watermarking bit b• Use pattern to spread b’s information into many frequency band• = + (α * b -λ * ) *
• Where
b =
�⃑�=(±1⋮
±1)
α = 0.1~100
= ( ) =( )
λ = around 1
20
Improved Spread Spectrum
• Extracting Illustrate• Recall: Embedding function
• = + (α * b -λ * ) * • Calculate similarity sim =
• Basically can be canceled by -λ We can get sim = α * b * = α * b
• Use sign(sim) to extract watermark bit b
21
Improved Spread Spectrum
• So far, we can embed just “1” bit message into imageBut, how can we embed “n” bits?
• 3 Ways• Code division
• Use different extract pattern(orthogonal extract patterns are suggest)
• Frequency division• Embed message into different frequency band
• Spatial division• Slice image into many blocks each block embeds 1 bit
message• In this homework we use this method
22
Measurements
• We always have three dimensions in measurement stage• Capacity• Fidelity• Robustness
• When measuring one dimension, you must fix the others• When compare two dimensions, you must fix the other
23
Measurements
• Measurements for Capacity• Amount of message that embedded in cover image• How to improve capacity
• The more blocks you slice the original image, the more bits you can embed into it
• As you know, code division, frequency division methods can also achieve capacity requirement.
24
Measurements
• Measurements for Fidelity• Quality of watermarked image
• Use PSNR value between original image and marked image• Reference website
• https://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio
• Code:• Call PSNR(imageA, imageB) in MATLAB
orFind PSNR code in web and use it
• How to improve fidelity• Consider influence of cover images not just use additive
operation to add watermark into it• Consider Human Visual System(ex: perceptual model)• Embedding in other domain(ex: wavelet based approach)
25
Measurements
• Measurements for Robustness• Resistance to several attacks• Use bit error rate BER to measurement performance
• Define:• : original watermark()T
• : extract watermark()T
• L: watermark length
• BER:• (amount of difference bit of and ) / L
• How to improve Robustness• Use adaptive alpha term • Use ECC(error correction code)• Consider JPEG effect(ex: quantization based approach)• Affine-Resistant Watermarking(Lecture 9)
26
Attacks
• Lossy Compression • JPEG compression
• Geometric Distortion• Rotation• Shifting• Scaling• Affine transform
• Cropping• Image Processing
• Blurring• …
27
Homework1 Rules
• Deadline: • 2015/11/30 14:00 (suggest)• Before the week of final exam(I will strictly grade your score)
• Hand-in instructions:• Program: MATLAB code(suggest), other languages are welcome(if I cannot run
your code, I will ask you to perform your program with your own laptop)• Report: PDF file(strongly suggest), others are welcome(but if my computer cannot
open it, you will get 0 score)• Zip all program files, reports into one file and sent to
• Title the mail as: [MMSEC]2015HW1_studentID• Name the attached file as: [MMSEC]2015HW1_studentID.zip• studentID example: R03944006
28
Homework1
• Grading Criteria• Program (30%):
• embed and extract ISS functions• A main program to perform embed and extract process
• Report (70%):• How to execute your code• Any special method you implement besides the basic ISS scheme• Test parameters used in ISS scheme• Test capacity, fidelity and robustness of your watermarking scheme• Compare Improved Spread Spectrum with Spread Spectrum • Compare the influence of attacks on your watermarking scheme
At least 6 types of attacks• Others
29
Homework1
• Baseline• Code: ISS scheme
• Use block DCT to embed message bits into each block• Use sim = to extract message m• Feel free to try different heuristic to chose embedding position• Feel free to try code division or frequency division methods to enhance
capacity
• Report:• Briefly explain what have you done• Feel free to try as many as possible experiments about ISS watermarking• Using images to perform your results is better than just plot test records • Using 中文 is ok, but we suggest you to use English• Have fun with this homework!!
When life gives you lemons, make lemonade
Bonus
• Please propose a blind watermarking scheme of Chiou-Ting Hsu and Ja-Ling Wu, "Hidden Digital Watermarks in Images," IEEE Trans. On Image Processing, Vol.8, No.1, pp.58~68 January. 1999.
• P.S.• You can write down your opinions of the new scheme only• Coding for the new scheme is welcome
30
Advanced Reading
• Watermarking on other multimedia • No limitation on multimedia materials.
• References:• Video
• “Digital Video Watermarking in P-Frames with Controlled Video Bit-Rate Increase”, IEEE Transactions on Information Forensics and Security, 2008.
• “Blind MPEG-2 Video Watermarking Robust Against Geometric Attacks: A Set of Approaches in DCT Domain”, IEEE Transactions on Image Processing, 2006.
• Audio• “Spread-Spectrum Watermarking of Audio Signals”, IEEE Transactions on Signal
Processing, 2003.• “Watermarked Movie Soundtrack Finds the Position of the Camcorder in a Theater”, IEEE
Transactions on Multimedia, 2009.
• Graphics• “Watermarking Three-Dimensional Polygonal Models Through Geometric and Topological
Modifications”, IEEE Journal on Selected Areas in Communications, 1998.
• Text• “Data Hiding in Binary Image for Authentication and Annotation”, IEEE Transactions on
Multimedia, 2004. 31