1つの画像に含まれる色の数を知るにはどうすればいいでしょうか?
3 次查看(过去 30 天)
显示 更早的评论
24bitビットマップ画像に何色の色が含まれているか調べるプログラムを書こうとしています. 16777216色のうちの何色が使われていて,それがRGBどの組み合わせをつかっているのか調べるにはどのようなプログラムをかけばいいでしょうか?
1 个评论
Walter Roberson
2016-6-9
Approximate translation:
How can I get to know the number of colors that are included in one of the image?
We are trying to write a program to check what is included color color of the 24bit bitmap image. 16777216 colors What colors have been used out of, or should I put what the program is to examine the whether it is by using the RGB which combination?
采纳的回答
Walter Roberson
2016-6-9
uniquecolors = unique(reshape(YourImage,[], 3), 'rows');
num_unique_colors = size(uniquecolors, 1);
2 个评论
Image Analyst
2016-6-11
编辑:Image Analyst
2016-6-11
You can also "Thank" him by "Accepting this answer".
You might also be interested in a related File Exchange submission on the "Color Frequency Image" : http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A58030
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!