Welcome!
[Sign In]
!
[Sign Up]
!
Front-page it
|
Collect it
| [
中国-简体中文
]
CodeBus
codebus.net
Hot search:
Source
embeded
web
remote control
p2p
game
More...
FAQ
Fav
Home
SourceCode
Web Code
Develop Tools
Document
E-Books
Other Resource
Get Coins
Member
Location:
Search - void Canny(LPBYTE Gray
Category
Source Code
Web/Internet
Develop Tools
Document
Other
Search in results
OS
Windows
Linux
FreeBSD
Unix
Dos
PalmOS
WinCE
SymbianOS
MacOS
Android
Platform
Visual C
Visual.Net
Borland C
CBuilder
Dephi
gcc
VBA
LISP
IDL
VHDL
Matlab
MathCAD
Flash
Xcode
Android STU
LabVIEW
Language
C/C++
Pascal
ASM
Java
PHP
Basic/ASP
Perl
Python
VBScript
JavaScript
SQL
FoxBase
SHELL
E-Language
OC/Swift
File Type
SourceCode
Program
CHM
PDF
PPT
WORD
Excel
Access
HTML
Text
Search list
[
Windows Develop
]
reply_1_855734
Description:
// Canny算子 void Canny(LPBYTE pGray, SIZE sz, double sigma, double dRatLow, double dRatHigh, LPBYTE pResult) { //经过高斯滤波后的图像 LPBYTE pGaussSmooth pGaussSmooth = new unsigned char[sz.cx*sz.cy] //x方向导数的指针 int *pGradX pGradX = new int[sz.cx*sz.cy] //y方向 int *pGradY pGradY = new int[sz.cx*sz.cy] //梯度的幅度 int *pGradMag pGradMag = new int[sz.cx*sz.cy] //对原图高斯滤波 GaussianSmooth(sz,pGray,pGaussSmooth,sigma) //计算方向导数和梯度的幅度 Grad(sz,pGaussSmooth,pGradX,pGradY,pGradMag) //应用非最大抑制 NonmaxSuppress(pGradMag,pGradX,pGradY,sz,pResult) //应用Hysteresis,找到所有边界 Hysteresis(pGradMag,sz,dRatLow,dRatHigh,pResult) delete[] pGradX pGradX = NULL delete[] pGradY pGradY = NULL -//Canny operator void Canny (LPBYTE pGray. SIZE sz, double sigma, double dRatLow. double dRatHigh. LPBYTE pResult) (//after Gaussian filtering of images LPBYTE pGaussS mooth unsigned pGaussSmooth = new char [sz.cx* sz.cy]// x direction derivative indicators pGradX pGradX int* = new int [ sz.cx* sz.cy]// int* y direction pGradY pGradY = new int [sz.cx* sz.cy]// gradient magnitude int* pGradMag pGradMag = new int [sz.cx* sz.cy]// maximum Gaussian filter to GaussianSmo oth (sz, pGray, pGaussSmooth. sigma)// calculate derivative and the gradient range Grad (sz. pGaussSmooth, pGradX, pGradY. pGradMag)// non-application of the biggest inhibition NonmaxSuppress (pGradMa g, pGradX, pGradY, sz, pResult)// Application Hysteresis, find all border Hysteresis (pGradMag, sz, dRa
Platform:
|
Size:
54272
|
Author:
王学金
|
Hits:
Sign UP
Help
Support
What's CodeBus
SiteMap
Contact us
CodeBus www.codebus.net
“CodeBus” is the largest source code store in internet!
1999-2018
CodeBus
All Rights Reserved.