多方向梯度与Otsu自适应阈值实时图像边缘检测算法研究

Research on Real-Time Image Edge Detection Algorithm Based on Multi-Directional Gradient and Otsu Adaptive Threshold

  • 摘要: 针对传统Sobel边缘检测算法算子梯度少并且需要人为设定阈值的问题,导致最终在边缘提取过程中边缘宽度较宽,伪边缘较多,本文提出一种八方向梯度Sobel算子结合Otsu自适应阈值的边缘检测算法,通过增加梯度方向提高了算法对复杂纹理的识别能力,同时使用Otsu算法生成的阈值作为二值化处理的阈值。首先在Matlab与Modelsim平台上检验算法的正确性和可行性,实验结果表明这种改进方式能够提高边缘的检测精度,对比传统的Sobel算子伪边缘率降低了8%—26%,同时在不同噪声水平下保持较稳定的 PSNR 值(低噪声条件下约 7.45 dB,噪声 StdDev 为 25 时约 4.48 dB)最后将改进后的算法在搭建的Ov5640摄像头采集FPGA实时处理的平台上实现,单帧处理时间仅 15.73 ms,相比 Matlab 软件实现的 390 ms,性能提升约 24.8 倍,帧率可达 63 fps,边缘提取效果明显优于传统方法,输出图像更符合实际边缘信息,显著提升了系统实时性与检测精度,实验表明,该算法在边缘精度和实时性上均显著优于传统方法,输出图像更符合实际边缘信息,验证了其有效性。

     

    Abstract: Traditional Sobel edge detection suffers from limited gradient directions and manually set thresholds, resulting in wide edges and numerous false edges. This paper proposes an edge detection algorithm combining an eight-direction Sobel operator with Otsu adaptive thresholding. By increasing the gradient directions, the algorithm enhances its ability to recognize complex textures, while the Otsu-generated threshold is used for binarization. The algorithm was first verified for correctness and feasibility on Matlab and Modelsim platforms, showing a reduction in false edge rate by 8%–26% compared with the traditional Sobel operator.At the same time, it keeps a stable PSNR value under different noise levels (about 7.45 dB under low noise conditions and about 4.48 dB when the noise StdDev is 25). Subsequently, the improved algorithm was implemented on an FPGA real-time processing platform with OV5640 camera capture. The single-frame processing time is only 15.73 ms, compared to 390 ms in Matlab, achieving a performance improvement of approximately 24.8 times and a frame rate of 63 fps. Experimental results demonstrate that the proposed method significantly improves edge detection accuracy and real-time performance, producing edge images that better reflect actual edge information and validating its effectiveness.

     

/

返回文章
返回