How to implement LAB color space to detect yellow in image?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
>>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 comentario
Narges M
el 23 de Jul. de 2013
Do you mean something like this?
punt=lab(x,y,:);
if ((punt(1,2,1) < greenThreshold) && (punt(1,3,1) > redThreshold))
...
end
Respuestas (0)
Ver también
Categorías
Más información sobre Get Started with Image Processing Toolbox en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!