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.