讲解:digital media、Matlab、MatlabSP

2019-12-29  本文已影响0人  haoyuanjun

Assignment 4: Phase Correlation for Digital Watermark DetectionIntroductionIn order to combat copyright fraud of digital media including images, video and audio, it is desirable toembed a hidden ‘watermark’ onto the signal. A good ‘watermark’ should not compromise the perceivedquality of the original signal, and should carry enough information to accurately determine the source ofthe copied signal. A good ‘watermark’ should also be robust in the sense that it is virtually impossible toremove (without excessive disruption to the signal) and also relative immune to false detection (when thewatermark isn’t present).Many watermarks can be viewed as some form of spread spectrum technique, which involves spreading thewatermark across a whole range of frequencies.In this exercise we shall consider a simple watermarking system together with a detection method based onphase correlation. You are required to use the phase correlation method to detect the 5 delay parametersused to embed a watermark onto a parent signalx[n]to give a watermarked signalx [n] m. In this exercisewe will consider a relatively simple watermarking system which involves the weighted addition of a knownwatermark signalm[n]at 5 different delaysi d. The watermarked signal can thus be represented as:The task is then to determine the delay parametersi dwhich can be considered as the embeddedinformation.The watermark signalm[n](which is common to all students) can be found in:DFSA\restricted\assignment4_embedded_signal.wavYour individual watermarked signalx [n] mcan be found as:DFSA\restricted\xxxxxx\sample4_xxxxxx.wavWhere xxxxxx is your UOB username.Phase CorrelationLet 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 Gaussianwhite noise. This approach has been used in this exercise.Assuming low correlations, we find that:Note that this is effectively a matc代写digital media作业、Matlab程序设计作业调试、Matlab语言作业代做 代做SPSS|代做R语言程序hed filter. Unfortunately the convolution becomes very computationallyintensive for large signals. Instead we can implement this in the frequency (DFT) domain by realising thatlinear convolution is very similar to cyclic convolution, and cyclic convolution in the time domainx[n] y[n]is equivalent to multiplication in the frequency domainX[k]Y[k]. To minimise the errorscaused by the difference between the cyclic convolution and linear convolution, we can use an appropriatewindoww[n].Also using the knowledge that the DFT. In practice it works much better if wenormalise the magnitude ofto get a much clearer peak.Note in Matlab we need to be careful about the indexing, since a delay ofdi= 0will appear as a peak ofc[n]atn = 0which in Matlab notation would be c(1)Submission procedureYou should submit your solution as a single Matlab .mat file to the following address:DFSA\restricted\xxxxxx\submit\assignment4_xxxxxx.matWhere xxxxxx is your UOB username.The .mat file should contain a single column vector named delays. This vector should contain 5integer 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 range0  di  100 .Please do not include any other data in your .mat file. See Matlab help on the save command for savingindividual 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 knowndelay and checking that the detection method gives the correct answer. The following code will produce atest sample with a single mark with delay of 5 samples.[x,fs] = audioread(Audio Sample.wav);ns = 44100 * 3; % Use only 3 secondsx = 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);转自:http://www.6daixie.com/contents/12/4575.html

上一篇下一篇

猜你喜欢

热点阅读