Signal Processing Stack Exchange is a question and answer site for practitioners of the art and science of signal, image and video processing. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am working on noise reduction and I need to learn how to analyze spectrograms

I mixed a pure speech file with violet noise in audacity and got the following spectrograms:

Matlab version

enter image description here

Sonogram version: (enter link description here)

enter image description here

Spectrogram view in Audacity:

enter image description here

What do all the colours mean and why do they look different? Shouldn't everything have the same colours as in the Matlab version? Or are the exact colours not that important, since the darker pattern at the bottom of each figure still look similar in all of them?

--- EDIT :: Further additions: ---

Here is a screenshot of the spectrogram of noisy speech as well as output of my noise reduced sound file.

enter image description here

The one on the left is noisy signal while one on the right is the one passed through the noise reduction algorithm. Both figures are plotted through the spectrogram function of matlab, called as follows:

spectrogram(data, hanning(128), 64, 128, 16000)

The number 16000 is the Fs value (sampling frequency) returned by the wavread function used to read in the original noisy speech file into matlab. The sound file is a male adult speaking, mixed with violet noise in audacity

--- EDIT 2: ---

Also, here is the same thing in gray-scale, if it helps

enter image description here

share|improve this question
Exact color does not matter. Mostly bright color signifies larger intensity(energy). It means low frequencies is having more energy compared to higher frequencies at some regions in your examined signal.It would be better, if you see the properties of your software. Like in audition they describe these correspondence between color and intensity in properties called spectral control. – hari Nov 6 '12 at 5:16
You should consider if you are looking at spectra of cepstra, which is log10(spectra) – Mikhail Nov 6 '12 at 5:19
What do you mean by spectra of cepstra? As far as I know I haven't done any log related calculations to get these graphs. I am not sure if the spectrogram function of matlab calculates any logarithms, however. – user13267 Nov 6 '12 at 5:25
@hari: "bright color signifies larger intensity" is not true for Matlab, which uses the jet colormap by default. In this case, dark red is the largest intensity, dark blue is the lowest, and bright yellow or bright green are completely arbitrary values in the middle. This is why the jet colormap should not be used; it makes things look important when they're not, confusing and misleading people. – endolith Nov 7 '12 at 14:51
but this gives rise to another question: In the article you linked the rainbow colour map does not have any space of white. However in the spectrograms I have plotted through Matlab silence periods show up as dark blue as well as white areas. So what does white mean then? Would that mean low intensity or a value that it could not calculate? – user13267 Nov 8 '12 at 0:35
up vote 3 down vote accepted

The spectrograms look different because they use:

  • Different parameters for the FFT size and hop size (window overlap ratio).
  • They simply use different palettes. The spectrogram gives you an array of numbers, which are scaled and map to a color palette to produce a color image. Matlab's colormaps are listed here - by default it uses "jet" ; so the time-frequency bins of lowest energy are colored in blue, and those of highest energy are colored red.
share|improve this answer
So does that mean the colour doesn't exactly matter? Would always plotting spectrogram in grayscale be a better idea? – user13267 Nov 7 '12 at 6:29
The color palette is only here to make the spectrogram readable. More generally, the spectrogram plot is a qualitative tool, not quantitative. What is helpful are the relative intensities, the patterns, etc, not the price RGB value at t-f bin (0.05, 523)... – pichenettes Nov 7 '12 at 6:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.