Filter löschen
Filter löschen

How to draw a high-contrast spectrogram?

11 Ansichten (letzte 30 Tage)
zhehao.nkd
zhehao.nkd am 26 Mai 2021
Beantwortet: Andres Morales am 22 Jan. 2023
Some software for sound analysis can draw spectrograms with higher contrast (backgrounds are almost zero). I was wondering what tricks may I use to generate similar spectrograms.
Figure-1 A spectrogram generated by matlab function spectrogram()
Figure-2 A spectrogram of the same audio signal generated by a software

Antworten (2)

Sulaymon Eshkabilov
Sulaymon Eshkabilov am 26 Mai 2021
Hi,
Use colormap()
  3 Kommentare
Sulaymon Eshkabilov
Sulaymon Eshkabilov am 26 Mai 2021
colormap(jet); colormat(hsv); etc
zhehao.nkd
zhehao.nkd am 31 Mai 2021
Thank you for your reply! But I am sorry that the way I ask my question may be misleading. Increasing the contrast by applying different colormaps may not be what I need. Instead, I would like to improve the contrast by cleaning the noisy background as the second Figure shows. Is there any possible solution?

Melden Sie sich an, um zu kommentieren.


Andres Morales
Andres Morales am 22 Jan. 2023
You can modify the spectrogram minimum thresholding value. This will zero values below the threshold:
https://www.mathworks.com/help/signal/ref/spectrogram.html#namevaluepairarguments

Kategorien

Mehr zu Time-Frequency Analysis finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by