Info
この質問は閉じられています。 編集または回答するには再度開いてください。
colors detection and display them
1 回表示 (過去 30 日間)
古いコメントを表示
How can i reduce number of colors in image (to 32 colors ) and display colors used in the picture in form one column ?
0 件のコメント
回答 (1 件)
Walter Roberson
2013 年 4 月 29 日
[newimage, newmap] = rgb2ind(existingimage, 32);
But it is not clear in your question whether you just want to display the unique colors (if so then display newmap) or if you want to display the indices (if so then display newimage).
I am also not sure what order you want to display the output in. The indices would be a two dimensional array, one index per pixel. You could reshape() that as a column, but will the user understand? The colormap would be an array with three columns (R, G, B), and displaying in one column does not strike me as being a good thing ?
1 件のコメント
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!