|
|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
) e7 ^% H* @; W% E$ h5 K& R4 B+ r
一、简介6 r* t+ M0 b |% v' q! ]& p
9 U' `# H3 \6 y/ [) e( h: ^! x, v0 Z图像边缘检测是一种定位二维或三维图像(特别是医学图像)中的对象的边缘的系统。通过输入端(310)接收表示该图像的各元素值的数据元素集。该数据集被存储在存储装置(320)中。处理器(340)确定该图像中的对象的边缘。该处理器计算所述数据元素的至少一阶和/或二阶导数,并且计算该图像的等照度线曲率,所述曲率由κ标识。该处理器还确定校正因数α,该校正因数α对于由对象的曲率和/或所述数据的模糊造成的边缘错位进行校正。该校正因数α取决于所述等照度线曲率κ。然后,该处理器确定取决于所计算出的导数和所述等照度线曲率的算子的过零点。该系统的输出端(330)提供对于该图像中的边缘位置的指示。
, p7 Z5 K l$ J# i; W J$ y$ Y
. D+ w- X* U- d& H G2 j8 u1 图像边缘检测的基本步骤
5 P. v" ^2 C$ o' T(1)滤波。边缘检测主要基于导数计算,但受噪声影响。但滤波器在降低噪声的同时也导致边缘强度的损失。$ T# @, R$ X! |
(2)增强。增强算法将领域中灰度有显著变化的点突出显示。一般通过计算梯度幅值完成。! w4 z; K* @5 {* h5 Y
(3)检测。但在有些图像中梯度幅值较大的并不是边缘点。
1 r, l1 Y# n1 }(4) 定位。精确确定边缘的位置。7 v5 o e6 q& H7 h) A
% D' F9 p- A* K3 F2 边缘算法:sobel prewitt, _2 g1 p* _; J# C9 Y
进行了平滑处理,对噪声具有一定抑制能力,但容易出现多像素宽度。
1 j9 J) ]% S5 W4 ]# j( F* E0 y# M% d5 P& q: b/ f
3 边缘算法:robert; A q3 A% `6 f/ z" U
边缘定位精度较高,对于陡峭边缘且噪声低的图像效果较好,但没有进行平滑处理,没有抑制噪声的能力。
7 Z9 k: V# X& k- X4 A g1 f
' ?1 ?3 U! y4 \+ w
. h3 _6 D1 m; N' b% t/ i二、源代码
3 ]3 f3 J+ R0 v. } K- w; s
3 [: x k3 T# s, Q- 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 EDIT8 { l# v# x% I" `' t* s% g' _3 k4 W7 D
+ n: {( I# |6 w% e7 X+ ~8 ?
8 Y- l+ g, f( }) B9 V% D
1 d, h3 q7 p) Y) d- K1 z) ^三、运行结果
6 P2 {0 }) l% q2 M/ \1 E0 X# v0 n
1 F! q& t o- v, B& Z. g; l8 ?0 T
! f, Z9 x, ?8 t+ W5 }% ?+ Q
9 C5 f- @5 Z, z2 i* c7 s5 c2 B
2 r# {/ r6 E: P6 g
3 y( N' \) D( M8 \0 \" Y
& j5 ^$ a5 R$ o# V; w( m5 E! r
! S0 D& z1 R+ _0 M
% F# E8 D8 b" A# M+ K
1 n, e- b; h: R" Z
( G$ j6 t: ]8 x
7 m8 d9 K' n' |5 E* i @- @4 t+ {- o: j7 i* k! D7 K& x
|
|