listing and counting all colors in an image
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
Image Analyst
il 17 Giu 2016
See attached code.
2 Commenti
Image Analyst
il 26 Giu 2016
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.
Vedere anche
Categorie
Scopri di più su Histograms in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!