Edge Detection Using Sobel Algorithm and YCbCr Colour Space Optimized on FPGA

Yang An, Qianqian Yuan, Han ZhangInformatica 2025 · DOI

TL;DR

This paper presents a high-efficiency edge detection model that combines an improved Sobel algorithm with YCbCr color space conversion, specifically optimized for FPGA hardware. By expanding the Sobel operator to a 5x5 kernel with eight detection directions and leveraging the parallel processing power of FPGAs, the researchers achieved superior accuracy (0.90) and significantly lower power consumption (4W) compared to traditional CPU and GPU implementations.

What Problem Does This Paper Address?

Edge detection is a fundamental building block in computer vision, essential for tasks like object recognition and medical image analysis. However, traditional algorithms often face a "trilemma": they struggle to balance real-time processing speed, computational efficiency, and accuracy in noisy environments.

Standard Sobel operators typically use a 3x3 kernel that only looks at horizontal and vertical gradients, which can miss fine details or produce "false edges" when noise is present. Furthermore, performing these calculations on general-purpose CPUs or power-hungry GPUs is often impractical for edge-computing scenarios (like autonomous driving or IoT devices) where low latency and low power consumption are non-negotiable.

Methods

The authors propose a multi-stage pipeline optimized for hardware acceleration:

  1. Keyframe Extraction: Using Optical Flow (OF) to identify frames with the highest information content from video streams, ensuring the model processes the most relevant data.
  2. YCbCr Color Space Conversion: Instead of working in standard RGB, the model converts images to YCbCr. Since the human eye (and edge detection math) is more sensitive to brightness (Luminance, or the 'Y' component) than color, the model focuses on the Y component to enhance edge clarity.
  3. Improved Sobel Operator: The core innovation is moving from a standard 3x3 template to a 5x5 convolution kernel with eight detection directions (0°, 22.5°, 45°, etc.). This allows the model to capture much more complex structural information.
  4. Adaptive Thresholding (Otsu Method): To distinguish edges from background noise, the model uses the Otsu method to dynamically calculate the optimal threshold for each image.
  5. FPGA Optimization: The entire pipeline was implemented on a Xilinx Zynq UltraScale+ MPSoC. The authors utilized Block RAM (BRAM) for high-speed data access and a pipeline architecture to ensure that each operation executes within a single clock cycle.

Datasets

The researchers evaluated their model using the Kaggle Surveillance Video Dataset.

  • Composition: 6,000 images extracted from surveillance footage.
  • Variety: Includes various resolutions (VGA, 720p, 1080p) and diverse subjects like pedestrians and vehicles.
  • Conditions: The dataset covers both daytime and nighttime scenes to test the model's robustness under different lighting conditions.

Key Insights and Ideas

  • Luminance over Color: By isolating the 'Y' component in the YCbCr space, the model reduces redundant data processing while actually improving the "sharpness" of the detected edges.
  • Directional Sensitivity: Moving from two directions (horizontal/vertical) to eight directions significantly reduces the "jaggedness" of diagonal edges, which is a common failure point for simpler algorithms.
  • Hardware-Algorithm Co-design: The choice of a 5x5 kernel would typically be too computationally expensive for real-time software. However, because FPGAs can perform these convolutions in parallel using dedicated hardware logic, the increased complexity results in better accuracy without a proportional hit to latency.

Key Results

The proposed FPGA-IpSobel model outperformed standard Roberts and Sobel operators across several metrics:

  • Accuracy & Quality: At a sample size of 100, the model achieved an accuracy (ACC) of 0.90 and a low Root Mean Square Error (RMSE) of 0.16.
  • Latency: The FPGA implementation clocked in at just 15ms per frame, compared to 28ms for a GPU (NVIDIA RTX 2080) and 45ms for a CPU (Intel i7-9700K).
  • Power Efficiency: This is the standout result—the FPGA consumed only 4W, whereas the GPU and CPU consumed 75W and 65W, respectively. This represents a massive leap in performance-per-watt, making it ideal for embedded systems.
  • Information Retention: The preprocessing model maintained an information retention rate of 0.89 with a structural loss of only 0.05.

Limitations and Future Work

Despite the performance gains, the authors note that the model still struggles in specific high-complexity scenarios:

  • High-Frequency Textures: In environments like dense forests or grasslands, the adaptive thresholding may misidentify intricate textures as edges, leading to "false positives."
  • Overlapping Objects: Distinguishing between multiple overlapping objects remains a challenge for this specific gradient-based approach.

Future Directions: The authors suggest developing a more robust fusion algorithm specifically for textured backgrounds and implementing a "scene-based threshold self-learning" system that can automatically adjust parameters based on the environment (e.g., switching modes between a city street and a forest).

Summary updated

Abstract

Edge detection plays a crucial role in image processing and computer vision, and is widely used in tasks such as object recognition and image segmentation. Traditional edge detection algorithms perform well in many applications, but there are still some shortcomings in terms of real-time performance and processing efficiency. To address this issue, a highly efficient image edge detection model combining Sobel algorithm and field programmable gate array technology was proposed. YCbCr color space conversion was performed on the image, then Sobel operator was utilized to calculate the image gradient, and adaptive thresholding method was applied to determine the edges. Finally, the model was implemented and optimized on a field programmable gate array. The experimental results showed that when the dataset size was 1000, the information retention rate of the proposed image preprocessing model was 0.89, and the structural information loss was 0.05. When the data volume was 100, the accuracy of the proposed image edge detection model was 0.90, and the root mean square error value was 0.16. The research results indicate that the proposed image edge detection model based on field programmable gate arrays has significant advantages in edge detection performance and processing efficiency. The model has high accuracy and speed in image edge recognition, which can provide certain guidance for research in the field of image edge detection
BibTeX
@inproceedings{an2025edge,
  author = {Yang An and Qianqian Yuan and Han Zhang},
  title = {{Edge Detection Using Sobel Algorithm and YCbCr Colour Space Optimized on FPGA}},
  booktitle = {Informatica},
  year = {2025},
  doi = {10.31449/inf.v49i7.6998},
}
Figure