How to rearrange colormap according to color similarity?
2 ビュー (過去 30 日間)
古いコメントを表示
I have a jpeg image which I would like to extract the colormap from it, I have try the rgb2ind() but the result colormap is randomly placed. Anyone know how to rearrange the colormap?
img = imread('2.jpg'); [X,map] = rgb2ind(img,256);
%% this is the colormap i created
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/146091/image.png)
%% this is the actual colormap
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/146092/image.bmp)
Anyone please help, thank you in advance.
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Red についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!