联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp

您当前位置:首页 >> Matlab编程Matlab编程

日期:2019-12-15 10:35

Assignment 4: Phase Correlation for Digital Watermark Detection

Introduction

In order to combat copyright fraud of digital media including images, video and audio, it is desirable to

embed a hidden ‘watermark’ onto the signal. A good ‘watermark’ should not compromise the perceived

quality of the original signal, and should carry enough information to accurately determine the source of

the copied signal. A good ‘watermark’ should also be robust in the sense that it is virtually impossible to

remove (without excessive disruption to the signal) and also relative immune to false detection (when the

watermark isn’t present).

Many watermarks can be viewed as some form of spread spectrum technique, which involves spreading the

watermark across a whole range of frequencies.

In this exercise we shall consider a simple watermarking system together with a detection method based on

phase correlation. You are required to use the phase correlation method to detect the 5 delay parameters

used to embed a watermark onto a parent signal

x[n]

to give a watermarked signal

x [n] m

. In this exercise

we will consider a relatively simple watermarking system which involves the weighted addition of a known

watermark signal

m[n]

at 5 different delays

i d

. The watermarked signal can thus be represented as:

The task is then to determine the delay parameters

i d

which can be considered as the embedded

information.

The watermark signal

m[n]

(which is common to all students) can be found in:

DFSA\restricted\assignment4_embedded_signal.wav

Your individual watermarked signal

x [n] m

can be found as:

DFSA\restricted\xxxxxx\sample4_xxxxxx.wav

Where xxxxxx is your UOB username.

Phase Correlation

Let us assume that our watermarked signal can be represented as:

x [n] x[n] m[n d] m

= +? ?

Ideally the watermark signal should be uncorrelated either with itself or the parent signal:

This is equivalent to saying that:

A simple way to achieve low correlations is to construct the watermark signal as a sample of Gaussian

white noise. This approach has been used in this exercise.

Assuming low correlations, we find that:

Note that this is effectively a matched filter. Unfortunately the convolution becomes very computationally

intensive for large signals. Instead we can implement this in the frequency (DFT) domain by realising that

linear convolution is very similar to cyclic convolution, and cyclic convolution in the time domain

x[n]? y[n]

is equivalent to multiplication in the frequency domain

X[k]Y[k]

. To minimise the errors

caused by the difference between the cyclic convolution and linear convolution, we can use an appropriate

window

w[n].

Also using the knowledge that the DFT. In practice it works much better if we

normalise the magnitude of

to get a much clearer peak.

Note in Matlab we need to be careful about the indexing, since a delay of

di

= 0

will appear as a peak of

c[n]

at

n = 0

which in Matlab notation would be c(1)

Submission procedure

You should submit your solution as a single Matlab .mat file to the following address:

DFSA\restricted\xxxxxx\submit\assignment4_xxxxxx.mat

Where xxxxxx is your UOB username.

The .mat file should contain a single column vector named delays. This vector should contain 5

integer values corresponding to the 5 delay values. The assignment will be automatically marked out of 20,

with 4 marks for each correctly identified delay value. Delays which are wrong by ±1 will receive 2 marks.

In this exercise, all delays should be positive integers in the range

0 ? di ? 100 .

Please do not include any other data in your .mat file. See Matlab help on the save command for saving

individual variables.

Note: Failure to follow these instructions may result in loss of marks for the assignment.

It is advisable to experiment with the phase correlation method by adding a mark to a signal with known

delay and checking that the detection method gives the correct answer. The following code will produce a

test sample with a single mark with delay of 5 samples.

[x,fs] = audioread('Audio Sample.wav');

ns = 44100 * 3; % Use only 3 seconds

x = x(1:ns,1); % Use only left channel

[m,fs] = audioread('assignment4_embedded_signal.wav');

delay = 5;

alpha = 0.002;

x(1+delay:ns,1) = x(1+delay:ns,1) + alpha * m(1:ns-delay,1);

audiowrite('test.wav',x,fs);


版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp