How to Extract and identify color values from an image ?
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Working on a project identifying colors on a melanoma image. For this purpose, we need to identify White, red, light brown, dark brown, blue-grey and Black. How should we go about writing the code.
The point is to obtain the color range or color values such that we can find an average value of the colors In the image, if not that then just the values are good.
0 Commenti
Risposte (2)
Walter Roberson
il 15 Gen 2018
You cannot do that. There is no standard definition of what exactly "red" or "light brown" or "dark brown" or "blue-grey" are, and the formal definition of "black" (absolutely no light, so all components are 0) is not the same as the common usage (components small enough that the result is difficult to perceive) with the common usage overlapping with the formal definition of "white" (all components non-zero and of equal value.)
You will need to invent your own definitions for how to map color components into color names. You might want to look in the File Exchange at the fuzzy color naming contribution.
0 Commenti
Image Analyst
il 15 Gen 2018
First of all you will have to define LAB color space values for the 6 colors. Then compute the lab values of your image with rgb2lab(). Then find out the delta E (color difference) between the lab image and each of the 6 colors. Which ever lab value is less is the class that pixel belongs to.
See my demo: https://www.mathworks.com/matlabcentral/fileexchange/31118-color-segmentation-by-delta-e-color-difference
Of course it helps if you've calibrated your intensity values from your camera because you don't want to have half the lab values simply because you cut your exposure time in half while the scene itself (the skin) did not change!
0 Commenti
Vedere anche
Categorie
Scopri di più su Biotech and Pharmaceutical 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!