针对传统 Sobel算法存在定位不精确、提取边缘不连续等不足,提出在传统 Sobel 算子模板基础上增加了45°和135°两个模板,提高了边缘定位的精度;采用局部梯度均值作为阈值对梯度图像进行局部梯度筛选,然后进行边缘提取及细化。实验证明,算法获取的图像边缘与传统 Sobel 算法相比,具有定位准确、边缘连续性好、噪声少等优点,在金相图片处理中有一定的实用性。%Aiming at the deficiency of traditional Sobel algorithm,such as imprecise location,inconsecutive edge in pro-cessing,an improved algorithm was put forward,The algorithm added two templates in both directions of 45°and 135°based on traditional sobel operator to improve the precision of edge location.Local gradient was filtered to gradient image by using local gradient mean as the threshold,then edge extraction and refinement were done.The experiment suggests that,com-pared with traditional Sobel algorithm,the image edge obtained by the new algorithm has the advantage of accurate location, good continuity of the edge and few noise,etc.So,the algorithm has certain practicability in the processing of metallography film.
展开▼