I want matlab codes for constructing eye map in eye detection using luma and chroma components

1 回表示 (過去 30 日間)
Bushry
Bushry 2013 年 9 月 27 日
回答済み: Zahra kamkar 2014 年 3 月 16 日
I want matlab codes for constructing eye map in eye detection using luma and chroma components such that EyeMapChroma=1/3 {〖Cb〗^2+((Cr) ̅ )^2+(Cb/Cr) } and EyeMapLuma= (Y(x,y)⨁g_σ (x,y))/(Y(x,y)⊖g_σ (x,y)+1)

回答 (1 件)

Zahra kamkar
Zahra kamkar 2014 年 3 月 16 日
Hi, I've written some codes for it. I wish it can help you by God's favor.
if true
i=imread('Original Image.jpg');
subplot(4,4,1)
imshow(i)
title('original image');
iycbcr=rgb2ycbcr(i);
iycbcr = im2double(iycbcr);
subplot(4,4,2)
imshow(iycbcr)
title('YCBCR space');
y=iycbcr(:,:,1);
cb=iycbcr(:,:,2);
cr=iycbcr(:,:,3);
ccb=cb.^2;
subplot(4,4,3)
imshow(ccb)
title('CB^2');
ccr=(1-cr).^2;
subplot(4,4,4)
imshow(ccr)
title('(1-CR)^2');
cbcr=ccb./cr;
subplot(4,4,5)
imshow(cbcr)
title('CB/CR');
igray=rgb2gray(i);
subplot(4,4,6)
imshow(igray)
title('Gray space');
g=1./3;
l=g*ccb;
m=g*ccr;
n=g*cbcr;
eyemapchr=l+m+n;
subplot(4,4,7)
imshow(eyemapchr)
title('Chrom Eyemap');
J=histeq(eyemapchr);
subplot(4,4,8)
imshow(J)
title('Equalized image');
SE=strel('disk',15,8);
o=imdilate(igray,SE);
p=1+imerode(igray,SE);
eyemaplum=o./p;
subplot(4,4,9)
imshow(eyemaplum)
title('Lum Eyemap');
end

カテゴリ

Help Center および File ExchangeRead, Write, and Modify Image についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by