How to implement LAB color space to detect yellow in image?

5 Ansichten (letzte 30 Tage)
Valeska Pearson
Valeska Pearson am 23 Jul. 2013
Bearbeitet: Walter Roberson am 3 Apr. 2016
>>Hello, I need some help to detect yellow exudates in a retinal image. LAB or HSV colour space can be used. I have chosen the LAB colour space. How must the if statement look if the user use gtool and clicks on yellow dot to segment that or identify that as a yellow exudate?
here is my code:
RGB2=im2double(OriginalRGB);
cform = makecform('srgb2lab');
lab = applycform(RGB2,cform);
figure,imshow(RGB2);
[d1 d2]=size(RGB2);
yellow_redThreshold = 200;
yellow_greenThreshold = 200;
[X Y]=ginput(2);
x=round(X);
y=round(Y);
punt=[x y];
for a=1:x
for b=1:y
if (yellow_redThreshold < punt <yellow_greenThreshold)
figure,imshow(punt, []);
title('Yellow exudate');
end
end
I want it to do something like this
  1 Kommentar
Narges M
Narges M am 23 Jul. 2013
Do you mean something like this?
punt=lab(x,y,:);
if ((punt(1,2,1) < greenThreshold) && (punt(1,3,1) > redThreshold))
...
end

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by