3 Roberts边缘检测算子 Roberts 边缘检测算子是一种利用局部差分算子寻找边缘的算子,Robert 算子图像处理后结果边缘不是很平滑。经分析, 由于 Robert 算子通常会在图像边缘附近的区域内 产生较宽的响应, 故采用上述算子检测的边缘图像常需做细化处理, 边缘定位的精度 不是很高。但是经过 robert 算子处理后, 图象平滑部分消失很多, 而边缘被相对强化, 而点目标本身的边缘特征是保留的, 而且亮度 几乎损失不太多, 从而为阈值处理创造了条件。
三、部分源代码
function varargout =aaa(varargin) % AAA MATLAB code for aaa.fig % AAA, by itself, creates a new AAA or raises the existing % singleton*. % % H = AAA returns the handle to a new AAA or the handle to % the existing singleton*. % %AAA('CALLBACK',hObject,eventData,handles,...) calls the local % function named CALLBACK in AAA.M with the given input arguments. % %AAA('Property','Value',...) creates a new AAA or raises the % existing singleton*. Starting from the left, property value pairs are % applied to the GUI before aaa_OpeningFcn gets called. An % unrecognized property name or invalid value makes property application % stop. All inputs are passed to aaa_OpeningFcn via varargin. % %*See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one % instance to run (singleton)". % % See also: GUIDE, GUIDATA, GUIHANDLES% Edit the above text to modify the response to help aaa% Last Modified by GUIDE v2.510-Jul-201621:47:39% Begin initialization code - DO NOT EDIT gui_Singleton =1; gui_State =struct('gui_Name', mfilename,...'gui_Singleton', gui_Singleton,...'gui_OpeningFcn', @aaa_OpeningFcn,...'gui_OutputFcn', @aaa_OutputFcn,...'gui_LayoutFcn',[],...'gui_Callback',[]); if nargin &&ischar(varargin{1})gui_State.gui_Callback =str2func(varargin{1}); endif nargout[varargout{1:nargout}]=gui_mainfcn(gui_State, varargin{:}); elsegui_mainfcn(gui_State, varargin{:}); end % End initialization code - DO NOT EDIT