采用Canny算子进行边缘检测时,梯度图像需要进行模非极大值抑制,然后求取双阂值提取边缘,但目前双阈值的求取无法避免人工设定的影响,试验表明,针对不同的图像采用相同的闽值,边缘检测效果差异很大.这一点限制了Canny算子在实际中的应用.针对这一问题,提出基于梯度幅度直方图和类内方差最小化自适应的确定高低阌值的方法,可针对不同的图像,实现双闽值的自适应提取,不需要人为设定任何参数,采用模糊控制技术提取边缘像素,实验结果证明了该算法的有效性.
When edge detection is performed using a Canny algorithm, the gradient image should be processed with "non-maximum module suppression" and then double thresholds evaluated to detect edges. However, the double thresholds are greatly affected by personal experience. Experiments show that the results of edge detection for different images are obviously different if the identical threshold is employed, which restricted the use of Canny algorithm in practice. To solve this problem, an algorithm is proposed which can adaptively determine the double thresholds based on gradient histogram and minimum interclass variance. With this algorithm, it can self-adaptively calculate the double thresholds for different images without the necessity to setup any parameter artificially. Fuzzy algorithm is adopted to choose edge pixels. Theory and experiments show that the algorithm is effective and correct.