資源簡介
消除紅眼 matlab實現(xiàn)
代碼片段和文件信息
function?rgb=hsi2rgb(hsi)
%HSI2RGB?Converts?an?HSI?image?to?RGB.
%?HSI2RGB?Converts?an?HSI?image?to?RGB?where?HSI?is?assumed?to?be?of
%?class?double?with:
%?hsi(::1)=?hue?image?normalized?values?to?the?range?[01]?by
%?dividing?all?angle?values?by?2*pi.
%?hsi(::2)=saturation?image?in?the?range?[01].
%?hsi(::3)=intensity?image?in?the?range?[01].
%?The?components?of?the?output?image?are:
%?rgb(::1)=red;
%?rgb(::2)=green.
%?rgb(::3)=blue.
%Extract?the?individaul?HSI?component?images.
H=hsi(::1)*2*pi;
S=hsi(::2);
I=hsi(::3);
%Implement?the?conversion?equations.
R=zeros(size(hsi1)size(hsi2));
G=zeros(size(hsi1)size(hsi2));
B=zeros(size(hsi1)size(hsi2));
%?RG?sector?(0<=H<2*pi/3).
idx=find((0<=H)&(H<2*pi/3));
B(idx)=I(idx).*(1-S(idx));
R
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????1438??2010-03-05?21:43??redeye\hsi2rgb.m
?????文件???????3404??2010-03-17?11:46??redeye\redeye.m
?????文件???????1148??2010-03-05?21:43??redeye\rgb2hsi.m
?????目錄??????????0??2010-03-20?15:33??redeye
-----------?---------??----------?-----??----
?????????????????5990????????????????????4
評論
共有 條評論