資源簡介
圖像邊緣提取中ROA算子(3x3)的實現(xiàn),多用于合成孔徑雷達(SAR)圖像處理的邊緣提取中。
MATLAB程序
代碼片段和文件信息
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%ROA(Ratio?of?Average)?operator?used?in?SAR?image?processing%
%?????????????????????Edge?Detection????????????????????????%
%??????????????????????????3x3??????????????????????????????%
%?INPUT:?gray?scale?picture?????????????????????????????????%??
%?OUTPUT:?Edge?detection?result?&?operator?output???????????%
%?USAGE:?[edgeoperator_output]=roa3(input)?????????????????%
%?Code?by?Flesher???Harbin?Institute?of?Technology??????????%
%????????????????????May?20th?2009?????????????????????????%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function?[outputr]=roa3(pic)
pic=double(pic);
[M?N]=size(pic);
output=zeros([M?N]);
threshold=0.8;
r=ones([M?N]);
for?i=1:M
????for?j=1:N
????????if?i>=2?&&?i<=M-1?&&?j>=2?&&?j<=N-1
????????????%angle=0
????????????u1=mean(pic(i-1j-1:j+1));
????????????u2=mean(pic(i+1j-1:j+1))
評論
共有 條評論