scieee AI-readable full text Open interactive document viewer

COMPARATIVE EXPERIMENTAL ANALYSIS OF MATLAB-BASED EDGE DETECTION OPERATORS FOR POTATO DISEASE LEAF IMAGES

Zhang Hongzhi

Abstract

Image edge detection is an important topic in the field of image processing and pattern recognition, and has important applications in practice. In this paper, some commonly used image edge detection operators are theoretically analysed, and the advantages and disadvantages of these operators in edge detection and their scope of application are comparatively analysed through the MATLAB software to implement the edge detection of various operators on the image of potato diseased leaves.

Full text

SCIENCE AND INNOVATION INTERNATIONAL SCIENTIFIC JOURNAL VOLUME 4 ISSUE 10 OCTOBER 2025 ISSN: 2181-3337 | SCIENTISTS.UZ 151 COMPARATIVE EXPERIMENTAL ANALYSIS OF MATLAB-BASED EDGE DETECTION OPERATORS FOR POTATO DISEASE LEAF IMAGES Zhang Hongzhi1,2,3 National University of Uzbekistan named after Mirzo Ulugbek, Faculty of Applied Mathematics and intellectual Technologies1 JiNing Normal University, School of Mathematics and statistic, Ulanqab, Inner Mongolia, P. R. China2 Jining Normal University Scientific Research Project: Convolutional Neural Network-based Potato Leaf Disease Identification Method3 https://doi.org/10.5281/zenodo.17553503 Abstract. Image edge detection is an important topic in the field of image processing and pattern recognition, and has important applications in practice. In this paper, some commonly used image edge detection operators are theoretically analysed, and the advantages and disadvantages of these operators in edge detection and their scope of application are comparatively analysed through the MATLAB software to implement the edge detection of various operators on the image of potato diseased leaves. Keywords: edge detection; operator; image processing; MATLAB Introduction Edge Detection is a fundamental technique in image processing and computer vision that is mainly used to identify regions in an image with significant changes in brightness or colour, which usually correspond to object boundaries, texture variations or depth discontinuities in the scene. Edge detection is an important preprocessing step for many advanced vision tasks (e.g., target detection, image segmentation, feature extraction, etc.) [1]. Edge is the place in the image where the colour or grey value changes drastically, so the differential operation can be carried out in the place where the grey value changes more strongly, to get the larger value which is different from the other places, the edge detection operators can be divided into two categories: one is based on the first-order derivative, such as Roberts' operator, Prewitt's operator, Sobel's operator, etc.; the other one is based on the second-order derivative, such as Log operator, Canny operator, Laplacian operator, etc.. One is based on the second order derivatives, such as Log operator, Canny operator, Laplacian operator, etc. 1. Roberts operator Roberts operator is one of the simplest edge detection operators which detects the edges by calculating the difference of the image in the diagonal direction. Roberts operator is very sensitive to vertical edges and less effective in detecting horizontal edges. It has the advantage of simple computation and accurate localization but has the disadvantage of being sensitive to noise [2]. Suppose the input image is ( , )f x y , and the output image is ( , )g x y , then: 22 ( , ) ( ( , ) ( 1, 1)) ( ( 1, ) ( , 1))g x y f x y f x y f x y f x y        The convolution kernel used in the x direction is: 10 01 x G    SCIENCE AND INNOVATION INTERNATIONAL SCIENTIFIC JOURNAL VOLUME 4 ISSUE 10 OCTOBER 2025 ISSN: 2181-3337 | SCIENTISTS.UZ 152 The convolution kernel used in the y direction is: 01 10 y G    The results obtained from edge detection of potato diseased leaf images using Roberts operator are shown in Figure 1: Figure 1: Roberts operator edge detection results 2. Sobel operator Sobel operator detects edges by calculating the first order derivatives of the image in the horizontal and vertical directions. Sobel operator has two convolution kernels that can calculate the gradient in the x and y directions, respectively. When the convolution kernel in the x direction is computed with the image, it has a significant effect on the physical edges of the image in the horizontal direction; when the convolution kernel in the y direction is computed with the image, the effect on the physical edges of the image in the vertical direction is obvious [3].Sobel operator has a simple structure and can handle low noise images well, for convolution kernels in the x and y directions, respectively: 1 2 1 000 1 2 1 x G         1 0 1 2 0 2 1 0 1 y G         The gradient size for each pixel point is: 22 xy G G G The results obtained from edge detection of potato diseased leaf images using Sobel operator are shown in Figure 2: 3. Prewitt operator Prewitt operator is a first-order differential operator that uses the difference in grey values between the upper and lower, left and right neighbouring points of a pixel point to reach extreme values at the edges to detect edges and remove some pseudo edges, which has a smoothing effect SCIENCE AND INNOVATION INTERNATIONAL SCIENTIFIC JOURNAL VOLUME 4 ISSUE 10 OCTOBER 2025 ISSN: 2181-3337 | SCIENTISTS.UZ 153 on the noise. The principle is to use the two direction template in the image space with the image of the neighbourhood convolution to complete. Figure 2:Sobel operator edge detection results The Prewitt operator detects edges by computing the first order derivatives of the image in the horizontal and vertical directions. The Prewitt operator is characterized by simplicity of computation but higher sensitivity to noise and is used for convolution kernels in the x and y directions respectively: 111 000 111 x G       1 0 1 1 0 1 1 0 1 y G         The gradient size for each pixel point is: 22 xy G G G The results obtained from edge detection of potato diseased leaf images using Prewitt operator are shown in Figure 3: Figure 3:Prewitt operator edge detection results SCIENCE AND INNOVATION INTERNATIONAL SCIENTIFIC JOURNAL VOLUME 4 ISSUE 10 OCTOBER 2025 ISSN: 2181-3337 | SCIENTISTS.UZ 154 4. Canny operator The Canny operator [4] finds the edge pixels of an object by finding the local maximum of the gradient of the image, first the image is greyscaled and then the image is smoothed by Gaussian filtering, each pixel point ( , )mn is smoothed and then using the differential operator, the magnitude and direction of the gradient is calculated: 22 2 2 2 1 ( , ) ( , ) 2 mn g m n e f m n      22 ( , ) ( , ) ( , ) xy G m n g m n g m n ( , ) arctan ( , ) y x g m n g m n   After traversing all the images of the target, a non-extremely high value control can be applied to the image gradient, assuming that the grey value of the current image of the target is equal to the grey value of the 2 images in the direction of the gradient from it, i.e., the value of the image is not at the edge of the target's object, and setting it to 0. ( , ), ( , ) ( , ) 0, T M m n ifM m n T M m n otherwise     Finally, the boundary is measured and connected by double threshold point calculation, i.e., the histogram is first calculated for the distance between the 2 threshold points, the boundary image pixel value is then equal to the high threshold point, and vice versa for the no boundary image pixel value is equal to the low threshold point. When the image pixel value is between the highest threshold and the low threshold, then the neighbouring image pixel value of that image is calculated and if any image pixel value exceeds the highest threshold, then that image pixel value is an edge otherwise it is not an image edge. The results obtained from edge detection of potato diseased leaf images using Canny operator are shown in Figure 4: Figure 4:Canny operator edge detection results 5. Laplace operator The Laplace operator can detect edges of objects of different sizes, a larger Laplace operator can be used for fuzzy edges in an image, while a smaller Laplace operator can be used for fine edges with concentrated sharpness. The differential form of the Laplace operator is: SCIENCE AND INNOVATION INTERNATIONAL SCIENTIFIC JOURNAL VOLUME 4 ISSUE 10 OCTOBER 2025 ISSN: 2181-3337 | SCIENTISTS.UZ 155 2( , ) ( 1, ) ( 1, ) ( , 1) ( , 1) 4 ( , )f x y f x y f x y f x y f x y f x y          The Laplace operator convolution kernel is: 0 1 0 1 4 1 0 1 0         or 111 1 8 1 111         The results obtained from edge detection of potato diseased leaf images using Laplacian operator are shown in Figure 5: Figure 5:Laplacian operator edge detection results 6. LoG (Laplacian of Gaussian) operator LoG (Laplacian of Gaussian) is a classical edge detection method that combines Gaussian smoothing and Laplacian second-order derivative operators to effectively detect edges in images.The core idea of LoG operator is to first smooth the image with Gaussian filter to reduce the influence of noise, then apply Laplace operator to detect the edge, and finally determine the edge position by finding the over-zero point (Zero-crossing) of the filtering result.The LoG operator has accurate edge localisation, good robustness to noise, isotropic and insensitive to the edge direction, but it is more computationally intensive (requires Gaussian smoothing and secondorder differentiation), it produces a double edge response (characteristic of second-order derivatives), and the  parameter needs to be adjusted according to the application scenario [5]. The LoG operator can be expressed as the Laplacian of a Gaussian function: 22 2 22 ( , ) GG G x y xy      where the 2D Gaussian function is: 22 2 2 2 1 ( , ) 2 xy G x y e      The LoG operator is finally obtained: 22 2 2 2 2 22 4 2 ( , ) xy xy G x y e        The results obtained from edge detection of potato diseased leaf images using LoG operator are shown in Figure 6: SCIENCE AND INNOVATION INTERNATIONAL SCIENTIFIC JOURNAL VOLUME 4 ISSUE 10 OCTOBER 2025 ISSN: 2181-3337 | SCIENTISTS.UZ 156 Figure 6:LoG operator edge detection results 7. Comparative experimental analysis of various edge detection operators The results obtained from edge detection of potato diseased leaf images using various operators are shown in Figure 7: Figure 7:Edge detection results for different operators Through experimental comparison, the operators show significant differences in noise robustness, localization accuracy, computational cost, and application scenarios. The comparative analysis results are presented in Table 1: SCIENCE AND INNOVATION INTERNATIONAL SCIENTIFIC JOURNAL VOLUME 4 ISSUE 10 OCTOBER 2025 ISSN: 2181-3337 | SCIENTISTS.UZ 157 Table 1: Comparative analysis of edge detection methods Methodologies Noise immunity Position accuracy Computational volume Applicable Scenarios Roberts Poor High Very low Fast and simple edge detection Sobel Average Average Low real time system Prewitt Average Average Low Horizontal/vertical edge detection Laplacian Poor High Low Sharpening Aid LoG Good High Average Precise edge positioning Canny Excellent Excellent High High quality edge detection 8. Conclusion Based on MATLAB software, this study implemented edge detection using the aforementioned operators on potato disease leaf images. It not only provided the convolution kernels (or calculation formulas) and detection result diagrams for each operator but also conducted a comparative analysis of their performance. The results show that: first-order derivative operators (such as Roberts, Sobel, and Prewitt) are simple in calculation but weak in noise resistance; among second-order derivative operators, the LoG and Canny operators perform better in terms of noise resistance and localization accuracy. Among them, the Canny operator has the best comprehensive performance—although it has a relatively large computational complexity, it is suitable for scenarios that require high edge quality. REFERENCES 1. He Zhiyong, Li Yi, Yan Song, Zhang Zhiwei. Research on Digital Image Edge Detection Algorithms [J]. Application of Electronic Technology, 2025, 51(08): 70-73. 2. Bi Zhuo, Han Bing. Anti-noise Roberts operator edge detector [J].2012(3):4. 3. LI Chao, Fang Shimin, Wang Jinghui. A wavelet and IHS remote sensing image fusion algorithm based on Sobel operator [J].2013, 49(3):207-209. 4. Ma Xin-Xing, Xu Jian, Zhang Jian. An adaptive Canny operator based ship infrared image edge detection method [J].2013, 34(7). 5. Yu Zhihong, Wang Fuxiang. Study on detection of potato spot defects by Gaussian Laplacian operator [J].2017,023(051):33.