分析了传统坎尼边界扫描算法中阈值和高斯滤波器对边缘闭合的影响,首先采用当前像素点8个方向的自适应滤波器代替原有的高斯滤波器对图像进行滤波,得到的梯度图像不会出现过度光滑现象;然后将最大类间交叉熵准则和有关人工智能理论相结合来确定高、低阈值。自适应滤波器是根据当前像素点邻域内的最小方差确定使用的模板,将方差最小的模板的均值设置为当前像素点的灰度值得到滤波后的图像。实验证明,该方法能得到较低的高阈值和较高的低阈值,既避免了引入伪边缘又尽可能多的检测出边缘像素点;同时具有很强的抗噪性。
The analysis of the influence of the thresholds and Gauss filter on edge closure in contraditional Canny algorithm is presented.Firstly image was filtered of eight directions of the current pixel replaced the Gauss filter,there is no over-smoothing pixels in Gradient image;Secondly,combined maximized cross entropy criterion with the relative artificial intelligence theory to obtain the high and low thresholds.The adaptive filter was to setup models in the eight directions around the processing pixel,then defined template that will be used according to minimized variance in the neighborhood of the current pixel,the gray value was replaced by the mean value of the template which had minimized variance,then obtained smoothed image.Experiments proved that this algorithm may obtain higher low-threshold and lower high-thresholod,and not only avoided the introduction of pseudo-edge but also detected more edge pixels as soon as possible,and meantime it has strong anti-noise performance.