先//对原图象进行滤波 GaussianSmooth(pUnchImage,nWidth,nHeight,sigma,pUnchSmooth); //计算方向导数 DirGrad(pUnchSmooth,nWidth,nHeight,pnGradX,pnGradY); //计算梯度的幅度 GradMagnitude(pnGradX,pnGradY,nWidth,nHeight,pnGradMag); //应用non-maximum抑制 NonmaxSuppress(pnGradMag,pnGradX,pnGradY,nWidth,nHeight,pUnchEdge); //应用Hysteresis,找到所有的边界 Hysteresis(pnGradMag,nWidth,nHeight,dRatioLow,dRatioHigh,pUnchEdge);
1