Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

OpenCV dft audio

I have a audio sequence that was captured with my microphone. This sequence is represented in a cv::Mat object with 1 row and n columns, where n represents the number of samples (=length) of my audio file. I want to get the frequency spectrogram using Discrete Fourier Transform in OpenCV. I tried to make some example codes work, but I do not get the image I want to get. Has anybody a idea how I could implement this and if this generally works?

Thanks!

OpenCV dft audioaudio getting spectrogram

I have a audio sequence that was captured with my microphone. This sequence is represented in a cv::Mat object with 1 row and n columns, where n represents the number of samples (=length) of my audio file. I want to get the frequency spectrogram using Discrete Fourier Transform in OpenCV. I tried to make some example codes work, but I do not get the image I want to get. Has anybody a idea how I could implement this and if this generally works?

Thanks!

OpenCV dft audio getting spectrogram

I have a audio sequence that was captured with my microphone. This sequence is represented in a cv::Mat object with 1 row and n columns, where n represents the number of samples (=length) of my audio file. I want to get the frequency spectrogram using Discrete Fourier Transform in OpenCV. I tried to make some example codes work, but I do not get the image I want to get. Has anybody get.

Edit This is the input image (the sound visualized as Mat for OpenCV): image description

I read each 20 samples (20 pixels in x-direction) and multiply it with a idea how hanning-window-function. Than I could implement this do the discrete fourier transform (dft) and if this generally works?get for each 20-sample-window the dft's result:

e.g.:

image description.

How can I get by multiple of theses images a spectrogram?

Thanks!