-
Notifications
You must be signed in to change notification settings - Fork 151
Frequency Methods
Qingquan(Q.Q.) Wang edited this page Feb 1, 2021
·
4 revisions
- dwtDct: DWT + DCT
- dwtDctSvd: DWT + DCT + SVD
The method conducts embedding in frequency space with DWT + DCT transform. This method runs fast and can be used for tracking the upload user. At the same time, it is sensitive to image size change.
Below is the test result and method process of DWT + DCT method. As for DWT + DCT + SVD method, the test result is almost same with this method, but it runs slower due to svd decomposition.
This method shows it is not robust to size or aspect ratio change but robust to noise, color filter, brightness and jpg compress. For better doc reading, we compress all images in this page, but the test is taken for 1920x1080 original image.
- Input Image: 1960x1080 Image
- Watermark: 64bits, string expression "qingquan"
- Encode Time: 350ms
- Decode Time: 150-200ms
- Parameters: only take U frame to keep image quality,
scale=36
Watermarked Image
Attacks | Image | Result |
---|---|---|
JPG Compress | Pass | |
Noise | Pass | |
Brightness | Pass | |
Overlay | Pass | |
Mask | Pass | |
crop 7x5 | Fail | |
Resize 50% | Fail | |
Rotate 30 degress | Fail |
- BGR Image: bgr = matrix width x height x 3
- watermark bits list: wm = [0,1,...]
- watermark bits length: wmLen = 32
- Convert BGR color space to YUV space
- Take U frame, compute haar DWT transform.
ca1, (h1,v1,d1) <- 2 dimension dwt(Uframe)
- split
ca1
into4x4
blocks - For each block
(b,n), b is 4x4 block, n means the n-th block
. compute DCT transform,coefficients = dct(b)
- Embed
wmbit = wm[n % wmLen]
into max non-trivial coefficient as below
(p,q) <- max(abs(coefficient[i][j]), i+j > 0)
if wmBit == 1 then: coef[p][q] = (coef[p][q]//scale + 0.75) * scale
else: coef[p][q] = (coef[p][q]//scale + 0.25) * scale
- for each block, reverse DCT
- reverse DWT
- change YUV to BGR space
- BGR Image: bgr = matrix width x height x 3
- watermark bits length: wmLen = 32
- Convert BGR color space to YUV space
- Take U frame, compute haar DWT transform.
ca1, (h1,v1,d1) <- 2 dimension dwt(Uframe)
- split
ca1
into4x4
blocks - For each block
(b,n), b is 4x4 block, n means the n-th block
. compute DCT transform,coefficients = dct(b)
- Decode
wmbit = wm[n % wmLen]
from max non-trivial coefficient as below
(p,q) <- max(abs(coefficients[i][j]), i+j > 0)
if coef[p][q] % scale > 0.5 * scale then: wmbit = 1
else: wmbit = 0
- calculate all watermark bits. Probably we decode the same bit from different blocks, we use avg > 0.5 to decide the final watermark bit