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

2 ビュー (過去 30 日間)
Valeska Pearson
Valeska Pearson 2013 年 7 月 23 日
編集済み: Walter Roberson 2016 年 4 月 3 日
>>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 件のコメント
Narges M
Narges M 2013 年 7 月 23 日
Do you mean something like this?
punt=lab(x,y,:);
if ((punt(1,2,1) < greenThreshold) && (punt(1,3,1) > redThreshold))
...
end

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangePattern Recognition and Classification についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by