In MATLAB ..Am doing research in melanoma skin cancer detection..In ABCD rule: how to find color value??
Show older comments
for C-Color i need to find the presence of white, red, lightbrown, darkbrown, blue-gray, black colors in my lesion image..A score of one is assigned on presence of each colour in the image..have to return the count of color that is range from 0 to 6.how to do that??
6 Comments
Israt Zahan
on 12 Oct 2017
I want the source code, Matlab program for skin cancer detection using ABCD role
Walter Roberson
on 12 Oct 2017
... and I want some blueberry cheesecake.
The difference is that someone has already made blueberry cheesecake; no-one has already made a MATLAB program for skin cancer detection using ABCD rule.
ali a
on 9 Dec 2020
hello
I realy appreciate you if you could send me the codes of ABCD specially color and border.
Thank you very much for your kind consideration.
my email is: ali_kingboy80@yahoo.com
Muhammad Zeeshan Ahmed Khan
on 26 Feb 2021
@Walter Roberson Man u got a good humor !! I am working over the code for ANN and CNN based approaches ,,,
JovanS
on 22 Sep 2022
@Nancy Arokia Rani Hi i have the same problem as you . I guess that you found the solution after the long time that passed . Could you please share your code?
Amine Slamani
on 26 Apr 2024
you can send me the cood please
Answers (2)
Walter Roberson
on 28 Apr 2016
0 votes
First you need to define exactly what it means for something to be "red" or "lightbrown" . There is no agreed upon definition for when one named color stops and another named color begins.
8 Comments
Nancy Arokia Rani
on 29 Apr 2016
Edited: Walter Roberson
on 29 Apr 2016
Walter Roberson
on 29 Apr 2016
What exactly do you mean by lightbrown? If I give you an RGB triple, what is the code or formula to determine whether the triple corresponds to light brown or not?
Nancy Arokia Rani
on 6 May 2016
Edited: Nancy Arokia Rani
on 9 May 2016
Walter Roberson
on 6 May 2016
Example:
white = [1.000000, 1.000000, 1.000000];
red = [1.000000, 0.000000, 0.000000];
lightbrown = [0.710000, 0.400000, 0.110000];
darkbrown = [0.400000, 0.260000, 0.130000];
bluegray = [0.400000, 0.600000, 0.800000];
black = [0.000000, 0.000000, 0.000000];
color = [white;red;lightbrown;darkbrown;bluegray;black];
img = im2double( imread('mel1.jpg') );
numcolor = size(color,1);
counts = zeros(numcolor,1);
for k = 1 : numcolor
r = color(k,1); g = color(k,2); b = color(k,3);
mask = img(:,:,1) == r && img(:,:,2) == g && img(:,:,3) == b;
count(k) = sum(mask(:));
end
Image Analyst
on 6 May 2016
Nancy, I'm saying, as a color science expert and one who teaches courses in it, that no little 12 line program for segmenting in RGB color space will be robust enough for skin cancer detection. I mean, just look at the color gamut in RGB:

There are several things you need to do. One is that you need to calibrate your system with a standard that has known CIE LAB color values with several in the skin tone range, such as the Color Checker Chart

Next you need to do your segmentation in a calibrated color space such as CIELAB or HSV. RGB just won't cut it because the RGB values can vary all over the place depending on the exposure time of the camera and other camera settings. Even after your initial color segmentation, you'll probably have to take spatial information into account to get rid of noise and other spurious artifacts or junk in the image.
If you're serious about this project, like you're doing this for your Ph.D. or something, then you need to so serious image analysis. If it's just a homework problem, and nothing important, then you can get a ballpark segmentation just by converting to gray scale and thresholding, or by computing the Euclidean distance from each pixel to the reference pixel and thresholding that. You can probably get it working like that for a single very simple image, but it won't be robust enough for a serious medical application.
Walter Roberson
on 9 May 2016
Yep. My reason for giving the code was to provide proof that you need a lot more work to recognize color by color name.
Melanoma is not really recognized by color, it is recognized more by texture with assistance from color.
Nancy Arokia Rani
on 9 May 2016
Nancy Arokia Rani
on 9 May 2016
Image Analyst
on 28 Apr 2016
0 votes
There's no skin cancer toolbox in MATLAB. You'll have to build it up from lower level functions. Just find out how other people have successfully done it by looking up a paper here: http://www.visionbib.com/bibliography/medical899sk.html#Medical%20Applications%20--%20Skin%20Cancer,%20Melanoma,%20Skin%20Lesions
2 Comments
Nancy Arokia Rani
on 29 Apr 2016
Image Analyst
on 29 Apr 2016
My answer still stands. You'll definitely have to calibrate your system with a color standard like the Color Checker Passport. Then you'll have to convert from RGB to CIELAB (see my icon to the left). Then you'll have to define a part of the 3-D color gamut that corresponds to the colors of brown that you consider to be potential cancer. Then you can classify your image to see which pixels in your image have those colors. See color classification demos in my File Exchange: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
Categories
Find more on Biotech and Pharmaceutical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!