|
|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
@9 R+ d- `0 T, Z5 t
一、简介& T* v1 m' C* E9 p8 F2 r
' Y( ~9 @5 y( H2 s: ~6 Z图像边缘检测是一种定位二维或三维图像(特别是医学图像)中的对象的边缘的系统。通过输入端(310)接收表示该图像的各元素值的数据元素集。该数据集被存储在存储装置(320)中。处理器(340)确定该图像中的对象的边缘。该处理器计算所述数据元素的至少一阶和/或二阶导数,并且计算该图像的等照度线曲率,所述曲率由κ标识。该处理器还确定校正因数α,该校正因数α对于由对象的曲率和/或所述数据的模糊造成的边缘错位进行校正。该校正因数α取决于所述等照度线曲率κ。然后,该处理器确定取决于所计算出的导数和所述等照度线曲率的算子的过零点。该系统的输出端(330)提供对于该图像中的边缘位置的指示。/ h& `. }) A! f) X9 {, i4 Q
7 J; @; o/ E1 k7 W' {* [
1 图像边缘检测的基本步骤8 `# q3 \0 E Y! Z
(1)滤波。边缘检测主要基于导数计算,但受噪声影响。但滤波器在降低噪声的同时也导致边缘强度的损失。
2 M8 g: b6 i9 ?0 K. ?) I* I(2)增强。增强算法将领域中灰度有显著变化的点突出显示。一般通过计算梯度幅值完成。/ B* H% R: o5 g( B1 ~' b! v
(3)检测。但在有些图像中梯度幅值较大的并不是边缘点。4 F# b, d$ u( } K% K( R" ~
(4) 定位。精确确定边缘的位置。
8 }7 h# B0 L+ g, N
& \6 F% ] H" h+ k2 边缘算法:sobel prewitt
6 B' H# V" {. f7 ~* s$ D进行了平滑处理,对噪声具有一定抑制能力,但容易出现多像素宽度。
; O# _% n7 X; N3 m9 C7 i# O9 T! |+ O5 y
3 边缘算法:robert
9 W; |! i: D5 J% H: Y' A& P! A边缘定位精度较高,对于陡峭边缘且噪声低的图像效果较好,但没有进行平滑处理,没有抑制噪声的能力。" x0 Z/ D7 |( n& I; D- e/ T
! X* |! k+ A$ G! ]; a
' J. |( w) l4 O. A; O T F# i二、源代码# ^7 G2 E4 z* Z( v
! f" a8 | ^; {; L
- 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
! }5 o9 r, d. P7 S9 ]/ { 9 a; k3 K3 R& u9 b6 q: B0 W( ?
! D/ e/ D. _$ G B! m$ s: F
2 j; g9 l t- C, I三、运行结果
+ W5 X0 V* x( H
5 c) w" S8 x3 ~% Q4 N# p( ~
$ s M3 R6 v0 `
$ j) ^1 L* y* V4 v; B- v# U
$ \5 b) A5 | i) ~) c4 c+ r/ j" Q0 J/ M
9 ^% x+ O5 l5 G( R: E) C n0 }3 K; K; i$ q
6 k( ]1 ]! v& I8 o: F( u# V
5 q; m9 b8 k% f6 B+ b+ D
0 X/ \' G: W3 f G0 U, @2 J0 R5 {# q. [$ ?% L) b, {
5 \( C/ Z4 O& V% Q* S4 B |
|