listing and counting all colors in an image
3 ビュー (過去 30 日間)
古いコメントを表示
Hello all:
I am a matlab user, but no great experience with image analysis. Could anyone be kind to shed light on my current problem:
I have small icon sized images, on which I want to run a simple code to list and count pixels of all the colors present.
Ideal output will be a n-by-2 array, the first column can be the color code, and the second could be the number of pixels with that color, as found in the image. Sum of column two thereby be the total pixels in the image.
Apologies for sounding like I am dumping my problem on the forum. Any initiaition (or full code, smile) will be much appreciated.
Thanks in deed and regards.
0 件のコメント
回答 (1 件)
Image Analyst
2016 年 6 月 17 日
See attached code.
2 件のコメント
Image Analyst
2016 年 6 月 26 日
Not really sure. Maybe check the CBIR literature on how they compare colors. A guess would be to make the histograms with not too many bins, like 16 or so. Then compare the percentage in each bin for the different images. Of course it will take more than 1 number to accurately describe how the colors differ in the two images.
You haven't said what you want to do though, and that lack of context makes it hard to guess. All you've done is to ask how to do some small steps in your algorithm but I don't know what the overall goal is, and if the small steps you have asked for are indeed the best approach to achieve the overall goal.
参考
カテゴリ
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!