Comparison Of Algorithms to Detect Straight Line Edges in Images for Metrological Applications | Research Square window.SnipcartSettings = { analytics: { enabled: false } }; (function() { var accessVector = localStorage.getItem('access_vector') || ''; window.dataLayer = window.dataLayer || []; if (accessVector) { window.dataLayer.push({ user: { profile: { profileInfo: { snid: accessVector } } } }); } })(); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-K279D39R'); Browse Preprints In Review Journals COVID-19 Preprints AJE Video Bytes Research Tools Research Promotion AJE Professional Editing AJE Rubriq About Preprint Platform In Review Editorial Policies Our Team Advisory Board Help Center Sign In Submit a Preprint Cite Share Download PDF Research Article Comparison Of Algorithms to Detect Straight Line Edges in Images for Metrological Applications Ashik Suresh, P. B. Dhanish This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-7569036/v1 This work is licensed under a CC BY 4.0 License Status: Posted Version 1 posted You are reading this latest preprint version Abstract Edge detection is one of the first steps in analysing a digital image. While several algorithms have been proposed in the past, there is limited work that compares their performance for metrological applications. This work compares seven algorithms including two pixel-based - Otsu and Canny’s methods, and five sub-pixel-based - cubic interpolation, quintic interpolation, moment based, partial-area based and subset tracking based approaches for determining the straight-line edges. The study considers both synthetic and real images. The real images were of objects of interest in dimensional metrology, from razor blade edges to the longitudinal edges of cylinders of various diameters and the parallel measuring faces of gauge blocks. While the root mean squared deviation was the primary criterion, a comparison of the computational times was also carried out. Results indicate that quintic interpolation gives the best results, though it also requires the most computational time among all the evaluated methods. Mechanical Engineering Numerical Analysis Edge detection Image processing Sub-pixel accuracy Dimensional Metrology Figures Figure 1 Figure 2 Figure 3 Figure 4 Figure 5 Figure 6 Figure 7 1. Introduction Dimensional metrology commonly requires the determination of the sizes of different types of features. Developments in cameras and the easy availability of increasing computing power have made machine vision an attractive approach for the purpose. When using machine vision, the first step is to obtain an image of the object being measured. Thereafter the image needs to be analysed to obtain the required dimensions. One of the most common requirements in dimensional metrology is the measurement of the distance between two edges. This requires determination of the edge between the object and the background in the image. This is the classic problem of edge detection. When we started to implement a system for edge detection, we found that numerous methods had been proposed for the purpose, but there were no clear-cut guidelines on which were the best. Hence, we decided to carry out a study to compare the available methods. Edge detection methods have been surveyed by Ziou and Tabbone [1]. They have provided an overview of existing edge detectors and their implementations. In general, there are two basic edge detection methods, one based on thresholding and the other based on gradient detection. The simplest approach to distinguishing between the object and the background is thresholding. The most popular method for thresholding is due to Otsu [2]. The algorithm returns an intensity level which separates the pixels into object and background classes, such that the variance between the two classes is maximised. We have chosen Otsu’s approach as one of the methods for comparison. The next approach to edge detection is based on the gradient of intensity values of pixels along a direction. The point of the highest gradient of intensities is identified as the edge. This approach is exemplified by the Sobel and Prewitt edge detectors. These use a mask that emphasises pixels along the desired orientation. A more sophisticated version of this idea was proposed by Canny [3], who suggested a series of steps starting with a smoothing filter followed by computation of the gradient using Sobel or Prewitt mask followed by non-maximum suppression and hysteresis process. Most works, for example, Gonzalez and Woods [4] consider this method best and seems to be the most popular one applied. Therefore, we selected Canny’s edge detection approach as the second method for the comparison. Both the above methods identify the boundary between pixels as the edge. However, the actual edge will never be exactly between the pixels. This leads to the possibility of interpolating between the edges, and these methods are called sub-pixel methods. In general, this is a computationally intensive approach and hence is not commonly used. In most machine vision applications, the edges may be in several directions, and we wish to detect all of them. However, for metrological applications, the general direction of the edge is known, which limits the computations to be carried out. Also, usually, time is not a constraint, and hence the improved performance may be worth the effort. Hence, we surveyed the sub-pixel edge detection methods and found that these can be divided into curve fitting, moment-based, and partial area effect methods. Xu [5] was one of the first authors to implement the curve-fitting approach. They fitted a polynomial of the second degree to the pixel intensities along the desired direction, and the edge was determined as the point where the intensity equalled a threshold value. Curve fitting is widely used in the areas of metrology [6], medical [7] and quality control [8]. We found the performance to be best while interpolating the intensities using cubic interpolation, and quintic interpolation and determining the edge as the point of maximum slope, and both these methods are selected for comparison in this study. The moment-based method is based on a set of orthogonal complex moments of the image known as Zernike moments. An ideal 2-D step edge is modelled in terms of four parameters: the background grey levels, the step size, the distance of the edge from the centre of the mask, and the orientation of the edge. Tahmasbi et al. [9] used the Zenrike moment-based edge detection method to extract the sub-pixel edge to diagnose breast masses and demonstrated it to be the most effective technique for edge detection. Therefore, the moment-based edge detection based on Tahmasbi was included for comparison. Trujillo-Pino et al. [10] have proposed an edge detection method based on the partial area effect approach. Here continuity in the image values is not assumed, but the edge is approximated by straight lines in the neighbourhood of each edge pixel and then adapted to second-order curves. When the noise was very high, an iterative method for enhancing the image quality was employed to maintain the precision of the obtained features. In this study, Trujillo-Pino’s method was selected for comparison because it is a novel and distinct approach. Matsubara [11] proposed a tracking method which uses circular markers to track the position of an object. Here the object position is tracked in x and y directions in sub-pixel resolution for measuring small displacements for vibration measurements. We have modified this approach to determine the sub-pixel positions of an edge, as explained in Section 2.4.2. Thus, we selected seven algorithms for detailed study and comparison - Otsu’s method, Canny’s method, Cubic interpolation, Quintic interpolation, Tahmasbi’s method, Trujillo-Pino’s method and subset tracking method. In order to fix the methodology for the comparison of algorithms, we reviewed studies comparing edge detection algorithms. Maini and Aggarwal [12] compared the edge detectors by finding the number of false and missing edges and calculating the variance of estimated location and orientation. Wu et al. [13] compared the edge detection methods by finding precision and recall values from the edges located in a synthetic and real image. Narendra and Hareesh [14] compared edge detectors in inspecting vegetables, fruits and food grains and compared the results with a visual inspection. Ozturk and Akdemir [15] analysed the performance of edge detection algorithms in evaluating glass texture using a reference image to determine glass surface defects like scratches, cracks and bubbles. The proposed method was shown to produce better results at high noise conditions. In general, we could not find a common methodology for the comparison. While some authors used synthetic images, some used real images, and some used both. The precision was generally evaluated by the mean square error of the fit or the signal-to-noise ratio. Here we have used precision as well as time for the comparison. 2. Methodology We need to compare the seven algorithms selected above. The basic methodology is to apply all the available algorithms on every image and compare the performance, which is equivalent to a Randomised Complete Block Design (RCBD), with the image considered as a block. The image may be produced using various methods, objects etc. The methodology used for comparison is explained in the subsequent sections. 2.1. Criteria for comparison As we were focused on metrological applications, the precision of the edge location was the foremost criterion in our minds. With more complex algorithms, the computation time was found to be higher, and hence that was selected as the second criterion for comparison. 2.1.1. Precision To determine the precision of edge location, we use the root mean square of the deviations. The image is aligned such that the edge to be determined will be nearly horizontal. After determining the edge coordinates, the best-fit line passing through the points is determined using the method of least squares. The vertical deviation of each data point from the best-fit line is calculated. The root mean square, \(\:\:{\sigma\:}\) of all the deviations is computed from Eq. 1 . The steps involved are shown in Fig. 1 . $$\:{\sigma\:}=\:\sqrt{\frac{\sum\:_{\text{i}=1}^{\text{n}}{\text{e}}_{\text{i}}^{2}}{\text{n}}}$$ 1 Where \(\:e\) is the individual deviation of the point from the fitted line, and \(\:n\) is the total number of edge points detected along the edge 2.1.2. Time The time taken by each algorithm was measured as follows. The first step, common to all the algorithms, was to crop the captured image to the region of interest and convert it to grayscale. At this point, the time measurement was started. The next step was to determine the edge points for each image using any single algorithm and store them in a matrix. The time measurement was stopped after all the edge points were stored. This time was averaged for all images for each algorithm and compared 2.2. Factors The performance of the algorithm could vary depending on several factors. We have systematically varied the following factors in this study 2.2.1. Objects Objects with straight edges were only considered in this study. One of the factors which were expected to affect the edge formation was the radius of the object. As edges with one of the smallest radii, we chose razor blade edges. Then, different cylindrical objects with nominal diameter of around 4.5 mm and nominal diameter of 30 mm were chosen. Gauge blocks with their edge normal to the image were also chosen, which approximate an object to an infinite radius. Photographs of all the objects used are shown in Fig. 2 . 2.2.2. Image We have used synthetic and real images for comparison. Synthetic images were created in a 2D matrix the same size as the resolution of the camera’s image. All pixels representing the image’s background were provided with values of 255, and the area representing the object was provided with a value of zero. The edge of the image in a synthetic image is usually represented by a sudden change from 0 to 255. To simulate a real edge, luminance values near the edge were gradually changed from 0 to 255 according to a sigmoid function, as shown in Table 1 . Further, Gaussian noise of varying amounts was added to the synthetic image to simulate real-world conditions, as given in Eq. 2 , Where \(\:{I}_{n}\) is the image after the application of Gaussian noise to the synthetic image matrix \(\:{I}_{s}\) . The Gaussian noise provided has a standard deviation \(\:\sigma\:\) and \(\:\mathcal{N}\left(\text{0,1}\right)\) generates normally distributed random numbers having a mean and variance of 0 and 1. $$\:{I}_{n}={I}_{s}+\sigma\:\times\:\mathcal{N}\left(\text{0,1}\right)$$ 2 Real images were captured using the smartphone Oneplus 6t using a Sony IMX 519 CMOS sensor with a \(\:3456\times\:4608\:\) pixels resolution. The camera’s closest possible distance to the object while achieving complete focus was 100 mm, and this distance was fixed at 150 mm to provide a safe margin. The camera is placed so its central axis will be in the middle and perpendicular to the object’s axis. The object was placed on a clear glass where light could fall on the object. Two sets of spheres were used to hold the pin gauges and grooves to locate slip gauges and blades. The object was illuminated from below using an diffused LED light source an intensity of 750 lx. The default camera application at ISO 100 with a shutter speed of 1/200 on manual focus was used to maintain consistency between shots. The object’s shadow was captured using the camera. Images of all the objects were captured individually. Two images were captured of each object, and the process was repeated for ten objects of each type. Table 1 2D matrix representing synthetic image Row/Column 1 2 … 500 1 0 0 … 0 2 0 0 … 0 … … … … … 45 0 0 … 0 46 0 0 … 0 47 12 12 … 12 48 30 30 … 30 49 69 69 … 69 50 128 128 … 128 51 186 186 … 186 52 225 225 … 225 53 243 243 … 243 54 255 255 … 255 55 255 255 … 255 … … … … … 99 255 255 … 255 100 255 255 … 255 2.2.3. Image Capture Format Images can be captured from a camera primarily using formats JPG and DNG. The common file format is JPG, but this reportedly is less precise due to the artefacts in compression. Hence the images were captured in DNG, a raw file format used in digital photography, developed on the TIFF 6.0 format, which was later converted into TIFF using Adobe Photoshop at the time of analysis. 2.3. Analysis of Image The images of each object were transferred to the system. The images were processed in a MATLAB environment. The two common steps carried out before applying edge detection algorithms were firstly cropping the images to the region of interest to improve the algorithm’s efficiency, see Fig. 3 (a) followed by converting the image to a 16-bit grayscale image resulting in a 2D-matrix, see Fig. 3 (b). After that, the edges of the objects from the images were identified using Otsu’s thresholding, the Canny, Trujillo-Pino, and Tahmasbi edge detection algorithm using codes available from the MathWorks website. For the other three methods, viz, cubic interpolation, quintic interpolation and Subset methods, the code was developed as detailed below. 2.3.1. Interpolation Edge Detector The pixel-level edge location is obtained based on the specified threshold. From this location, five pixels above and below are extracted from the grayscale image column shown in Fig. 3 (c). A cubic or quintic function is fitted to these luminosity values. The second derivative is computed, and the maximum gradient point is computed as the sub-pixel edge, shown in Fig. 3 (d). Steps are repeated for all the pixel-level edge locations identified. The results for all the edge points were compiled and presented. 2.3.2. Subset Edge Detector From the pixel edge location, four pixels above and below are extracted from the grayscale image column, as shown in Fig. 4 (c) and (d). The subpixel edge location from the pixel-level edge value is obtained from the approach illustrated in Fig. 4 (e). A sample calculation is shown in Fig. 4 (f). Steps were repeated for every pixel-level edge point. 3. Results and Discussions A study on the performance of algorithms on synthetic and real images captured of various objects is presented below 3.1. Synthetic Images All algorithms produce a mean standard deviation value close to zero on synthetic images without noise; as the noise increases mean standard deviation also increases. From the P-values in the Anova table shown in Table 2 , we can say that there is a significant difference between the algorithms in detecting edges under noisy conditions. Figure 6 (a) shows that all algorithms produced comparable edge detection results on synthetic images with Gaussian noise (σ = 10), except Otsu’s method, which was excluded due to its high mean standard deviation of 13.58. At the same time, Canny and subset algorithms performed the best. Canny’s algorithm produced better results mainly due to its provision of the ability to adjust the output quality by manipulating the edge detection parameters, sigma and threshold. 3.2. Image Capture Format The mean standard deviation between the TIFF images and its corresponding JPG images for 20 images of ten pin gauges from 4.51 to 4.60 mm is shown in Fig. 5 . In the case of sub-pixel edge detection algorithms, TIFF images yielded superior results, whereas, for pixel-level algorithms, the impact of image format is negligible. This may be because compression in JPG images degrades image quality, causing the sub-pixel edge detection algorithm to perform inadequately compared to TIFF images. Since the precision of pixel-level algorithms in edge detection is lower, compression does not impact their results much. 3.3. Object The performance of the algorithms for different types of objects is discussed in this section. The impact was analysed by balanced analysis of variance using standard deviation as the response variable and image and algorithms as fixed factors. Four different object sets were utilised for the analysis, each with ten items. Two images were captured on each item, so 80 were captured and used for the study. Edge points were estimated from each image using all the algorithms. Precision is calculated from the obtained edge points, as explained in Section 2.1.1. The results for each object type are given below 3.3.1. Blade The blade has the least average standard deviation values in detecting edges compared to the other objects considered in the study. It may be due to the least edge radii among the considered objects. From the P-value in the Anova table shown in Table 2 , we can say that there is a significant difference between the algorithms in detecting blade edges. From the interval plot shown in Fig. 6 (b), we can say that quintic interpolation edge detection performed the best compared to other algorithms. 3.3.2. 4 mm Pin Gauge Considering the 4 mm pin gauge, the P-value in the Anova table, shown in Table 2 , indicates a significant difference between the algorithms in detecting 4 mm pin gauge edges. From the interval plot shown in Fig. 6 (c), quintic interpolation edge detection performed the best compared to other algorithms. 3.3.3. 30 mm Pin Gauge The 30 mm pin gauges have the highest average standard deviation values in detecting edges compared to other objects considered for the comparison. It may be due to the largest edge radii among other objects considered. From the P-value from the Anova table shown in Table 2 , we can say that there is a significant difference between algorithms in detecting 30 mm pin gauge edges. From the interval plot shown in Fig. 6 (d), we can say that quintic interpolation and Tahmasbi edge detection performed the best compared to other algorithms. 3.3.4. Gauge Block Considering gauge block, the P-value from the Anova table shown in Table 2 indicates a significant difference between the algorithms in detecting gauge block edges. From the interval plot shown in Fig. 6 (e), we can say that quintic interpolation, Tahmasbi and Trujillo-Pino edge detection performed the best. Table 2 ANOVA Table showing precision of algorithms in detecting edges for different types of workpieces Criteria Factors F-Value P-Value Synthetic images Image 1.35 0.232 Algorithm 304804.70 0 Real images: Blade Image 0.97 0.496 Algorithm 890.89 0 Real images: 4 mm pin Image 4.65 0 Algorithm 1986.78 0 Real images: 30 mm pin Image 1.07 0.39 Algorithm 277.76 0 Real images: Gauge block Image 1.76 0.035 Algorithm 1002.02 0 3.4. Time The average time taken for each algorithm in processing 80 images is shown in Fig. 7. The computation time taken for quintic and cubic interpolation is more than others. It may be due to its two-stage process of identifying edges at the pixel level, solving each pixel-level edge point for its sub-pixel edge values, and using a third and fifth-order polynomial 2. Conclusion A comprehensive study of various edge detection algorithms under different conditions has been conducted. The influence of image format, multiple objects with varying edge radii, and the time taken by the algorithm to process an image were examined. Based on these results, the following conclusions can be made. 1) TIFF images produce better results than JPG in the subpixel edge detection method. For pixel-level edge detection, the image format does not have much influence. 2) As the edge radius increases, the precision of edge detection was found to decrease. 3) The best algorithm was found to be Quintic interpolation in most conditions in determining edges. 4) The time taken for interpolation edge detection is more compared to other algorithms. 5) The Canny edge detection and subset algorithms produce better results at high Gaussian noise levels. The present work has considered only straight-line edges. Further work needs to be done on other types of edges, as also other types of objects References Ziou D, Tabbone S (1998) Edge Detection Techniques-An Overview. Pattern Recognit Image Anal Adv Math Theory Appl 8:537–559 Otsu N (1979) Threshold Selection Method From Gray-Level Histograms. IEEE Trans Syst Man Cybern SMC-9:62–66. https://doi.org/10.1109/tsmc.1979.4310076 Canny J (1986) A Computational Approach to Edge Detection. IEEE Trans Pattern Anal Mach Intell PAMI-8:679–698. https://doi.org/10.1109/TPAMI.1986.4767851 Gonzalez RC, Woods RE (2008) Digital image processing. Prentice Hall, Upper Saddle River, N.J. Guo-sheng X (2010) The applicaion of curve fitting technique in fabric defect detection. In: 2010 2nd International Conference on Signal Processing Systems. IEEE, pp V1-272-V1-275 Suresh A, Dhanish PB (2025) An Experimental Investigation of Factors Affecting Repeatability in Diameter Measurements Using Machine Vision. J Adv Manuf Syst 24:309–334. https://doi.org/10.1142/S0219686725500155 Di Y, Huang Y, Yang Y, Zhou X-T, Luo W, Ye H, Qiao Z, Lu N, Qiao T (2020) Measuring the Ocular Morphological Parameters of Guinea Pig Eye with Edge Detection and Curve Fitting. Comput Math Methods Med 2020:1–13. https://doi.org/10.1155/2020/6689023 Guo-sheng X (2010) The applicaion of curve fitting technique in fabric defect detection. In: 2010 2nd International Conference on Signal Processing Systems. IEEE, pp V1-272-V1-275 Tahmasbi A, Saki F, Aghapanah H, Shokouhi SB (2011) A novel breast mass diagnosis system based on Zernike moments as shape and density descriptors. In: 2011 18th Iranian Conference of Biomedical Engineering, ICBME 2011. pp 100–104 Trujillo-Pino A, Krissian K, Alemán-Flores M, Santana-Cedrés D (2013) Accurate subpixel edge location based on partial area effect. Image Vis Comput 31:72–90. https://doi.org/10.1016/j.imavis.2012.10.005 Matsubara M, Wako T, Matsuoka T, Kawamura S (2022) Position-adjusted subset tracking analysis coupled with a double circle marker. Precis Eng 77:153–163. https://doi.org/10.1016/j.precisioneng.2022.05.015 Maini, Raman, Aggarwal H (2009) Study and Comparison of Various Image Edge Detection Techniques Edges characterize boundaries and are therefore a problem of fundamental importance in. Int J Image Process 3:1–11 Wu Z, Lu X, Deng Y (2015) Image edge detection based on local dimension: A complex networks approach. Phys A Stat Mech its Appl 440:9–18. https://doi.org/10.1016/j.physa.2015.07.020 Narendra V G HKS (2011) Study and comparison of various image edge detection techniques used in quality inspection and evaluation of agricultural and food products by computer vision. Int J Agric Biol Eng 4:. https://doi.org/10.3965/j.issn.1934-6344.2011.02.0-0 Öztürk Ş, Akdemir B (2015) Comparison of Edge Detection Algorithms for Texture Analysis on Glass Production. Procedia - Soc Behav Sci 195:2675–2682. https://doi.org/10.1016/j.sbspro.2015.06.477 Additional Declarations The authors declare no competing interests. Cite Share Download PDF Status: Posted Version 1 posted You are reading this latest preprint version Research Square lets you share your work early, gain feedback from the community, and start making changes to your manuscript prior to peer review in a journal. As a division of Research Square Company, we’re committed to making research communication faster, fairer, and more useful. We do this by developing innovative software and high quality services for the global research community. Our growing team is made up of researchers and industry professionals working together to solve the most critical problems facing scientific publishing. Also discoverable on Platform About Our Team In Review Editorial Policies Advisory Board Help Center Resources Author Services Accessibility API Access RSS feed Manage Cookie Preferences © Research Square 2026 | ISSN 2693-5015 (online) Privacy Policy Terms of Service Do Not Sell My Personal Information {"props":{"pageProps":{"initialData":{"identity":"rs-7569036","acceptedTermsAndConditions":true,"allowDirectSubmit":true,"archivedVersions":[],"articleType":"Research Article","associatedPublications":[],"authors":[{"id":512228089,"identity":"278c8fd2-67bb-4f96-bb9c-ab0355f11f0c","order_by":0,"name":"Ashik Suresh","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAA8klEQVRIiWNgGAWjYFACHoaDDRAWG8MHEMlOihbGGSCSmQgtjDAtzDwgipAW/v6zBw/OYKhL3N7e/uyxza9t8nzMDIwfPubg1iJxIy/h4AaGw4lzzpwxN87tu23YxszALDlzGx5rbvAYHHzAcCBxhkQOm3Ruz21GoBY2Zl48WuTPnwFpqUucIf/8mbRlz217gloMDuQYAB3GDLSFwUya4cftRIJaDG8AtcwwOGw8gyfHTLK34XZyGzNjM16/yJ0/Y/yxp6JOdgb78WcSP/7ctp3f3nzww0d83oc4D0oztoHJBkLqkcEfUhSPglEwCkbBSAEARHdR/IKKqtAAAAAASUVORK5CYII=","orcid":"https://orcid.org/0000-0001-7702-130X","institution":"Amrita Vishwa Vidyapeetam","correspondingAuthor":true,"prefix":"","firstName":"Ashik","middleName":"","lastName":"Suresh","suffix":""},{"id":512228580,"identity":"5dad41ba-841b-4eae-8135-6bef940fb90a","order_by":1,"name":"P. B. Dhanish","email":"","orcid":"https://orcid.org/0000-0002-7727-1031","institution":"National Institute of Technology Calicut","correspondingAuthor":false,"prefix":"","firstName":"P.","middleName":"B.","lastName":"Dhanish","suffix":""}],"badges":[],"createdAt":"2025-09-09 04:02:07","currentVersionCode":1,"declarations":{"humanSubjects":false,"vertebrateSubjects":false,"conflictsOfInterestStatement":false,"humanSubjectEthicalGuidelines":false,"humanSubjectConsent":false,"humanSubjectClinicalTrial":false,"humanSubjectCaseReport":false,"vertebrateSubjectEthicalGuidelines":false},"doi":"10.21203/rs.3.rs-7569036/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-7569036/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":91077918,"identity":"2df75721-0738-4c68-bcca-32f8b727a7f2","added_by":"auto","created_at":"2025-09-11 11:17:13","extension":"png","order_by":1,"title":"Figure 1","display":"","copyAsset":false,"role":"figure","size":48549,"visible":true,"origin":"","legend":"\u003cp\u003eSteps in precision determination.\u003c/p\u003e","description":"","filename":"1.png","url":"https://assets-eu.researchsquare.com/files/rs-7569036/v1/fe94fee086af40b07eecfd7e.png"},{"id":91079608,"identity":"1882d146-c8b2-4080-a22f-e403a51600db","added_by":"auto","created_at":"2025-09-11 11:25:13","extension":"png","order_by":2,"title":"Figure 2","display":"","copyAsset":false,"role":"figure","size":158201,"visible":true,"origin":"","legend":"\u003cp\u003eObjects used for the experiment\u003c/p\u003e","description":"","filename":"2.png","url":"https://assets-eu.researchsquare.com/files/rs-7569036/v1/e0a80e298de47f8a2d0bc3af.png"},{"id":91080281,"identity":"31cd6092-432e-4cb1-bf3a-5b836334a872","added_by":"auto","created_at":"2025-09-11 11:33:13","extension":"png","order_by":3,"title":"Figure 3","display":"","copyAsset":false,"role":"figure","size":33144,"visible":true,"origin":"","legend":"\u003cp\u003eSteps involved in cubic and quintic interpolation edge detection method\u003c/p\u003e","description":"","filename":"3.png","url":"https://assets-eu.researchsquare.com/files/rs-7569036/v1/396a47886e2135f2905738dc.png"},{"id":91077921,"identity":"9837b46e-c061-4f91-bf35-52ff5f6306e8","added_by":"auto","created_at":"2025-09-11 11:17:13","extension":"png","order_by":4,"title":"Figure 4","display":"","copyAsset":false,"role":"figure","size":26519,"visible":true,"origin":"","legend":"\u003cp\u003eSteps involved in subset edge detection method\u003c/p\u003e","description":"","filename":"4.png","url":"https://assets-eu.researchsquare.com/files/rs-7569036/v1/a7a2fe018149b816d7109e35.png"},{"id":91079605,"identity":"3d0107b6-b283-4f44-b197-2a306aa57bdb","added_by":"auto","created_at":"2025-09-11 11:25:13","extension":"png","order_by":5,"title":"Figure 5","display":"","copyAsset":false,"role":"figure","size":30717,"visible":true,"origin":"","legend":"\u003cp\u003eComparison of JPG and TIFF image formats of different algorithms\u003c/p\u003e","description":"","filename":"5.png","url":"https://assets-eu.researchsquare.com/files/rs-7569036/v1/87d8aa224ea784d2b1ca73ed.png"},{"id":91077934,"identity":"dc9e2761-cd01-47f1-a07d-dc739321c5e9","added_by":"auto","created_at":"2025-09-11 11:17:14","extension":"png","order_by":6,"title":"Figure 6","display":"","copyAsset":false,"role":"figure","size":23312,"visible":true,"origin":"","legend":"\u003cp\u003eFig 5. Boxplot comparing the precision of algorithms in detecting edges for different types of workpieces\u003c/p\u003e","description":"","filename":"05.png","url":"https://assets-eu.researchsquare.com/files/rs-7569036/v1/d8ab6d040eef0f776d667ca7.png"},{"id":91077927,"identity":"93aaaa97-6d6a-43af-a73f-b5115592ed5f","added_by":"auto","created_at":"2025-09-11 11:17:13","extension":"png","order_by":7,"title":"Figure 7","display":"","copyAsset":false,"role":"figure","size":11841,"visible":true,"origin":"","legend":"\u003cp\u003eF\u003cem\u003eig\u003c/em\u003e 6. Comparison of time taken by different algorithms\u003c/p\u003e","description":"","filename":"6.png","url":"https://assets-eu.researchsquare.com/files/rs-7569036/v1/00cb6dd01d56589b575569c4.png"},{"id":91081624,"identity":"6ea1abb5-e516-44ad-bbb9-60ab181719b2","added_by":"auto","created_at":"2025-09-11 11:41:15","extension":"pdf","order_by":0,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":893139,"visible":true,"origin":"","legend":"","description":"","filename":"manuscript.pdf","url":"https://assets-eu.researchsquare.com/files/rs-7569036/v1/a93dd8ff-f755-46a4-90f9-cce56c6128e4.pdf"}],"financialInterests":"The authors declare no competing interests.","formattedTitle":"\u003cp\u003eComparison Of Algorithms to Detect Straight Line Edges in Images for Metrological Applications\u003c/p\u003e","fulltext":[{"header":"1. Introduction","content":"\u003cp\u003eDimensional metrology commonly requires the determination of the sizes of different types of features. Developments in cameras and the easy availability of increasing computing power have made machine vision an attractive approach for the purpose. When using machine vision, the first step is to obtain an image of the object being measured. Thereafter the image needs to be analysed to obtain the required dimensions.\u003c/p\u003e\u003cp\u003eOne of the most common requirements in dimensional metrology is the measurement of the distance between two edges. This requires determination of the edge between the object and the background in the image. This is the classic problem of edge detection. When we started to implement a system for edge detection, we found that numerous methods had been proposed for the purpose, but there were no clear-cut guidelines on which were the best. Hence, we decided to carry out a study to compare the available methods.\u003c/p\u003e\u003cp\u003eEdge detection methods have been surveyed by Ziou and Tabbone [1]. They have provided an overview of existing edge detectors and their implementations. In general, there are two basic edge detection methods, one based on thresholding and the other based on gradient detection. The simplest approach to distinguishing between the object and the background is thresholding. The most popular method for thresholding is due to Otsu [2]. The algorithm returns an intensity level which separates the pixels into object and background classes, such that the variance between the two classes is maximised. We have chosen Otsu\u0026rsquo;s approach as one of the methods for comparison.\u003c/p\u003e\u003cp\u003eThe next approach to edge detection is based on the gradient of intensity values of pixels along a direction. The point of the highest gradient of intensities is identified as the edge. This approach is exemplified by the Sobel and Prewitt edge detectors. These use a mask that emphasises pixels along the desired orientation. A more sophisticated version of this idea was proposed by Canny [3], who suggested a series of steps starting with a smoothing filter followed by computation of the gradient using Sobel or Prewitt mask followed by non-maximum suppression and hysteresis process. Most works, for example, Gonzalez and Woods [4] consider this method best and seems to be the most popular one applied. Therefore, we selected Canny\u0026rsquo;s edge detection approach as the second method for the comparison.\u003c/p\u003e\u003cp\u003eBoth the above methods identify the boundary between pixels as the edge. However, the actual edge will never be exactly between the pixels. This leads to the possibility of interpolating between the edges, and these methods are called sub-pixel methods. In general, this is a computationally intensive approach and hence is not commonly used. In most machine vision applications, the edges may be in several directions, and we wish to detect all of them. However, for metrological applications, the general direction of the edge is known, which limits the computations to be carried out. Also, usually, time is not a constraint, and hence the improved performance may be worth the effort. Hence, we surveyed the sub-pixel edge detection methods and found that these can be divided into curve fitting, moment-based, and partial area effect methods.\u003c/p\u003e\u003cp\u003eXu [5] was one of the first authors to implement the curve-fitting approach. They fitted a polynomial of the second degree to the pixel intensities along the desired direction, and the edge was determined as the point where the intensity equalled a threshold value. Curve fitting is widely used in the areas of metrology [6], medical [7] and quality control [8]. We found the performance to be best while interpolating the intensities using cubic interpolation, and quintic interpolation and determining the edge as the point of maximum slope, and both these methods are selected for comparison in this study.\u003c/p\u003e\u003cp\u003eThe moment-based method is based on a set of orthogonal complex moments of the image known as Zernike moments. An ideal 2-D step edge is modelled in terms of four parameters: the background grey levels, the step size, the distance of the edge from the centre of the mask, and the orientation of the edge. Tahmasbi et al. [9] used the Zenrike moment-based edge detection method to extract the sub-pixel edge to diagnose breast masses and demonstrated it to be the most effective technique for edge detection. Therefore, the moment-based edge detection based on Tahmasbi was included for comparison.\u003c/p\u003e\u003cp\u003eTrujillo-Pino et al. [10] have proposed an edge detection method based on the partial area effect approach. Here continuity in the image values is not assumed, but the edge is approximated by straight lines in the neighbourhood of each edge pixel and then adapted to second-order curves. When the noise was very high, an iterative method for enhancing the image quality was employed to maintain the precision of the obtained features. In this study, Trujillo-Pino\u0026rsquo;s method was selected for comparison because it is a novel and distinct approach.\u003c/p\u003e\u003cp\u003eMatsubara [11] proposed a tracking method which uses circular markers to track the position of an object. Here the object position is tracked in x and y directions in sub-pixel resolution for measuring small displacements for vibration measurements. We have modified this approach to determine the sub-pixel positions of an edge, as explained in Section 2.4.2.\u003c/p\u003e\u003cp\u003eThus, we selected seven algorithms for detailed study and comparison - Otsu\u0026rsquo;s method, Canny\u0026rsquo;s method, Cubic interpolation, Quintic interpolation, Tahmasbi\u0026rsquo;s method, Trujillo-Pino\u0026rsquo;s method and subset tracking method.\u003c/p\u003e\u003cp\u003eIn order to fix the methodology for the comparison of algorithms, we reviewed studies comparing edge detection algorithms. Maini and Aggarwal [12] compared the edge detectors by finding the number of false and missing edges and calculating the variance of estimated location and orientation. Wu et al. [13] compared the edge detection methods by finding precision and recall values from the edges located in a synthetic and real image. Narendra and Hareesh [14] compared edge detectors in inspecting vegetables, fruits and food grains and compared the results with a visual inspection. Ozturk and Akdemir [15] analysed the performance of edge detection algorithms in evaluating glass texture using a reference image to determine glass surface defects like scratches, cracks and bubbles. The proposed method was shown to produce better results at high noise conditions.\u003c/p\u003e\u003cp\u003eIn general, we could not find a common methodology for the comparison. While some authors used synthetic images, some used real images, and some used both. The precision was generally evaluated by the mean square error of the fit or the signal-to-noise ratio. Here we have used precision as well as time for the comparison.\u003c/p\u003e"},{"header":"2. Methodology","content":"\u003cp\u003eWe need to compare the seven algorithms selected above. The basic methodology is to apply all the available algorithms on every image and compare the performance, which is equivalent to a Randomised Complete Block Design (RCBD), with the image considered as a block. The image may be produced using various methods, objects etc. The methodology used for comparison is explained in the subsequent sections.\u003c/p\u003e\n\u003cdiv id=\"Sec3\" class=\"Section2\"\u003e\n \u003ch2\u003e2.1. Criteria for comparison\u003c/h2\u003e\n \u003cp\u003eAs we were focused on metrological applications, the precision of the edge location was the foremost criterion in our minds. With more complex algorithms, the computation time was found to be higher, and hence that was selected as the second criterion for comparison.\u003c/p\u003e\n \u003cdiv id=\"Sec4\" class=\"Section3\"\u003e\n \u003ch2\u003e2.1.1. Precision\u003c/h2\u003e\n \u003cp\u003eTo determine the precision of edge location, we use the root mean square of the deviations. The image is aligned such that the edge to be determined will be nearly horizontal. After determining the edge coordinates, the best-fit line passing\u003c/p\u003e\n \u003cp\u003ethrough the points is determined using the method of least squares. The vertical deviation of each data point from the best-fit line is calculated. The root mean square,\u003cspan class=\"InlineEquation\"\u003e\u003cspan class=\"mathinline\"\u003e\\(\\:\\:{\\sigma\\:}\\)\u003c/span\u003e\u003c/span\u003e of all the deviations is computed from Eq. \u003cspan class=\"InternalRef\"\u003e1\u003c/span\u003e. The steps involved are shown in Fig. \u003cspan class=\"InternalRef\"\u003e1\u003c/span\u003e.\u003c/p\u003e\n \u003cdiv id=\"Equ1\" class=\"Equation\"\u003e\n \u003cdiv class=\"mathdisplay\" id=\"FileID_Equ1\" name=\"EquationSource\"\u003e$$\\:{\\sigma\\:}=\\:\\sqrt{\\frac{\\sum\\:_{\\text{i}=1}^{\\text{n}}{\\text{e}}_{\\text{i}}^{2}}{\\text{n}}}$$\u003c/div\u003e\n \u003cdiv class=\"EquationNumber\"\u003e1\u003c/div\u003e\n \u003c/div\u003e\n \u003cp\u003eWhere \u003cspan class=\"InlineEquation\"\u003e\u003cspan class=\"mathinline\"\u003e\\(\\:e\\)\u003c/span\u003e\u003c/span\u003e is the individual deviation of the point from the fitted line, and \u003cspan class=\"InlineEquation\"\u003e\u003cspan class=\"mathinline\"\u003e\\(\\:n\\)\u003c/span\u003e\u003c/span\u003e is the total number of edge points detected along the edge\u003c/p\u003e\n \u003c/div\u003e\n \u003cdiv id=\"Sec5\" class=\"Section3\"\u003e\n \u003ch2\u003e2.1.2. Time\u003c/h2\u003e\n \u003cp\u003eThe time taken by each algorithm was measured as follows. The first step, common to all the algorithms, was to crop the captured image to the region of interest and convert it to grayscale. At this point, the time measurement was started. The next step was to determine the edge points for each image using any single algorithm and store them in a matrix. The time measurement was stopped after all the edge points were stored. This time was averaged for all images for each algorithm and compared\u003c/p\u003e\n \u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv id=\"Sec6\" class=\"Section2\"\u003e\n \u003ch2\u003e2.2. Factors\u003c/h2\u003e\n \u003cp\u003eThe performance of the algorithm could vary depending on several factors. We have systematically varied the following factors in this study\u003c/p\u003e\n \u003cdiv id=\"Sec7\" class=\"Section3\"\u003e\n \u003ch2\u003e2.2.1. Objects\u003c/h2\u003e\n \u003cp\u003eObjects with straight edges were only considered in this study. One of the factors which were expected to affect the edge formation was the radius of the object. As edges with one of the smallest radii, we chose razor blade edges. Then, different cylindrical objects with nominal diameter of around 4.5 mm and nominal diameter of 30 mm were chosen. Gauge blocks with their edge normal to the image were also chosen, which approximate an object to an infinite radius. Photographs of all the objects used are shown in Fig. \u003cspan class=\"InternalRef\"\u003e2\u003c/span\u003e.\u003c/p\u003e\n \u003c/div\u003e\n \u003cdiv id=\"Sec8\" class=\"Section3\"\u003e\n \u003ch2\u003e2.2.2. Image\u003c/h2\u003e\n \u003cp\u003eWe have used synthetic and real images for comparison. Synthetic images were created in a 2D matrix the same size as the resolution of the camera\u0026rsquo;s image. All pixels representing the image\u0026rsquo;s background were provided with values of 255, and the area representing the object was provided with a value of zero. The edge of the image in a synthetic image is usually represented by a sudden change from 0 to 255. To simulate a real edge, luminance values near the edge were gradually changed from 0 to 255 according to a sigmoid function, as shown in Table \u003cspan class=\"InternalRef\"\u003e1\u003c/span\u003e. Further, Gaussian noise of varying amounts was added to the synthetic image to simulate real-world conditions, as given in Eq. \u003cspan class=\"InternalRef\"\u003e2\u003c/span\u003e,\u003c/p\u003e\n \u003cp\u003eWhere \u003cspan class=\"InlineEquation\"\u003e\u003cspan class=\"mathinline\"\u003e\\(\\:{I}_{n}\\)\u003c/span\u003e\u003c/span\u003e is the image after the application of Gaussian noise to the synthetic image matrix \u003cspan class=\"InlineEquation\"\u003e\u003cspan class=\"mathinline\"\u003e\\(\\:{I}_{s}\\)\u003c/span\u003e\u003c/span\u003e. The Gaussian noise provided has a standard deviation \u003cspan class=\"InlineEquation\"\u003e\u003cspan class=\"mathinline\"\u003e\\(\\:\\sigma\\:\\)\u003c/span\u003e\u003c/span\u003e and \u003cspan class=\"InlineEquation\"\u003e\u003cspan class=\"mathinline\"\u003e\\(\\:\\mathcal{N}\\left(\\text{0,1}\\right)\\)\u003c/span\u003e\u003c/span\u003e generates normally distributed random numbers having a mean and variance of 0 and 1.\u003c/p\u003e\n \u003cdiv id=\"Equ2\" class=\"Equation\"\u003e\n \u003cdiv class=\"mathdisplay\" id=\"FileID_Equ2\" name=\"EquationSource\"\u003e$$\\:{I}_{n}={I}_{s}+\\sigma\\:\\times\\:\\mathcal{N}\\left(\\text{0,1}\\right)$$\u003c/div\u003e\n \u003cdiv class=\"EquationNumber\"\u003e2\u003c/div\u003e\n \u003c/div\u003e\n \u003cp\u003eReal images were captured using the smartphone Oneplus 6t using a Sony IMX 519 CMOS sensor with a\u0026nbsp;\u003cspan class=\"InlineEquation\"\u003e\u003cspan class=\"mathinline\"\u003e\\(\\:3456\\times\\:4608\\:\\)\u003c/span\u003e\u003c/span\u003e pixels resolution. The camera\u0026rsquo;s closest possible distance to the object while achieving complete focus was 100 mm, and this distance was fixed at 150 mm to provide a safe margin. The camera is placed so its central axis will be in the middle and perpendicular to the object\u0026rsquo;s axis. The object was placed on a clear glass where light could fall on the object. Two sets of spheres were used to hold the pin gauges and grooves to locate slip gauges and blades. The object was illuminated from below using an diffused LED light source an intensity of 750 lx. The default camera application at ISO 100 with a shutter speed of 1/200 on manual focus was used to maintain consistency between shots. The object\u0026rsquo;s shadow was captured using the camera. Images of all the objects were captured individually. Two images were captured of each object, and the process was repeated for ten objects of each type.\u003c/p\u003e\n \u003cdiv class=\"gridtable\"\u003e\n \u003ctable id=\"Tab1\" border=\"1\"\u003e\n \u003ccaption language=\"En\"\u003e\n \u003cdiv class=\"CaptionNumber\"\u003eTable 1\u003c/div\u003e\n \u003cdiv class=\"CaptionContent\"\u003e\n \u003cp\u003e2D matrix representing synthetic image\u003c/p\u003e\n \u003c/div\u003e\n \u003c/caption\u003e\n \u003cthead\u003e\n \u003ctr\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eRow/Column\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003e1\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003e2\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003e\u0026hellip;\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003e500\u003c/p\u003e\n \u003c/th\u003e\n \u003c/tr\u003e\n \u003c/thead\u003e\n \u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e1\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e0\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e0\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e\u0026hellip;\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e0\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e2\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e0\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e0\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e\u0026hellip;\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e0\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e\u0026hellip;\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e\u0026hellip;\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e\u0026hellip;\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e\u0026hellip;\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e\u0026hellip;\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e45\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e0\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e0\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e\u0026hellip;\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e0\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e46\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e0\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e0\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e\u0026hellip;\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e0\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e47\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e12\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e12\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e\u0026hellip;\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e12\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e48\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e30\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e30\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e\u0026hellip;\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e30\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e49\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e69\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e69\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e\u0026hellip;\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e69\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e50\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e128\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e128\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e\u0026hellip;\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e128\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e51\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e186\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e186\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e\u0026hellip;\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e186\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e52\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e225\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e225\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e\u0026hellip;\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e225\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e53\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e243\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e243\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e\u0026hellip;\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e243\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e54\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e255\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e255\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e\u0026hellip;\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e255\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e55\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e255\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e255\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e\u0026hellip;\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e255\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e\u0026hellip;\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e\u0026hellip;\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e\u0026hellip;\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e\u0026hellip;\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e\u0026hellip;\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e99\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e255\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e255\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e\u0026hellip;\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e255\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e100\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e255\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e255\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e\u0026hellip;\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e255\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/tbody\u003e\n \u003c/table\u003e\n \u003c/div\u003e\n \u003cp\u003e\u003cbr\u003e\u003c/p\u003e\n \u003c/div\u003e\n \u003cdiv id=\"Sec9\" class=\"Section3\"\u003e\n \u003ch2\u003e2.2.3. Image Capture Format\u003c/h2\u003e\n \u003cp\u003eImages can be captured from a camera primarily using formats JPG and DNG. The common file format is JPG, but this reportedly is less precise due to the artefacts in compression. Hence the images were captured in DNG, a raw file format used in digital photography, developed on the TIFF 6.0 format, which was later converted into TIFF using Adobe Photoshop at the time of analysis.\u003c/p\u003e\n \u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv id=\"Sec10\" class=\"Section2\"\u003e\n \u003ch2\u003e2.3. Analysis of Image\u003c/h2\u003e\n \u003cp\u003eThe images of each object were transferred to the system. The images were processed in a MATLAB environment. The two common steps carried out before applying edge detection algorithms were firstly cropping the images to the region of interest to improve the algorithm\u0026rsquo;s efficiency, see Fig. \u003cspan class=\"InternalRef\"\u003e3\u003c/span\u003e(a) followed by converting the image to a 16-bit grayscale image resulting in a 2D-matrix, see Fig. \u003cspan class=\"InternalRef\"\u003e3\u003c/span\u003e (b). After that, the edges of the objects from the images were identified using Otsu\u0026rsquo;s thresholding, the Canny, Trujillo-Pino, and Tahmasbi edge detection algorithm using codes available from the MathWorks website. For the other three methods, viz, cubic interpolation, quintic interpolation and Subset methods, the code was developed as detailed below.\u003c/p\u003e\n \u003cdiv id=\"Sec11\" class=\"Section3\"\u003e\n \u003ch2\u003e2.3.1. Interpolation Edge Detector\u003c/h2\u003e\n \u003cp\u003eThe pixel-level edge location is obtained based on the specified threshold. From this location, five pixels above and below are extracted from the grayscale image column shown in Fig. \u003cspan class=\"InternalRef\"\u003e3\u003c/span\u003e (c). A cubic or quintic function is fitted to these luminosity values. The second derivative is computed, and the maximum gradient point is computed as the sub-pixel edge, shown in Fig. \u003cspan class=\"InternalRef\"\u003e3\u003c/span\u003e (d). Steps are repeated for all the pixel-level edge locations identified. The results for all the edge points were compiled and presented.\u003c/p\u003e\n \u003c/div\u003e\n \u003cdiv id=\"Sec12\" class=\"Section3\"\u003e\n \u003ch2\u003e2.3.2. Subset Edge Detector\u003c/h2\u003e\n \u003cp\u003eFrom the pixel edge location, four pixels above and below are extracted from the grayscale image column, as shown in Fig. \u003cspan class=\"InternalRef\"\u003e4\u003c/span\u003e (c) and (d). The subpixel edge location from the pixel-level edge value is obtained from the approach illustrated in Fig. \u003cspan class=\"InternalRef\"\u003e4\u003c/span\u003e (e). A sample calculation is shown in Fig. \u003cspan class=\"InternalRef\"\u003e4\u003c/span\u003e (f). Steps were repeated for every pixel-level edge point.\u003c/p\u003e\n \u003c/div\u003e\n\u003c/div\u003e"},{"header":"3. Results and Discussions","content":"\u003cp\u003eA study on the performance of algorithms on synthetic and real images captured of various objects is presented below\u003c/p\u003e\n\u003cdiv id=\"Sec14\" class=\"Section2\"\u003e\n \u003ch2\u003e3.1. Synthetic Images\u003c/h2\u003e\n \u003cp\u003eAll algorithms produce a mean standard deviation value close to zero on synthetic images without noise; as the noise increases mean standard deviation also increases. From the P-values in the Anova table shown in Table \u003cspan class=\"InternalRef\"\u003e2\u003c/span\u003e, we can say that there is a significant difference between the algorithms in detecting edges under noisy conditions. Figure \u003cspan class=\"InternalRef\"\u003e6\u003c/span\u003e(a) shows that all algorithms produced comparable edge detection results on synthetic images with Gaussian noise (\u0026sigma;\u0026thinsp;=\u0026thinsp;10), except Otsu\u0026rsquo;s method, which was excluded due to its high mean standard deviation of 13.58. At the same time, Canny and subset algorithms performed the best. Canny\u0026rsquo;s algorithm produced better results mainly due to its provision of the ability to adjust the output quality by manipulating the edge detection parameters, sigma and threshold.\u003c/p\u003e\n\u003c/div\u003e\n\u003cdiv id=\"Sec15\" class=\"Section2\"\u003e\n \u003ch2\u003e3.2. Image Capture Format\u003c/h2\u003e\n \u003cp\u003eThe mean standard deviation between the TIFF images and its corresponding JPG images for 20 images of ten pin gauges from 4.51 to 4.60 mm is shown in Fig. \u003cspan class=\"InternalRef\"\u003e5\u003c/span\u003e. In the case of sub-pixel edge detection algorithms, TIFF images yielded superior results, whereas, for pixel-level algorithms, the impact of image format is negligible. This may be because compression in JPG images degrades image quality, causing the sub-pixel edge detection algorithm to perform inadequately compared to TIFF images. Since the precision of pixel-level algorithms in edge detection is lower, compression does not impact their results much.\u003c/p\u003e\n\u003c/div\u003e\n\u003cdiv id=\"Sec16\" class=\"Section2\"\u003e\n \u003ch2\u003e3.3. Object\u003c/h2\u003e\n \u003cp\u003eThe performance of the algorithms for different types of objects is discussed in this section. The impact was analysed by balanced analysis of variance using standard deviation as the response variable and image and algorithms as fixed factors. Four different object sets were utilised for the analysis, each with ten items. Two images were captured on each item, so 80 were captured and used for the study. Edge points were estimated from each image using all the algorithms. Precision is calculated from the obtained edge points, as explained in Section 2.1.1. The results for each object type are given below\u003c/p\u003e\n \u003cdiv id=\"Sec17\" class=\"Section3\"\u003e\n \u003ch2\u003e3.3.1. Blade\u003c/h2\u003e\n \u003cp\u003eThe blade has the least average standard deviation values in detecting edges compared to the other objects considered in the study. It may be due to the least edge radii among the considered objects. From the P-value in the Anova table shown in Table \u003cspan class=\"InternalRef\"\u003e2\u003c/span\u003e, we can say that there is a significant difference between the algorithms in detecting blade edges. From the interval plot shown in Fig. \u003cspan class=\"InternalRef\"\u003e6\u003c/span\u003e (b), we can say that quintic interpolation edge detection performed the best compared to other algorithms.\u003c/p\u003e\n \u003c/div\u003e\n \u003cdiv id=\"Sec18\" class=\"Section3\"\u003e\n \u003ch2\u003e3.3.2. 4 mm Pin Gauge\u003c/h2\u003e\n \u003cp\u003eConsidering the 4 mm pin gauge, the P-value in the Anova table, shown in Table \u003cspan class=\"InternalRef\"\u003e2\u003c/span\u003e, indicates a significant difference between the algorithms in detecting 4 mm pin gauge edges. From the interval plot shown in Fig. \u003cspan class=\"InternalRef\"\u003e6\u003c/span\u003e (c), quintic interpolation edge detection performed the best compared to other algorithms.\u003c/p\u003e\n \u003c/div\u003e\n \u003cdiv id=\"Sec19\" class=\"Section3\"\u003e\n \u003ch2\u003e3.3.3. 30 mm Pin Gauge\u003c/h2\u003e\n \u003cp\u003eThe 30 mm pin gauges have the highest average standard deviation values in detecting edges compared to other objects considered for the comparison. It may be due to the largest edge radii among other objects considered. From the P-value from the Anova table shown in Table \u003cspan class=\"InternalRef\"\u003e2\u003c/span\u003e, we can say that there is a significant difference between algorithms in detecting 30 mm pin gauge edges. From the interval plot shown in Fig. \u003cspan class=\"InternalRef\"\u003e6\u003c/span\u003e (d), we can say that quintic interpolation and Tahmasbi edge detection performed the best compared to other algorithms.\u003c/p\u003e\n \u003c/div\u003e\n \u003cdiv id=\"Sec20\" class=\"Section3\"\u003e\n \u003ch2\u003e3.3.4. Gauge Block\u003c/h2\u003e\n \u003cp\u003eConsidering gauge block, the P-value from the Anova table shown in Table \u003cspan class=\"InternalRef\"\u003e2\u003c/span\u003e indicates a significant difference between the algorithms in detecting gauge block edges. From the interval plot shown in Fig.\u0026nbsp;\u003cspan class=\"InternalRef\"\u003e6\u003c/span\u003e (e), we can say that quintic interpolation, Tahmasbi and Trujillo-Pino edge detection performed the best.\u003c/p\u003e\n \u003cdiv class=\"gridtable\"\u003e\n \u003ctable id=\"Tab2\" border=\"1\"\u003e\n \u003ccaption language=\"En\"\u003e\n \u003cdiv class=\"CaptionNumber\"\u003eTable 2\u003c/div\u003e\n \u003cdiv class=\"CaptionContent\"\u003e\n \u003cp\u003eANOVA Table showing precision of algorithms in detecting edges for different types of workpieces\u003c/p\u003e\n \u003c/div\u003e\n \u003c/caption\u003e\n \u003cthead\u003e\n \u003ctr\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eCriteria\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eFactors\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eF-Value\u003c/p\u003e\n \u003c/th\u003e\n \u003cth align=\"left\"\u003e\n \u003cp\u003eP-Value\u003c/p\u003e\n \u003c/th\u003e\n \u003c/tr\u003e\n \u003c/thead\u003e\n \u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\" rowspan=\"2\"\u003e\n \u003cp\u003eSynthetic images\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eImage\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e1.35\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e0.232\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eAlgorithm\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e304804.70\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e0\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\" rowspan=\"2\"\u003e\n \u003cp\u003eReal images: Blade\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eImage\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e0.97\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e0.496\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eAlgorithm\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e890.89\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e0\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\" rowspan=\"2\"\u003e\n \u003cp\u003eReal images: 4 mm pin\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eImage\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e4.65\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e0\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eAlgorithm\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e1986.78\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e0\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\" rowspan=\"2\"\u003e\n \u003cp\u003eReal images: 30 mm pin\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eImage\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e1.07\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e0.39\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eAlgorithm\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e277.76\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e0\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\" rowspan=\"2\"\u003e\n \u003cp\u003eReal images: Gauge block\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eImage\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e1.76\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e0.035\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003eAlgorithm\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"char\"\u003e\n \u003cp\u003e1002.02\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd align=\"left\"\u003e\n \u003cp\u003e0\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/tbody\u003e\n \u003c/table\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv id=\"Sec21\" class=\"Section2\"\u003e\n \u003ch2\u003e3.4. Time\u003c/h2\u003e\n \u003cp\u003eThe average time taken for each algorithm in processing 80 images is shown in Fig.\u0026nbsp;7. The computation time taken for quintic and cubic interpolation is more than others. It may be due to its two-stage process of identifying edges at the pixel level, solving each pixel-level edge point for its sub-pixel edge values, and using a third and fifth-order polynomial\u003c/p\u003e\n \u003cp\u003e\u003cbr\u003e\u003c/p\u003e\n\u003c/div\u003e"},{"header":"2. Conclusion","content":"\u003cp\u003eA comprehensive study of various edge detection algorithms under different conditions has been conducted. The influence of image format, multiple objects with varying edge radii, and the time taken by the algorithm to process an image were examined. Based on these results, the following conclusions can be made.\u003c/p\u003e\n\u003cp\u003e1)\u0026nbsp; \u0026nbsp;TIFF images produce better results than JPG in the subpixel edge detection method. For pixel-level edge detection, the image format does not have much influence.\u003c/p\u003e\n\u003cp\u003e2)\u0026nbsp; \u0026nbsp;As the edge radius increases, the precision of edge detection was found to decrease.\u003c/p\u003e\n\u003cp\u003e3)\u0026nbsp; \u0026nbsp;The best algorithm was found to be Quintic interpolation in most conditions in determining edges.\u003c/p\u003e\n\u003cp\u003e4)\u0026nbsp; \u0026nbsp;The time taken for interpolation edge detection is more compared to other algorithms.\u003c/p\u003e\n\u003cp\u003e5)\u0026nbsp; \u0026nbsp;The Canny edge detection and subset algorithms produce better results at high Gaussian noise levels.\u003c/p\u003e\n\u003cp\u003eThe present work has considered only straight-line edges. Further work needs to be done on other types of edges, as also other types of objects\u003c/p\u003e"},{"header":"References","content":"\u003col\u003e\n \u003cli\u003eZiou D, Tabbone S (1998) Edge Detection Techniques-An Overview. Pattern Recognit Image Anal Adv Math Theory Appl 8:537\u0026ndash;559\u003c/li\u003e\n \u003cli\u003eOtsu N (1979) Threshold Selection Method From Gray-Level Histograms. IEEE Trans Syst Man Cybern SMC-9:62\u0026ndash;66. https://doi.org/10.1109/tsmc.1979.4310076\u003c/li\u003e\n \u003cli\u003eCanny J (1986) A Computational Approach to Edge Detection. IEEE Trans Pattern Anal Mach Intell PAMI-8:679\u0026ndash;698. https://doi.org/10.1109/TPAMI.1986.4767851\u003c/li\u003e\n \u003cli\u003eGonzalez RC, Woods RE (2008) Digital image processing. Prentice Hall, Upper Saddle River, N.J.\u003c/li\u003e\n \u003cli\u003eGuo-sheng X (2010) The applicaion of curve fitting technique in fabric defect detection. In: 2010 2nd International Conference on Signal Processing Systems. IEEE, pp V1-272-V1-275\u003c/li\u003e\n \u003cli\u003eSuresh A, Dhanish PB (2025) An Experimental Investigation of Factors Affecting Repeatability in Diameter Measurements Using Machine Vision. J Adv Manuf Syst 24:309\u0026ndash;334. https://doi.org/10.1142/S0219686725500155\u003c/li\u003e\n \u003cli\u003eDi Y, Huang Y, Yang Y, Zhou X-T, Luo W, Ye H, Qiao Z, Lu N, Qiao T (2020) Measuring the Ocular Morphological Parameters of Guinea Pig Eye with Edge Detection and Curve Fitting. Comput Math Methods Med 2020:1\u0026ndash;13. https://doi.org/10.1155/2020/6689023\u003c/li\u003e\n \u003cli\u003eGuo-sheng X (2010) The applicaion of curve fitting technique in fabric defect detection. In: 2010 2nd International Conference on Signal Processing Systems. IEEE, pp V1-272-V1-275\u003c/li\u003e\n \u003cli\u003eTahmasbi A, Saki F, Aghapanah H, Shokouhi SB (2011) A novel breast mass diagnosis system based on Zernike moments as shape and density descriptors. In: 2011 18th Iranian Conference of Biomedical Engineering, ICBME 2011. pp 100\u0026ndash;104\u003c/li\u003e\n \u003cli\u003eTrujillo-Pino A, Krissian K, Alem\u0026aacute;n-Flores M, Santana-Cedr\u0026eacute;s D (2013) Accurate subpixel edge location based on partial area effect. Image Vis Comput 31:72\u0026ndash;90. https://doi.org/10.1016/j.imavis.2012.10.005\u003c/li\u003e\n \u003cli\u003eMatsubara M, Wako T, Matsuoka T, Kawamura S (2022) Position-adjusted subset tracking analysis coupled with a double circle marker. Precis Eng 77:153\u0026ndash;163. https://doi.org/10.1016/j.precisioneng.2022.05.015\u003c/li\u003e\n \u003cli\u003eMaini, Raman, Aggarwal H (2009) Study and Comparison of Various Image Edge Detection Techniques Edges characterize boundaries and are therefore a problem of fundamental importance in. Int J Image Process 3:1\u0026ndash;11\u003c/li\u003e\n \u003cli\u003eWu Z, Lu X, Deng Y (2015) Image edge detection based on local dimension: A complex networks approach. Phys A Stat Mech its Appl 440:9\u0026ndash;18. https://doi.org/10.1016/j.physa.2015.07.020\u003c/li\u003e\n \u003cli\u003eNarendra V G HKS (2011) Study and comparison of various image edge detection techniques used in quality inspection and evaluation of agricultural and food products by computer vision. Int J Agric Biol Eng 4:. https://doi.org/10.3965/j.issn.1934-6344.2011.02.0-0\u003c/li\u003e\n \u003cli\u003e\u0026Ouml;zt\u0026uuml;rk Ş, Akdemir B (2015) Comparison of Edge Detection Algorithms for Texture Analysis on Glass Production. Procedia - Soc Behav Sci 195:2675\u0026ndash;2682. https://doi.org/10.1016/j.sbspro.2015.06.477\u003c/li\u003e\n\u003c/ol\u003e"}],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":true,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":true,"hideJournal":true,"highlight":"","institution":"","isAcceptedByJournal":false,"isAuthorSuppliedPdf":false,"isDeskRejected":"","isHiddenFromSearch":false,"isInQc":false,"isInWorkflow":false,"isPdf":false,"isPdfUpToDate":true,"isWithdrawnOrRetracted":false,"journal":{"display":true,"email":"
[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true},"keywords":"Edge detection, Image processing, Sub-pixel accuracy, Dimensional Metrology","lastPublishedDoi":"10.21203/rs.3.rs-7569036/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-7569036/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"\u003cp\u003eEdge detection is one of the first steps in analysing a digital image. While several algorithms have been proposed in the past, there is limited work that compares their performance for metrological applications. This work compares seven algorithms including two pixel-based - Otsu and Canny\u0026rsquo;s methods, and five sub-pixel-based - cubic interpolation, quintic interpolation, moment based, partial-area based and subset tracking based approaches for determining the straight-line edges. The study considers both synthetic and real images. The real images were of objects of interest in dimensional metrology, from razor blade edges to the longitudinal edges of cylinders of various diameters and the parallel measuring faces of gauge blocks. While the root mean squared deviation was the primary criterion, a comparison of the computational times was also carried out. Results indicate that quintic interpolation gives the best results, though it also requires the most computational time among all the evaluated methods.\u003c/p\u003e","manuscriptTitle":"Comparison Of Algorithms to Detect Straight Line Edges in Images for Metrological Applications","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2025-09-11 11:17:09","doi":"10.21203/rs.3.rs-7569036/v1","editorialEvents":[{"type":"communityComments","content":0}],"status":"published","journal":{"display":true,"email":"
[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true}}],"origin":"","ownerIdentity":"dbca5bdb-29ea-43a8-8897-6db5b33e1fc5","owner":[],"postedDate":"September 11th, 2025","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"posted","subjectAreas":[{"id":54404701,"name":"Mechanical Engineering"},{"id":54404702,"name":"Numerical Analysis"}],"tags":[],"updatedAt":"2025-09-11T11:17:09+00:00","versionOfRecord":[],"versionCreatedAt":"2025-09-11 11:17:09","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-7569036","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-7569036","identity":"rs-7569036","version":["v1"]},"buildId":"8U1c8b4HqxoKbykW_rLl7","isFallback":false,"isExperimentalCompile":false,"dynamicIds":[84888],"gssp":true,"scriptLoader":[]}
Text is read by the "Ask this paper" AI Q&A widget below.
Extraction quality varies by source — PMC NXML preserves structure
cleanly, OA-HTML may include some navigation residue, and OA-PDF can
have broken hyphenation. The publisher copy
(via DOI)
is the canonical version.