|
|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
- |2 a+ b, e$ \2 l
一、简介
( S- L7 j" |" r7 y
6 a8 f. k5 _: ?' g" ^9 }) [图像边缘检测是一种定位二维或三维图像(特别是医学图像)中的对象的边缘的系统。通过输入端(310)接收表示该图像的各元素值的数据元素集。该数据集被存储在存储装置(320)中。处理器(340)确定该图像中的对象的边缘。该处理器计算所述数据元素的至少一阶和/或二阶导数,并且计算该图像的等照度线曲率,所述曲率由κ标识。该处理器还确定校正因数α,该校正因数α对于由对象的曲率和/或所述数据的模糊造成的边缘错位进行校正。该校正因数α取决于所述等照度线曲率κ。然后,该处理器确定取决于所计算出的导数和所述等照度线曲率的算子的过零点。该系统的输出端(330)提供对于该图像中的边缘位置的指示。5 Y& y" a! e8 A. H
5 e3 C# a3 S' w" z& u1 图像边缘检测的基本步骤- u: ^: [: _8 \( f) S$ t
(1)滤波。边缘检测主要基于导数计算,但受噪声影响。但滤波器在降低噪声的同时也导致边缘强度的损失。
# R% k% z$ a$ f1 b9 @(2)增强。增强算法将领域中灰度有显著变化的点突出显示。一般通过计算梯度幅值完成。
$ h* I W7 r8 D(3)检测。但在有些图像中梯度幅值较大的并不是边缘点。
4 i- X0 V2 J8 S m7 W(4) 定位。精确确定边缘的位置。0 _2 x z$ f, K A9 @+ C7 M: ~% ^
, V1 b, a2 w2 u9 W# A; l2 边缘算法:sobel prewitt
& E! n4 B% L, m9 ~$ x进行了平滑处理,对噪声具有一定抑制能力,但容易出现多像素宽度。
* K+ {2 u/ l7 @/ d7 W
; X4 z. r+ h2 w4 g! Y3 边缘算法:robert
) H! `) \3 R! O边缘定位精度较高,对于陡峭边缘且噪声低的图像效果较好,但没有进行平滑处理,没有抑制噪声的能力。
K n' g* a3 J& ~
- _* ]% @) f3 I- X2 K' M* ~; \' L& t( G4 Y0 j# J c/ R
二、源代码
& z. h% B* r. F* R' Q
^- q N- f2 k9 R& O' O: f- 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.5 10-Jul-2016 21: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});
- end
- if nargout
- [varargout{1:nargout}] = gui_maiNFCn(gui_State, varargin{:});
- else
- gui_mainfcn(gui_State, varargin{:});
- end
- % End initialization code - DO NOT EDIT
L6 P! q5 K# d, M4 T$ e, d
8 h. j" x" H) N5 |: r6 Q1 }9 g" c
# H0 _1 g$ s( F# o三、运行结果3 \: D2 u a- p; O) j9 H0 w
& I1 V/ R( ~3 ~7 x3 D! d* T+ Z3 u
8 e! W8 {- D3 k& U& z2 Q0 n) [
+ f/ L* Y1 Y8 A' S* N! L e
# A: z! K! ~, T7 Z' W$ F; `2 G. F
3 m" x: M/ l. G& v1 K
$ ~, Y" d/ @6 ~& A
; z4 m6 i- J6 z0 k9 O& Z5 S
( E0 h- |* }" N
0 `' a& o0 ?) {( \( n
+ V& b% ~3 T4 _/ G( D( E% n. L; n( S! T
# k% H; j; L8 K
+ X' i1 p% a x( z, P4 z |
|