Problems with Matlab Projects? You may face many Problems, but do not worry we are ready to solve your Problems. All you need to do is just leave your Comments. We will assure you that you will find a solution to your project along with future tips. On Request we will Mail you Matlab Codes for Registered Members of this site only, at free service...Follow Me.

Hiding and Audio Watermarking

Encoding

Our three encoding algorithms all begin the same way. First we take the user-defined constant for the number of segments and split the input signal in the time domain. Each segment represents a possible bit of hidden data. More segments mean more bits and a higher data rate, but it also means fewer samples from which to decode.
Whenever we wish to encode a one we alter the time chunk according to the algorithm. To encode a zero we leave the segment alone. After altering (or not altering) each segment, we take the Inverse Fourier Transform if needed and recombine them into our marked ŝ(t).

Frequency-Masking Algorithm (FMA)

In this algorithm we take advantage of frequency masking. Since the human ear cannot hear quieter frequencies next to a louder frequency, we alter these values. To encode a one we find the Fourier Transform for each segment of time and find the max value of this transform. Then we scale the neighboring values on either side by some scalar α < 1.
The case where the max value is close to the edge of our segment is slightly more complicated. We chose to alter the values on the non-edge side as normal and to alter as many samples on the edge side as existed.
We cannot encode a bit if the maximum value is zero or if the neighboring frequencies are too small (according to some predefined value).
Testing revealed that α = .5 was clearly audible for all of our test files, but α =.95 was not enough of a difference for the computer to reliably detect.
Figure 1: Diagram of Frequency Encoding Algorithm
Diagram of Frequency Encoding Algorithm
Diagram of the frequency encoding algorithm.
Figure 2: Example of a change made by the FMA to encode a 1
Example of a change made by the FMA
Example of the changes made by the FMA to encode a 1.

Phase-Shifting Algorithm (PSA)

In this algorithm we take advantage of the fact that the human ear cannot hear slight variations in phase. To encode a one we find the Fourier Transform of each time segment and slightly alter the phase by a predefined value.
We cannot encode a bit if most of the values are zero.
Testing revealed that a phase shift of .25π is audible, while a phase shift of .001π became hard for the computer to detect.
Figure 3: Diagram of Phase Encoding Algorithm
Diagram of Phase Encoding Algorithm
Diagram of the phase encoding algorithm.
Figure 4: Example of a change made by the PSA to encode a 1
Example of a change made by the PSA
Example of the changes made by the PSA to encode a 1.

Echo Algorithm (EA)

Here we use the fact that our test suit is comprised of music and already have some amount of echo. Adding a slight amount more does not make an audible difference. To encode a one we shift the segment by some predefined value, de-amplify it by some scalar α < 1, and add this echo back to the original segment.
We cannot encode a bit if most of the values are zero.
Testing revealed that an echo de-amplified to .2 was audible, while a de-amplification by .0001 was not reliably detected. Also a 30 sample delayed echo was inaudible to the human ear.
Figure 5: Diagram of Echo Encoding Algorithm
Diagram of Echo Encoding Algorithm
Diagram of the echo encoding algorithm.
Figure 6: Example of a change made by the EA to encode a 1
Example of a change made by the EA
Example of the changes made by the EA to encode a 1.




Noise Addition

We added varying amounts of Gaussian noise to our marked test signals and attempted to retrieve the hidden message with varying success.
In order to account for the noise, we adjusted the threshold we used in the decoding algorithm. From Figures 10,12, and 14, it is clear that a threshold can be drawn between the higher observed differences (one-bits) and the lower observed differences. However, in the cases where too much noise was added (see Figures 11,13, and 15), this threshold is not so clearly defined. In fact, for the PSA and EA, any threshold value is difficult to determine whether by calculation or by “eyeing it.”
Figure 1: Observed differences between frequencies of original signal and frequencies of marked signal for FMA with no added noise
Figure 1 (graphics10.jpg)
Figure 2: Observed differences between frequencies of original signal and frequencies of marked signal for FMA with added noise of SNR 30 dB
Figure 2 (graphics11.jpg)
Figure 3: Observed differences between frequencies of original signal and frequencies of marked signal for PSA with no added noise
Figure 3 (graphics12.jpg)
Figure 4: Observed differences between frequencies of original signal and frequencies of marked signal for PSA with added noise of SNR 30 dB
Figure 4 (graphics1.jpg)
Figure 5: Observed differences between frequencies of original signal and frequencies of marked signal for EA with no added noise
Figure 5 (graphics14.jpg)
Figure 6: Observed differences between frequencies of original signal and frequencies of marked signal for EA with added noise of SNR 70 dB
Figure 6 (graphics15.jpg)
Based on studying these threshold values, we found maximum noise we could add to the marked signal for each algorithm. The minimum SNR for the FMA, PSA, and EA were 30 dB, 30 dProject! ElB, and 60 dB, respectively. At these SNR values and with an input of “Elec301 Project! ”, the algorithms output as follows:
FMA
Elec301 Pro*ect! Elec301 Project! ElB, and 60 dB, respectively. At these SNR values and with an input of “Elec301 Project! ”, the algorithms output as follows:
ec301 Project! Elec30ec301 Project! Elec30
PSA
Elec301Elec301Elec301ELec301Elec301EleC#01Elec301Elec300Elec301El ek30qElec301Elec301Elec301Elec301El El`c 1El
EA
Elec381 Pzg*ect!MleC343 RzebesT!eoec#p1 Psozec|#GleC#00 P2ojEct)Mmec301 QrozEkw Umea3p1'PRgbmct!Eleg:0q P2ojea4%D|
The FMA and PSA clearly outperformed the EA in the noise category. In fact, at the point that we begin to miss bits, we can already significantly hear the white noise. Because the FMA only looks at the difference between the frequencies of the original and marked signals for a small segment of the frequency spectrum (in particular around the maximum frequency of the original signal), the noise power included in the difference is much smaller for the FMA than for the PSA and the EA which both calculate the difference over the whole frequency range. The PSA is good because our ears cannot detect significant alterations in phase; in fact, the phase shift could go up to .1*pi without audible detection. This large phase shift power difference between a one and zero is much more than the power added by the noise.
For all of our algorithms some genres of our test signals performed better in every case. We found that ‘pop’ and ‘techno’ both failed noise tests at least 20db SNR higher than any of the others. Examining the magnitude in the frequency domain for both of these signals (see Figure 8) shows us that the 90% power bandwidth is wider than in the others. I.e. there is significant information at higher frequencies, so more significant frequencies are altered by the noise, which lessens the amount of tolerable SNR.
To defend against noise we encode the user-input phrase over and over as many times as will fit. This increases our chances of getting the phrase back since the probability of several bits being wrong is lower than the probability of one bit being judged incorrectly.
Another defense against noise was to raise our various predefined values closer to human-hearable level. For example we can increase the amount of phase shift in the PSA from .01*pi all the way to .1*pi. These increases mean that the value shifting caused by adding noise is not significant when compared to the value shifting created by encoding a one. In general, there is a balance between how much noise a marked signal can take and how audible the mark becomes. This balance is found by toying with the predefined values for each algorithm.

Compression and Decompression

We also tested an attack in which the wave file was compressed using MPEG-1 and AAC compression algorithms. In order to test whether we could still recover our encoded bits in MATLAB (MATLAB can only work with wave audio files), we then decompressed the files. We found that we were completely unable to recover our encoded message and received as output either nothing or complete garbage.
These results were not unexpected as audio compression algorithms take advantage of the same psycho-acoustical phenomena that we used to

Cropping

Our encoding scheme can survive truncation on the back end. We simply lose any bits contained in the deleted data. While we did not implement this process, we could implement a matched filter setup to survive truncation on the front end. We could take the marked audio file and attempt to place it in the unmarked original file using convolution.

Remarking

We tested whether our algorithm could be marked with a second message and still recover either message. We provided our decoder with the original signal and the signal that had been marked two different times. If we had provided the decoder with the once-marked signal and the original signal (cascading the decoder), we could have easily recovered our original signal; however, we felt this solution was trivial and against the point of the attack.
We found, as expected, that when encoding two different messages, we could not correctly recover either message. We, however, found that if two of the same letter were encoded in the same place, we could recover this particular letter. Remarking the signal with the same message does not affect our ability to decode the message, but remarking can affect the quality of the output.


4 comments:

Anonymous said...

sir i m doing my project in data hiding in audio can you please send me the code. my email id is paragbunty28@gmail.com

Previousyearpapers said...

sir i m doing my project in data hiding in audio can you please send me the code for hiding audio signal in image. my email id is khurpaz@gmail.com

Balaji Prasath said...

i want audio watermarking coding pls send the code to me as soon as possible... ur paper is good .. pls send me code , i like study

Balaji Prasath said...

pls ur code to itprasath@gmail.com... i am a professor, it may be helpful in teaching.. thanks...

Post a Comment

Recent Comments

Popular Matlab Topics

Share your knowledge - help others

Crazy over Matlab Projects ? - Join Now - Follow Me

Sites U Missed to Visit ?

Related Posts Plugin for WordPress, Blogger...

Latest Articles

Special Search For Matlab Projects

MATLAB PROJECTS

counter

Bharadwaj. Powered by Blogger.