How can i filter the spectrogram colours and take as matrix?

2 vues (au cours des 30 derniers jours)
Altemur Çelikayar
Altemur Çelikayar le 3 Mar 2021
Commenté : Mathieu NOE le 8 Mar 2021
Hello, I am trying to change spectrogram matrix colours. I am writing audio and music recognition system based on Spectrogram.
function spectrogram_graph(audiofile_name)
[y,fs]=audioread(audiofile_name);
fprintf("Amount of Fs is:%d \n",fs)
specgram(y);
xlabel("Samples")
ylabel("Normalized Frequency (x pi radians/sample)")
colormap gray
c=colorbar;
c.Label.String="Powerfrequency dB(rad/sample)";
end
I have this table from this function:
I need to filter, for example: Higher than -40dB will be white and lowers will be black. I need to recieve this as matrix with only ones and zeros. Thats why i am using grayscale.
Firsty, I couldnt filter and change the colours of the spectrogram.
Secondly, I couldnt obtain 2D matrix of the spectrogram.
Can you help me please guys, best wishes
Altemur
  5 commentaires
Altemur Çelikayar
Altemur Çelikayar le 6 Mar 2021
You are amazing. Thanks a lot <3
Mathieu NOE
Mathieu NOE le 8 Mar 2021
You're welcome !

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Time-Frequency Analysis dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by