文件名称:reply_1_855734
- 所属分类:
- Windows编程
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 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
(系统自动生成,下载前可以参看下载内容)
下载文件列表
压缩包 : 35738618reply_1_855734.zip 列表 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