In view of contradiction between detection accuracy and noise suppression of edge detection algorithm,a new edge detection algorithm is proposed. In the algorithm,the detection window is divided into two subzones in each direction of 0º,45º,90º and 135º. The number of pulse noise points in detection window of 3 × 3 is counted. If the point number is more than 3,the detection window size is extended to 5 × 5. For two subzones in each direction of detection window,the mean gray value of non⁃noise points in every subzone is calculated respectively. The absolute value of the two mean values′ difference is taken as direction gradient value to acquire the gradient of center point,and then the improved non⁃maximum suppression meth⁃od is used to refine gradient image and extract the image edge. The experiment results show that directionality of the image edge detected by the new algorithm is well and the edge is fine,and the algorithm can suppress different degree impulse noise and has a certain suppression effect on Gaussian noise and strong adaptability.%针对边缘检测算法存在的检测精度与抑噪的矛盾,提出一种基于新的图像边缘检测算法。算法将检测窗口按照0º,45º,90º和135º四个不同方向分别划分为两个子区域,先统计每个检测窗口(3×3)内脉冲噪声点的个数,如果超过3个,则扩大检测窗口至5×5。对于检测窗口每个方向划分的两个子区域,分别计算区域内的非噪声点的平均灰度值,利用平均值差的绝对值作为窗口的方向梯度值,进而求得中心点的梯度。然后,对梯度图像采用改进的非极大值抑制方法进行细化,并提取边缘。实验结果表明,该算法检测的图像边缘方向性较强,边缘较细,不仅对不同程度脉冲噪声干扰图像具有较强的抑噪能力,而且对高斯噪声也具有一定程度的抑制效果,算法具有较强的适应性。
展开▼