An industrial part round hole burr detection method and device based on an image visual algorithm

The method for detecting burrs in circular holes of industrial parts based on image vision algorithms solves the problems of time-consuming manual inspection and low accuracy of automated inspection, achieving high-precision, stable and efficient automated inspection, and is suitable for a variety of industrial parts.

CN120953232BActive Publication Date: 2026-06-02YONGXIN SMART TECH (HANGZHOU) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
YONGXIN SMART TECH (HANGZHOU) CO LTD
Filing Date
2025-08-07
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

In existing technologies, the detection of burrs in round holes of industrial parts relies on manual inspection, which is time-consuming and labor-intensive. Furthermore, automated inspection methods are not very accurate when dealing with reflective areas, have low generalization ability, and cannot be applied to a variety of parts.

Method used

An image vision algorithm-based method for detecting burrs in circular holes of industrial parts is adopted, including image preprocessing, preliminary circular contour fitting, secondary fitting and positioning correction, standard circle positioning and burr detection. The method combines image processing technology and circular detection algorithm with CAD circular hole diameter for accurate detection.

Benefits of technology

It enables precise detection and positioning of circular holes in industrial parts, improves detection accuracy and stability, avoids interference from reflective areas on the surface, and has high versatility and efficiency, making it suitable for automated detection of diverse workpieces.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120953232B_ABST
    Figure CN120953232B_ABST
Patent Text Reader

Abstract

The application discloses an industrial part round hole burr detection method and device based on an image visual algorithm, realizes accurate detection and positioning of a round hole in an industrial part through steps of pre-processing of a to-be-detected image, preliminary round contour fitting, secondary fitting and positioning correction, standard round positioning and burr detection, and the like. The method not only improves the accuracy and stability of round hole detection, but also effectively avoids interference of a reflective area on a workpiece surface, provides reliable geometric data basis for positioning of a round hole of the workpiece, and has obvious practical and visual effect advantages. Meanwhile, the method has strong generalization and can be applied to round hole detection of workpieces with different shapes, has high detection efficiency, can be applied to automatic detection, and significantly improves detection efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial inspection technology, and in particular to a method and apparatus for detecting burrs in circular holes of industrial parts based on image vision algorithms. Background Technology

[0002] Against the backdrop of energy conservation, emission reduction, and carbon emission reduction, low-power smart lighting is becoming increasingly important. However, to ensure low power consumption, high brightness, and long lifespan, all components in lighting products must be free of obvious defects, especially burrs on the round holes of peripheral parts of lighting fixtures, which are unacceptable. Traditional inspection of round holes and burrs mainly relies on manual inspection, which can be further divided into human eye inspection and tool inspection. This has the following limitations: First, manual inspection is time-consuming and labor-intensive, and is easily affected by worker fatigue, making it difficult to guarantee consistent accuracy over a long period. If tools such as vernier calipers and optical microscopes are used for inspection, there is a high technical threshold, making it difficult to popularize and automate, and the inspection efficiency remains low.

[0003] Current advanced methods for detecting burrs in circular holes of industrial parts mainly employ algorithms such as global threshold segmentation and circle fitting. While these methods are simple and easy to implement, enabling automated detection, they struggle to accurately fit circular holes when processing images with reflective surfaces, potentially resulting in some burrs going undetected. Furthermore, these relatively simple methods suffer from low generalization, offering high accuracy only for certain specific parts and failing to be applicable to the diverse range of industrial components. Summary of the Invention

[0004] The purpose of this invention is to provide a method and apparatus for detecting burrs in circular holes of industrial parts based on image vision algorithms, so as to overcome the shortcomings of the prior art.

[0005] To achieve the above objectives, the present invention provides the following technical solution:

[0006] This application discloses a method for detecting burrs in circular holes of industrial parts based on image vision algorithms, specifically including the following steps:

[0007] S1. Preprocessing of the image to be tested: The image to be tested is preprocessed using image processing technology.

[0008] S2. Preliminary circular contour fitting: The circular contour of the industrial part in the image after preprocessing in step S1 is initially detected by the circular detection algorithm, and an approximate circle is fitted by the contour fitting algorithm to preliminarily determine the position of the circular hole in the image.

[0009] S3. Secondary fitting and positioning correction: Using the approximate circle outline initially fitted in step S2, based on the circle center point traversal principle and combined with the CAD hole diameter of the workpiece being inspected, secondary fitting and hole outline positioning correction are performed to determine the true circle center of the workpiece.

[0010] S4. Standard circle positioning: Using the actual circle center determined in step S3, with the CAD hole diameter as the initial value, gradually decrease the diameter according to the step size and perform standard circle positioning.

[0011] S5. Burr detection: Based on the standard circle located in step S4, burrs outside the allowable error range are detected.

[0012] Preferably, step S1 specifically includes the following sub-steps:

[0013] S11. Use the binary binarization function in OpenCV and calculate the dynamic threshold of the pixel values ​​of all pixels in the image as the binarization threshold to perform binary segmentation of the image, realize preliminary contour extraction, and obtain a binary image.

[0014] S12. Create a 9*9 two-dimensional array with all elements equal to 1, and use this two-dimensional array as a convolution kernel for image filtering.

[0015] S13. For the binarized image after step S11, use the two-dimensional array in step S12 to perform an opening operation to eliminate small objects or noise in the image, separate contacting objects, and smooth the boundaries of each contour of the image.

[0016] S14. Perform a closing operation on the binarized image after step S13 to fill in small holes inside the image, connect adjacent but disconnected contours, smooth contour boundaries, and complete the preprocessing of the image to be tested.

[0017] Preferably, step S2 specifically includes the following sub-steps:

[0018] S21. Perform Hough Circles detection on the image after preprocessing in step S1 to obtain the circular outline of the workpiece's circular hole and determine the position and size of the initial circular outline 1.

[0019] S22. Perform minimum circumcircle fitting on the image after preprocessing in step S1 to obtain the perfect circular outline of the workpiece's circular hole, and determine the position and size of the initial circular outline 2.

[0020] S23. The initial circular contour 1 and initial circular contour 2 obtained in steps S21 and S22 are compared with the image after preprocessing in step S1 to calculate the degree of overlap. The contour with the higher degree of overlap is taken as the initial circular contour.

[0021] Preferably, step S3 specifically includes the following sub-steps:

[0022] S31. Using the initial center of the approximate circle determined in step S2 as the reference point, take 10 pixels in each of the four directions of up, down, left and right of the reference point to form a secondary correction range of the center of the circle with a size of 21×21 pixels.

[0023] S32. Read the CAD file of the workpiece to be inspected and obtain the diameter of the circular hole to be inspected;

[0024] S33. Read the image information about the object-side field of view of a single pixel in the imaging device, and convert the diameter of the circular hole in the CAD file into the number of pixels in the image;

[0025] S34. Using the diameter of the CAD circular hole obtained in step S33 as the diameter of the circle, and the pixel points within the secondary correction range of the circle center in S31 as the circle center, fit the secondary correction circle, and calculate the overlap between the circle corresponding to the center of all circles within the correction range and the circle contour in the final result output in step S1 in turn, so as to select the secondary correction circle with the highest overlap. The pixel point corresponding to this circle is the circle center after positioning and correction.

[0026] Preferably, step S4 specifically includes the following sub-steps:

[0027] S41. Read the image information about the object-side field of view of a single pixel in the imaging device, and convert the diameter of the circular hole in the CAD file into the number of pixels in the image;

[0028] S42. Using the pixel point determined in step S3 as the center point, and the number of pixels converted in step S41 as the initial value, the diameter length is reduced by a step size of one pixel point to perform circle fitting. The overlap with the binarized image is calculated, and the circle with the highest overlap is selected. This circle is the final standard circle for hole detection.

[0029] Preferably, step S5 specifically includes the following sub-steps:

[0030] S51. Burr detection range constraint: The diameter of the standard circle located in step S4 is reduced inward by an allowable error range, and the new circle obtained is the constraint range for burr detection.

[0031] S52. Burr detection: Using the burr detection constraint range obtained in step S51 as the reference circle, search for all pixels whose pixel values ​​are close to the color of the workpiece's circular hole thread within the range of the reference circle towards the center. The set of these pixels is the burr part that exceeds the allowable error range and needs to be detected.

[0032] S53. Burr Location and Detection Alarm: First, after obtaining the set of detected burr pixels in step S52, the coordinate information of this set in the image is the burr location information; then, the information about the burr size in the set of burr pixels is converted into the real size through the single-pixel object-side field of view size information, that is, the size of the detected burr in real space is obtained; finally, the burr location and size information are transmitted to the lower-level machine to realize burr detection alarm.

[0033] The present invention also provides an industrial part circular hole burr detection device based on image vision algorithm, including a memory and one or more processors. The memory stores executable code, and when the one or more processors execute the executable code, it is used for the above-mentioned industrial part circular hole burr detection method based on image vision algorithm.

[0034] The present invention also provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the above-described method for detecting burrs in circular holes of industrial parts based on image vision algorithms.

[0035] The beneficial effects of this invention are:

[0036] This invention proposes a method and apparatus for detecting burrs in circular holes of industrial parts based on image vision algorithms. Through steps such as image preprocessing, preliminary circular contour fitting, secondary fitting and positioning correction, standard circle positioning, and burr detection, the method achieves accurate detection and positioning of circular holes in industrial parts. This method not only improves the accuracy and stability of circular hole detection but also effectively avoids interference from reflective areas on the workpiece surface, providing a reliable geometric data basis for the positioning of circular holes and possessing significant practical and visual advantages. Furthermore, this method has strong generalization capabilities and can be applied to the detection of circular holes in workpieces of various shapes. It also boasts high detection efficiency, making it suitable for automated inspection and significantly improving overall inspection efficiency.

[0037] The features and advantages of the present invention will be described in detail through embodiments and in conjunction with the accompanying drawings. Attached Figure Description

[0038] Figure 1 This is a flowchart illustrating a method for detecting burrs in circular holes of industrial parts based on image vision algorithms, according to the present invention.

[0039] Figure 2 This is an image of the workpiece to be tested in an embodiment of the present invention;

[0040] Figure 3 This is the image of the workpiece under test after preprocessing in this embodiment of the invention;

[0041] Figure 4 This is the result of preliminary circular contour fitting in the embodiments of the present invention;

[0042] Figure 5 This is the result of secondary fitting and positioning correction in the embodiments of the present invention;

[0043] Figure 6 This is the result of standard circle positioning in the embodiments of the present invention;

[0044] Figure 7 This is a schematic diagram illustrating the burr detection effect in an embodiment of the present invention;

[0045] Figure 8 This is a schematic diagram of the structure of an industrial part circular hole burr detection device based on image vision algorithm according to the present invention. Detailed Implementation

[0046] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. However, it should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of the invention. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concept of the invention.

[0047] See Figure 1 This invention provides a method for detecting burrs in circular holes of industrial parts based on image vision algorithms, comprising five steps: 1) Preprocessing of the image to be tested: using image processing technology, the image to be tested is preprocessed to suit subsequent processing; 2) Preliminary circular contour fitting: using circle detection and contour fitting algorithms, preliminary detection of the circular hole contour in the image to be tested is performed; 3) Secondary fitting and positioning correction: based on the principle of traversing the circle center point, combined with the CAD circular hole diameter of the workpiece being tested, secondary fitting and circular hole contour positioning correction are performed; 4) Standard circle positioning: using the CAD circular hole diameter as the initial value, the diameter is gradually reduced by step size and standard circle positioning is performed; 5) Burr detection: based on the positioned standard circle, burrs outside the allowable error range are detected and alerted.

[0048] Specifically, step 1. Preprocessing of the image to be tested

[0049] Image preprocessing involves performing dynamic threshold calculation on the image of the workpiece to be tested. Specifically, the image is first converted to grayscale, and then the average grayscale value of all points in the image is calculated. Let the average value be... mean for The image resolution is M×N, and the nth... i line, number j The grayscale value of the column I ( i, j Then the average grayscale value is calculated according to the formula. The calculation is as follows: Next, the standard deviation (std) of all gray values ​​is calculated. Finally, calculate the dynamic threshold: threshold=mean+k × std ,in k This is a constant, typically between 0.5 and 1; in this embodiment, it is set to 0.5. The final binarization threshold is 235. Figure 2 The image of the workpiece shown has been processed into Figure 3 Median-divided image.

[0050] After binarization based on the calculated threshold, morphological dilation and erosion methods are used to repair burrs and holes in the binarized image. In this embodiment, a 9x9 two-dimensional array with all elements equal to 1 is created using the Python function `np.ones((9,9),np.uint8)` as a filter to filter the binarized image obtained in the previous step. First, an opening operation is performed to eliminate small objects or noise in the image, separate contacting objects, and smooth the boundaries of various contours in the image, resulting in... Figure 3 The diagram illustrates the opening operation. Next, the closing operation is performed to fill small holes inside the image, connect adjacent but broken contours, and smooth the contour boundaries, resulting in... Figure 3 The image shown is obtained after the closing operation. This completes the preprocessing of the image under test, providing a foundation for subsequent image processing.

[0051] Step 2. Preliminary circular contour fitting

[0052] This invention uses Hough Circles detection and minimum circumcircle fitting to fit the circular contour of the image preprocessing result in step 1, and calculates the overlap between the circular contour fitted by the two methods and the preprocessed image. The center of the circle with the higher overlap is selected as the initial positioning center.

[0053] Specifically, in this embodiment, the Hough Transform circle detection uses the `cv2.HoughTransformCircles` function in OpenCV, with specific parameters...

[0054] With dp=1, minDist=200, param1=70, param2=15, minRadius=1000, and maxRadius=1500, the center coordinates of the Hough Transform circles are ultimately preserved. The detection results of this step are as follows: Figure 4The Hough Circles detection using the Hough transform is shown below. In the minimum circumcircle fitting, a minimum region threshold of min_area = 5000 is set. The cv2.findContours function in OpenCV is used to find contours, and the spatial information of the found contours is saved as a contours array. The data representing the spatial information of each contour in the array is compared with the minimum region threshold, and contours greater than the minimum region threshold are filtered out. Finally, the (x,y),radius=cv2.minEnclosingCircle(contour) function is used to fit the minimum circumcircle, and the coordinate information of the center of the fitted circle is saved. The detection result of this step is shown below. Figure 4 The smallest circumcircle fit is shown in the figure.

[0055] The overlap degree between the two fitted circles and the real circular hole is calculated. In this embodiment, the specific operations are as follows: First, the range of the binary image `binary_image` is limited, and only the circular regions are saved as an array. A circular mask for this array is created. Then, the contour spatial information of the Hough transform circle `HoughCircles` and the minimum circumcircle are respectively ANDed with the `binary_image` circular mask array to obtain the overlapping region. A bitwise OR operation is then performed to obtain the area of ​​the joint region. Finally, the ratio of the overlapping region to the joint region is calculated, which is the overlap degree. The center of the circle with the high overlap degree is selected as the initial center coordinates.

[0056] Step 3. Secondary fitting and localization correction

[0057] This invention, based on the principle of traversing the center point of a circle and combined with the CAD diameter of the detected workpiece's circular hole, performs secondary fitting and circular hole contour positioning correction. This step can effectively solve the interference from reflective parts and adjust the positioning of the initially fitted circular contour to determine the true center of the workpiece. The specific operation in this embodiment is as follows:

[0058] a. Using the initial center of the circle determined in step 2 as the reference point, take 10 pixels in each of the four directions of up, down, left and right of the reference point to construct a pixel coordinate array of size 21×21;

[0059] b. Read the CAD file of the workpiece to be tested and obtain the diameter of the circular hole to be tested. In this embodiment, the diameter of the circular hole of the workpiece is 9.974mm. Divide it by the single-pixel object-side field of view of the imaging device, which is 4.8μm / pix in this embodiment. The diameter of the circular hole in the CAD file is calculated to be 2078 pixels.

[0060] c. Using the diameter of the circular hole in the CAD file as the diameter of the circle and the pixel coordinates in the pixel coordinate array as the center, fit a secondary correction circle. Each pixel coordinate corresponds to a secondary correction circle. Repeat the logic of calculating the overlap in step two, and calculate the overlap between all secondary correction circles and the circle contour in the binarized image in turn. Select the secondary correction circle with the highest overlap and determine the pixel coordinates corresponding to this circle as the center of the circle after positioning and correction, which is the true center of the workpiece in this embodiment. The results of secondary fitting and positioning correction are as follows: Figure 5 As shown. This step performs secondary positioning and correction within a small range based on the initial fitted circle center, which well takes into account the influence of reflective parts in the image and avoids the positioning error relative to the true circle center when only the initial circle fitting positioning is performed when reflective parts are present.

[0061] Step 4. Standard circle positioning

[0062] This invention, based on the circular profile determined after secondary correction, simulates the process of drill bit wear leading to a reduction in the diameter of a circular hole during industrial parts production, in order to obtain a standard circle that best matches the actual workpiece's circular profile diameter. The specific operation in this embodiment is as follows:

[0063] a. Read the number of pixels represented by the diameter of the circular hole in the CAD file, which is 2078 pixels in this embodiment;

[0064] S4.2. Using the center of the secondary correction circle determined in step 3 as the center point, and with 2078 pixels as the initial value, the diameter length is gradually reduced by one pixel as the step size for circle fitting. The logic of calculating the overlap with the binarized image is repeated. The circle with the highest overlap in the calculation results of this step is selected. This circle is the final standard circle for hole detection. The determined circle diameter at this time, combined with the determined circle center, is the standard circle outline corresponding to the circle in the workpiece. In this embodiment, the diameter of the standard circle is represented by 2074 pixels. The standard circle positioning result is as follows: Figure 6 As shown.

[0065] Step 5. Burr detection

[0066] After completing the detection and positioning of the standard circle, this invention also needs to convert the standard circle into a true burr detection range based on the allowable error range of burr detection, and provides a series of operations after burr detection. In this embodiment, the specific operations are as follows:

[0067] a. Burr Detection Range Constraint: The standard circle diameter (2074 pixels) output in step S4 is reduced inward by an allowable error range. The resulting new circle is the constraint range for burr detection. The information of the single-pixel object-side field of view of the imaging device is read, and based on the allowable burr detection error range, it is converted into the number of pixels represented by that range in the image. In this embodiment, the single-pixel object-side field of view is 4.8 μm / pixel, and the allowable burr detection error range is 80 μm. This translates to a pixel distance of 17 pixels in the image. This means reducing both ends of the standard circle diameter by an allowable error range, decreasing the diameter from 2074 pixels to 2030 pixels. Finally, a circle is drawn based on the center of the standard circle to obtain the burr detection constraint range.

[0068] S5.2 Burr Detection: Using the burr detection constraint range as a reference circle, all pixels within the range towards the center of this reference circle whose pixel values ​​are close to the color of the workpiece's circular hole thread are retrieved. The set of these pixels represents the burrs that exceed the allowable error range and need to be detected. In this embodiment, the binary image `binary_image` is used as the workpiece's contour image. Pixels with a pixel value of 0 (black) within the range towards the center of the burr detection reference circle in this image are all burrs that exceed the allowable error range and need to be detected. The burr detection effect is as follows: Figure 7 As shown;

[0069] S5.3, Burr Location and Detection Alarm: In this embodiment, firstly, a set of detected burr pixels is obtained, and the coordinate information of this set in the image is the burr location information; then, for each burr pixel on the contour boundary in the set, the direction towards the center of the standard circle is calculated, resulting in a set of radial vectors containing the circle in a 360° direction. In each direction, the pixel distance between the burr pixel closest to the center and the outermost burr pixel is calculated, and the single-pixel object-side field of view size information (4.8μm / pix) is used to convert it into the real size, that is, to obtain the size of the detected burr in real space. For example, in a certain radial direction, the pixel distance between the burr pixel closest to the center and the outermost burr pixel is 8.15pix. After conversion, the size of the burr exceeding the allowable burr error range in real space is 39.12μm; finally, the burr location and size information are transmitted to the lower-level machine.

[0070] An embodiment of the industrial part circular hole burr detection device based on image vision algorithm of the present invention can be applied to any device with data processing capabilities, such as a computer. The device embodiment can be implemented by software, hardware, or a combination of both. Taking software implementation as an example, as a logical device, it is formed by the processor of any data processing device loading the corresponding computer program instructions from non-volatile memory into memory for execution. From a hardware perspective, such as... Figure 8 The diagram shown is a hardware structure diagram of any device with data processing capabilities, including the industrial parts burr detection device based on image vision algorithms according to the present invention. (Except for...) Figure 8 In addition to the processor, memory, and non-volatile memory shown, any data processing device in the embodiment may also include other hardware depending on the actual function of the data processing device, which will not be described in detail here.

[0071] This invention also provides a computer-readable storage medium storing a program thereon, which, when executed by a processor, implements an industrial part circular hole burr detection device based on an image vision algorithm as described in the above embodiments.

[0072] The computer-readable storage medium can be an internal storage unit of any data processing device described in any of the foregoing embodiments, such as a hard disk or memory. The computer-readable storage medium can also be an external storage device of any data processing device, such as a plug-in hard disk, SmartMediaCard (SMC), SD card, or FlashCard equipped on the device. Furthermore, the computer-readable storage medium can include both internal storage units and external storage devices of any data processing device. The computer-readable storage medium is used to store the computer program and other programs and data required by the data processing device, and can also be used to temporarily store data that has been output or will be output.

[0073] This invention discloses a method and apparatus for detecting burrs in circular holes of industrial parts based on image vision algorithms. The apparatus boasts extremely high detection accuracy, achieving pixel-level segmentation and micrometer-level measurement with high precision. Furthermore, it exhibits high robustness, accurately fitting the circular hole contour to images with reflective surface areas, thus precisely detecting any burrs present. Moreover, due to its multi-step machine vision circular contour fitting and positioning calculations, the apparatus demonstrates excellent generalization ability, allowing it to be applied to a wide variety of complex industrial parts while maintaining high detection accuracy. Applying this apparatus also automates workpiece inspection, solving problems such as time-consuming and labor-intensive manual inspection, eye fatigue, and high technical barriers, thereby improving inspection efficiency.

[0074] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions or improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for detecting burrs in circular holes of industrial parts based on image vision algorithms, characterized in that, Specifically, the steps include the following: S1. Preprocessing of the image to be tested: The image to be tested is preprocessed using image processing technology. S2. Preliminary circular contour fitting: The circular contour of the industrial part in the image after preprocessing in step S1 is initially detected by the circular detection algorithm, and an approximate circle is fitted by the contour fitting algorithm to preliminarily determine the position of the circular hole in the image. S3. Secondary fitting and positioning correction: Using the approximate circle outline initially fitted in step S2, based on the circle center point traversal principle and combined with the CAD hole diameter of the workpiece being inspected, secondary fitting and hole outline positioning correction are performed to determine the true circle center of the workpiece. S4. Standard circle positioning: Using the actual circle center determined in step S3, with the CAD hole diameter as the initial value, gradually decrease the diameter according to the step size and perform standard circle positioning. S5. Burr detection: Based on the standard circle located in step S4, detect burrs that are outside the allowable error range. Step S3 specifically includes the following sub-steps: S31. Using the initial center of the approximate circle determined in step S2 as the reference point, take 10 pixels in each of the four directions of up, down, left and right of the reference point to form a secondary correction range of the center of the circle with a size of 21×21 pixels. S32. Read the CAD file of the workpiece to be inspected and obtain the diameter of the circular hole to be inspected; S33. Read the image information about the object-side field of view of a single pixel in the imaging device, and convert the diameter of the circular hole in the CAD file into the number of pixels in the image; S34. Using the diameter of the CAD circular hole obtained in step S33 as the diameter of the circle, and the pixel points within the secondary correction range of the circle center in S31 as the circle center, fit the secondary correction circle, and calculate the overlap between the circle corresponding to the center of all circles within the correction range and the circle contour in the binarized image output in step S1 in turn, so as to select the secondary correction circle with the highest overlap. The pixel point corresponding to this circle is the circle center after positioning and correction.

2. The method for detecting burrs in circular holes of industrial parts based on image vision algorithms as described in claim 1, characterized in that, Step S1 specifically includes the following sub-steps: S11. Use the binary binarization function in OpenCV and calculate the dynamic threshold of the pixel values ​​of all pixels in the image as the binarization threshold to perform binary segmentation of the image, realize preliminary contour extraction, and obtain a binary image. S12. Create a 9-element system where all elements have a value of 1. A 9-dimensional array is used as a convolution kernel for image filtering. S13. For the binarized image after step S11, use the two-dimensional array in step S12 to perform an opening operation to eliminate small objects or noise in the image, separate contacting objects, and smooth the boundaries of each contour of the image. S14. Perform a closing operation on the binarized image after step S13 to fill in small holes inside the image, connect adjacent but disconnected contours, smooth contour boundaries, and complete the preprocessing of the image to be tested.

3. The method for detecting burrs in circular holes of industrial parts based on image vision algorithms as described in claim 1, characterized in that, Step S2 specifically includes the following sub-steps: S21. Perform Hough transform circle detection on the image after preprocessing in step S1 to obtain the perfect circle contour of the workpiece hole and determine the position and size of the initial circle contour 1. S22. Perform minimum circumcircle fitting on the image after preprocessing in step S1 to obtain the perfect circular outline of the workpiece's circular hole, and determine the position and size of the initial circular outline 2. S23. The initial circular contour 1 and initial circular contour 2 obtained in steps S21 and S22 are compared with the image after preprocessing in step S1 to calculate the degree of overlap. The contour with the higher degree of overlap is taken as the initial circular contour.

4. The method for detecting burrs in circular holes of industrial parts based on image vision algorithms as described in claim 1, characterized in that, Step S4 specifically includes the following sub-steps: S41. Read the image information about the object-side field of view of a single pixel in the imaging device, and convert the diameter of the circular hole in the CAD file into the number of pixels in the image; S42. Using the pixel point determined in step S3 as the center point, and the number of pixels converted in step S41 as the initial value, the diameter length is reduced by a step size of one pixel point to perform circle fitting. The overlap with the binarized image is calculated, and the circle with the highest overlap is selected. This circle is the final standard circle for hole detection.

5. The method for detecting burrs in circular holes of industrial parts based on image vision algorithms as described in claim 1, characterized in that, Step S5 specifically includes the following sub-steps: S51. Burr detection range constraint: The diameter of the standard circle located in step S4 is reduced inward by an allowable error range, and the new circle obtained is the constraint range for burr detection. S52. Burr detection: Using the burr detection constraint range obtained in step S51 as the reference circle, search for all pixels whose pixel values ​​are close to the color of the workpiece's circular hole thread within the range of the reference circle towards the center. The set of these pixels is the burr part that exceeds the allowable error range and needs to be detected. S53. Burr Location and Detection Alarm: First, after obtaining the set of detected burr pixels in step S52, the coordinate information of this set in the image is the burr location information; then, the information about the burr size in the set of burr pixels is converted into the real size through the single-pixel object-side field of view size information, that is, the size of the detected burr in real space is obtained; finally, the burr location and size information are transmitted to the lower-level machine to realize burr detection alarm.

6. A device for detecting burrs in circular holes of industrial parts based on image vision algorithms, characterized in that, The device includes a memory and one or more processors, wherein the memory stores executable code, and the one or more processors execute the executable code to implement the method for detecting burrs in circular holes of industrial parts based on image vision algorithms as described in any one of claims 1 to 5.

7. A computer-readable storage medium, characterized in that: It stores a program that, when executed by a processor, implements the method for detecting burrs in circular holes of industrial parts based on image vision algorithms, as described in any one of claims 1-6.