R. Brigola

Some Examples on Engineering Mathematics with Matlab

As a supplement to my lectures on Fourier analysis you can download the following m-files for Matlab on the topic "Digital Watermarking in the Frequency Domain".

These m-files do not contain professional watermarking algorithms, but reasonably demonstrate that one can use the frequency domain effectively to hide information
for example in images or audio files, so that it is hardly detectable without a comparison with the originals, knowledge of the embedding procedures or analysis of spectral data properties.

All the m-files have sufficient comments, so that they can easily be used and changed to experience typical fft effects.

References can be found in the m-files or by asking a search machine or Wikipedia on the topic.

For new Matlab users:
You can open the m-files in the Matlab editor by double-clicking, and run them by
" Evaluate current cell", a menu point found in the top line of the Matlab window clicking "cell".

Watermarking Example in the DCT Domain of an Image

Embed Image Watermark
Detect Image Watermark
Generate Noise and Compression of the Image Data
Watermark Test Image
Test Image

Original (198 KB) with digital watermark in the frequency domain
JPEG compressed and noisy (30 KB)
Computed watermark in the compressed and noisy image

Watermarking Example in the FFT Domain of an Audio File

To play with these m-files you need a stereo audio track in wav-format of approximately 3 to 6 minutes duration (the longer the better).

Embed Audio Watermark
Detect Audio Watermark
Detect Audio Watermark after MP3 Compression
Test Image as Watermark
Comparison of Spectral Sections of the Original and the Watermarked File
Plot the Noise Spectrum caused by Watermarking

Test the sound files with headphones, which usually provide a much better transmission than speakers.

If you do not have a suitable wav file at hand, you can take that for a test (42.7 MB)

Renate Bergmann (Sopran) und Klaus Jäckle (Guitar)