# FPGA Implementation of a Real-Time Edge Detection System Based on an Improved Canny Algorithm
## 1 Introduction  
Image edge detection has important applications in many fields, such as medical imaging, geological exploration, satellite remote sensing, aerospace, transportation, and computer vision. Many researchers have developed various edge detection approaches [1; 2; 3; 4; 5]. Edge detection approaches include the Robert detector [1], the Prewitt detector [2], the Sobel detector [3], the Laplace of Gaussian detector [4], and the Canny edge detector [5]. Among the existing edge detection algorithms, the Canny edge detection algorithm has been a standard for many years and has the best performance. However, the Canny edge detection algorithm is a complex, time-consuming process, and the traditional implementations of the algorithm use the same fixed pair of high and low threshold values for all input images. When the external environment, such as light, changes, the image to be detected will also change, and the threshold value needs to be adjusted. These shortcomings seriously affect the real-time performance, adaptive ability, and flexibility of the system. Therefore, a direct implementation of the Canny algorithm cannot be employed in real-time applications. To solve these issues, researchers have proposed various techniques. One of these is the hardware implementation of the Canny edge detection algorithm based on a field programmable gate array (FPGA). Several works [6; 7; 8; 9] have dealt with FPGA-based Canny edge detection algorithms for real-time applications. All of them reduce the complexity of the Canny edge detection algorithm to a certain extent and propose their solutions for threshold selection. In the existing hardware implementations, the threshold is usuallyobtained in two ways: fixed threshold and adaptive threshold. Using a fixed threshold can reduce the complexity of the algorithm, but it degrades the performance, as presented in [6]. The adaptive threshold based on the frame structure proposed in [7] calculates the threshold using the gradient histogram of the entire picture, which improves performance but increases latency. The determination of the appropriate threshold with minimal latency and computational cost is an important issue in the Canny edge detection technique. To address this issue, [8; 9] introduces the distributed Canny edge detection technique, which has a low latency, high throughput, and resilient threshold computation approach. This method divides an image into several blocks and then uses the Canny edge detection algorithm for each block in parallel to reduce latency. The block-based technique computes low and high thresholds depending on the local features of each block, which aids in suppressing excessive edges in the smooth zone while preserving significant edges in the high-detailed region. Although the block-based Canny edge detection algorithm is more efficient than the frame-based Canny edge detection algorithm, the parallel implementation requires more resources and increases the computational complexity. Another set of works [10; 11; 12] focuses on translating the Deriche filter generated from Canny's criteria onto ASIC-based platforms. A 256 \(\times\) 256 picture edge is discovered in 6 s using a Canny-Deriche filter network with four transputers [10], resulting in high latency. The implementation of the Canny-Deriche filter in [10] was improved in [11], which processes 25 frames/s at 33 MHz and uses off-chip SRAM memories with Last-In-First-Out (LIFO) stacks, which increases the area overhead compared to [10]. Ref. [12] proposes a novel structure of the Canny-Deriche filter to minimize memory space and calculation cost. However, processing time grows with picture size, and the number of clock cycles per pixel implementation varies with image size. The recently developed general-purpose graphics processing unit (GPGPU) [13; 14] provides a parallel computing platform for image processing applications. [15; 16; 17] investigates the implementation of Canny edge detection using GPGPU.