views:

179

answers:

5

So I have an image like this

alt text

Is there any algorithm to extract (get as PCM) sound from which was created that image?

+3  A: 

Unfortunately, the resolution of that image is too low to extract useful information. If you had a greatly zoomed-in version you could convert the pixel data back to audio.

Adam Goode
+2  A: 

Given sufficient precision, I'm quite sure it's possible. However, I believe this wave would be much too imprecise to allow for any good to come out of it.

zneak
+15  A: 

Basic answer is yes.. sort of. But not from that exact picture. That is because that picture is an extremely time-compressed waveform of the sound. There are likely sound waves missing in that picture hidden between 1 pixel and the next.

In case you're wondering the algorithm is:

sound_amplitude=((pixel_height-(image_height/2))/image_height)*sound_resolution

where sound_resolution is 128 if 8 bit and 32768 if 16 bit.

But, as I said, that image is too compressed. You have multiple pixels squished into a single vertical line. You can't correctly extract pixel_height form that.

slebetman
+2  A: 

To completely recover 1 second of sound at a sampling rate of, say, 44100 Hz; you need to zoom the drawing to be 44100 pixels (approx 40 screens) width.

PA
+1  A: 

You would need to zoom in close enough to see the actual waveform, like this: alt text

endolith