フィルターのクリア

1つの画像に含まれる​色の数を知るにはどう​すればいいでしょうか​?

5 ビュー (過去 30 日間)
Yumi Iwakami
Yumi Iwakami 2016 年 6 月 9 日
編集済み: Image Analyst 2016 年 6 月 11 日
24bitビットマップ画像に何色の色が含まれているか調べるプログラムを書こうとしています. 16777216色のうちの何色が使われていて,それがRGBどの組み合わせをつかっているのか調べるにはどのようなプログラムをかけばいいでしょうか?
  1 件のコメント
Walter Roberson
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
Walter Roberson 2016 年 6 月 9 日
uniquecolors = unique(reshape(YourImage,[], 3), 'rows');
num_unique_colors = size(uniquecolors, 1);
  2 件のコメント
Yumi Iwakami
Yumi Iwakami 2016 年 6 月 11 日
Thank you very much. I highly appreciate your immediate response.
Image Analyst
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 ExchangeImage Processing Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by