|
|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
! Y. i! T9 [, N
一、简介
2 [- Q6 g( L f; _, L. F8 D5 \$ k0 A7 `& S3 L- P1 l
图像边缘检测是一种定位二维或三维图像(特别是医学图像)中的对象的边缘的系统。通过输入端(310)接收表示该图像的各元素值的数据元素集。该数据集被存储在存储装置(320)中。处理器(340)确定该图像中的对象的边缘。该处理器计算所述数据元素的至少一阶和/或二阶导数,并且计算该图像的等照度线曲率,所述曲率由κ标识。该处理器还确定校正因数α,该校正因数α对于由对象的曲率和/或所述数据的模糊造成的边缘错位进行校正。该校正因数α取决于所述等照度线曲率κ。然后,该处理器确定取决于所计算出的导数和所述等照度线曲率的算子的过零点。该系统的输出端(330)提供对于该图像中的边缘位置的指示。" i4 m6 q" b2 D8 S% t$ X8 h. p+ Y
9 I- H; z, m9 \( R+ W6 X; h1 图像边缘检测的基本步骤
1 j6 R( E) Z3 f2 |4 n1 ^(1)滤波。边缘检测主要基于导数计算,但受噪声影响。但滤波器在降低噪声的同时也导致边缘强度的损失。
; a; I8 S) J* c( ]5 t0 T(2)增强。增强算法将领域中灰度有显著变化的点突出显示。一般通过计算梯度幅值完成。; H& y6 |8 @; k
(3)检测。但在有些图像中梯度幅值较大的并不是边缘点。+ m- g. \$ U9 G* C
(4) 定位。精确确定边缘的位置。
, `3 ^% {: E" `& Q0 D5 u1 {$ R, q8 x6 _0 a# p0 q
2 边缘算法:sobel prewitt7 P& C+ C% K/ G) J
进行了平滑处理,对噪声具有一定抑制能力,但容易出现多像素宽度。
2 `7 [' q5 ]0 z/ l4 B8 k' r( ? o3 B8 t! Y# ]- }* y3 V
3 边缘算法:robert. D) W0 e E+ M/ [& ~2 o) T
边缘定位精度较高,对于陡峭边缘且噪声低的图像效果较好,但没有进行平滑处理,没有抑制噪声的能力。9 X. n" i: d2 K. a: n
" U7 m; T/ G- c E2 c
( k1 o- f" e: {) J+ U4 t
二、源代码
; X2 ~# l5 W$ T
! T. U, C6 F' s7 }2 s- 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
, b5 d- b& {0 ~3 o" X 4 n' W8 s$ i/ Y
/ \" }0 \& ?# Z4 `6 e& t% {- i5 a! y& X8 p5 t5 x k
三、运行结果' Q* i) [( K j9 u/ s: ~
: F: i; z) R& d5 s+ E. g6 R+ Z
9 q3 n ~0 U: |0 L0 j8 m: X
e8 m1 }& w$ o3 o. T
9 v7 j. C- ]* ~; D/ ]8 E5 L/ b/ B3 R( U6 D: ^# _3 ?( b4 o
8 C7 A$ o: b1 V' x, x
* N# `% q7 Y0 j+ W* x; Z& a
6 W! y6 }* v% @0 |) t: f/ Z
; |$ R4 d) v a- A! [! q' C! }* Z. I" o# h: v6 A) W
! I) G1 }0 a: D5 ^- P; `
, _ [- ]4 `' \; @8 l7 [3 j/ R( m |
|