• 大小: 2KB
    文件类型: .m
    金币: 1
    下载: 0 次
    发布日期: 2021-06-11
  • 语言: Matlab
  • 标签: MATLAB  图像  边缘  ROA  

资源简介

图像边缘提取中ROA算子(3x3)的实现,多用于合成孔径雷达(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))

评论

共有 条评论