<< Chapter < Page Chapter >> Page >
This module details the primary three algorithms explored for encoding digital data in audio as part of the fall 2008 ELEC 301 class project.

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.

Diagram of frequency encoding algorithm

Diagram of Frequency Encoding Algorithm

Example of a change made by the fma

Example of a change 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.

Diagram of phase encoding algorithm

Diagram of Phase Encoding Algorithm

Example of a change made by the psa

Example of a change 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.

Diagram of echo encoding algorithm

Diagram of Echo Encoding Algorithm

Example of a change made by the ea

Example of a change made by the EA to encode a 1

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Elec 301 projects fall 2008. OpenStax CNX. Jan 22, 2009 Download for free at http://cnx.org/content/col10633/1.1
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Elec 301 projects fall 2008' conversation and receive update notifications?

Ask