文件名称:reply_1_855734
-
所属分类:
- 标签属性:
- 上传时间:2008-10-13
-
文件大小:53.33kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
// 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
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
(系统自动生成,下载前可以参看下载内容)
下载文件列表
imgapp/
imgapp/canny.cpp
imgapp/canny.h
imgapp/childwnd.cpp
imgapp/childwnd.h
imgapp/clean.bat
imgapp/glhdlg.cpp
imgapp/glhdlg.h
imgapp/imgapp.clw
imgapp/imgapp.cpp
imgapp/imgapp.dsp
imgapp/imgapp.dsw
imgapp/imgapp.h
imgapp/imgapp.opt
imgapp/imgapp.plg
imgapp/imgapp.rc
imgapp/imgdlg.cpp
imgapp/imgdlg.h
imgapp/imgproc.cpp
imgapp/imgproc.h
imgapp/mainfrm.cpp
imgapp/mainfrm.h
imgapp/readme.txt
imgapp/res/
imgapp/resource.h
imgapp/res/imgapp.ico
imgapp/res/imgapp.rc2
imgapp/stdafx.cpp
imgapp/stdafx.h
imgapp/canny.cpp
imgapp/canny.h
imgapp/childwnd.cpp
imgapp/childwnd.h
imgapp/clean.bat
imgapp/glhdlg.cpp
imgapp/glhdlg.h
imgapp/imgapp.clw
imgapp/imgapp.cpp
imgapp/imgapp.dsp
imgapp/imgapp.dsw
imgapp/imgapp.h
imgapp/imgapp.opt
imgapp/imgapp.plg
imgapp/imgapp.rc
imgapp/imgdlg.cpp
imgapp/imgdlg.h
imgapp/imgproc.cpp
imgapp/imgproc.h
imgapp/mainfrm.cpp
imgapp/mainfrm.h
imgapp/readme.txt
imgapp/res/
imgapp/resource.h
imgapp/res/imgapp.ico
imgapp/res/imgapp.rc2
imgapp/stdafx.cpp
imgapp/stdafx.h
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.