## 2 Related Works
### Edge Detection Algorithms  
Edge detection refers to an image processing technique for determining the presence of an edge or line in images. It highlights the critical features of the image objects and then finds the boundaries of the object in images [36]. In general, an edge (or edge contour) can be defined as a set of pixels that exists at the point where the brightness or color changes suddenly in an image. To detect the change in brightness (or color) in images, the gradient information obtained from the differential derivation is commonly used. However, in some cases, since it is impossible to obtain exact gradient information of an image due to the discreteness of pixel data, the gradient can be obtained through various approximation methods or convolution kernel techniques [37]. Several useful algorithms for detecting edges of objects in images have been developed and applied to various computer vision systems. A basic gradient filter considers vertical and horizontal filter masks (i.e., region of interest for edge detection) with two elements (i.e., \(-1\) and \(1\)). To detect edges of the image objects, the Sobel filter considers the first-order derivative as a basic gradient filter and compares the pixel values and the center pixel based on two \(3\times 3\) filter masks in the \(x\) and \(y\) directions, respectively. Although it is relatively insensitive to noise in the image, it is more sensitive to diagonal edges than vertical and horizontal edges [38]. The Prewitt filter uses the image intensity function to approximate row and column edge gradients. Since the Prewitt filter assigns less weight to the near pixel compared to the Sobel filter, the edge may not be clearly detected depending on the image, and, as a Sobel filter, it is very sensitive to diagonal edges [39]. The Robert filter can increase the diagonal edges detection capability by assigning \(`1\)' and \(`-1\)' in the diagonal direction of \(2\times 2\) vertical and horizontal filter masks. Compared to the Sobel filter and the Prewitt filter, the calculation speed of the Robert filter is somewhat faster since the filter mask size is small. Although the Prewitt filter is effective in detecting diagonal edges, it is highly sensitive to noise in the image [40]. Although the edges in images can be detected through the first-order derivative, in some cases, it is impossible to detect the edges effectively. Therefore, through the sign from the second-order derivative, it is possible to enhance the edge detection capability by highlighting the regions where a rapid intensity (i.e., brightness or color) change occurs [41]. The Laplacian filter is one of the popular linear edge detection methods, which approximates the second derivative by using a \(3\times 3\) filter mask. However, although the Laplacian filter is effective in reducing spatial noise, it can present a lower performance in the area where the brightness (or color) value changes gradually. To prevent false edge detection due to noises, the multi-step Canny edge filter has been developed. The Canny edge filter first removes noises in the image, and then detects and corrects the edges using the Sobel edge detection method (i.e., a process that compares the maximum edge values and connects the edges) to derive the final slope and edge [38; 41; 42]. However, when the filter mask size is small, the detection accuracy of the Sobel filter can deteriorate since the accuracy of the directionality for the edge decreases as the angle of the gradient is far from the horizontal or vertical or from the center. To resolve this problem, the Scharr filter has been developed. The filter masks used in the Scharr filter have been designed to maximize responsiveness to vertical and horizontal edges while alleviating the rotational invariance inherent in other edge detection filters such as Sobel and Prewitt. The Scharr filter is simpler than the others, but more sensitive to noise and very error-prone [43; 44].