changing colormap of 10000 saved JPEG spectrograms

2 ビュー (過去 30 日間)
Sania Gul
Sania Gul 2022 年 9 月 17 日
コメント済み: Walter Roberson 2022 年 9 月 17 日
I have saved 10000 spectrograms as .jpeg images, in my hard drive, using the default "PARULA" colrmap. I want to change all of them to "AUTUMN" colormap. Is there any way to do that, without redrawing the spectrograms from audio from the scratch?

採用された回答

Walter Roberson
Walter Roberson 2022 年 9 月 17 日
Use rgb2ind specifying the parabula map. Then ind2rgb that using the other color map.
  5 件のコメント
Sania Gul
Sania Gul 2022 年 9 月 17 日
Wait, wait, wait. All matrix value of A were laying between 0 to 255 in RGB plane, but the values of C are in range [0:1]. and diplayed as
Although the summer map displays perfectly, but I want it to be stored in range [0:255]. When I did
C=255*ind2rgb(B,out_cmap);
and display it by imshow(C), the result transformed to
Walter Roberson
Walter Roberson 2022 年 9 月 17 日
in_cmap = parula;
out_cmap = autumn;
A = imread(fullfile(SourceFolder1,filenames1(count).name));
B = rgb2ind(A, in_cmap);
C = im2uint8(ind2rgb(B, out_cmap)) ;

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeColormaps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by