A method for detecting burrs on component surfaces based on machine vision

Automatically identifying the surface burrs of parts through machine vision technology, solving the problems of low manual detection efficiency and slow equipment detection speed in the prior art, and achieving fast and accurate burr detection.

CN114757927BActive Publication Date: 2025-09-02SANGU XIAMEN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210429033.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-22
Publication Date
2025-09-02
Estimated Expiration
2042-04-22

AI Technical Summary

Technical Problem

In the prior art, the surface burr detection of parts depends on manual detection efficiency, slow speed, and easy to miss detection, and slow equipment detection speed is difficult to meet the needs of modern production.

Method used

Using a machine vision-based method, glitch information is automatically identified by obtaining images to be detected and templates, image processing is performed, internal distances of contour points and abnormal points identification are calculated.

Benefits of technology

It realizes fast and accurate automated burr detection, reduces labor costs, improves detection efficiency and reliability, and reduces missed detection rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114757927B_ABST
    Figure CN114757927B_ABST
Patent Text Reader

Abstract

The present invention relates to a component surface burr detection method based on machine vision, comprising the following steps: S1) acquiring an image to be detected and a template image; S2) performing image processing on the image to be detected and the template image respectively to obtain a contour to be detected and a template contour; S3) drawing a connected domain between the contour to be detected and the template contour, and obtaining the shortest straight-line distance from each contour point of the contour to be detected to the template contour and its corresponding shortest distance point; S4) judging whether the connection line between each contour point and the corresponding shortest distance point completely falls within the connected domain; S5) calculating the minimum distance between each contour point and the corresponding shortest distance point along a certain path inside the connected domain as the internal distance of each contour point; S6) comparing the internal distance of each contour point, identifying whether each contour point is an abnormal point, and analyzing all abnormal points to obtain burr information on the component surface to be detected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of burr detection, and in particular relates to a method for detecting burrs on the surface of a component based on machine vision. Background Art

[0002] Burrs are irregularities or uneven areas on the edges, surfaces, or smooth surfaces of components that may occur for some reason. The presence of burrs not only affects quality but can also cause malfunctions, reducing reliability and stability. Burrs can even cause premature wear on sliding surfaces and increased noise, leading to potential safety hazards such as machine jams and malfunctions.

[0003] Currently, there are two main methods for detecting burrs on component surfaces: manual inspection and machine inspection. Most existing technologies rely on manual methods, such as the wire-hanging method, magnification, touch, and visual inspection. These methods rely heavily on the experience of the inspector, resulting in a heavy workload and fatigue over long periods of time. Manual inspection is far slower than machine inspection, resulting in low efficiency and frequent missed and incorrect detections. A minority of methods utilize specialized equipment, primarily sensors and optical microscopes. For example, optical coordinate measuring machines (OCMs) are used to measure burr shape, height, length, and other related parameters. However, these methods are slow and time-consuming, making them difficult to meet the demands of modern production.

[0004] Therefore, there is an urgent need to develop a method for detecting burrs on component surfaces based on machine vision that is fast, accurate, and highly automated. Summary of the Invention

[0005] The purpose of the present invention is to address the deficiencies in the prior art and provide a component surface burr detection method based on machine vision that has a reasonable design, fast and accurate detection, and a high degree of automation.

[0006] In order to achieve the above object, the present invention adopts the following technical solutions:

[0007] The present invention provides a method for detecting burrs on component surfaces based on machine vision, which comprises the following steps:

[0008] S1) obtaining an image to be detected and a template image;

[0009] The image to be detected is a color image obtained by collecting the surface of the component to be detected;

[0010] The template image is a color image obtained by collecting the surface of the standard part corresponding to the part to be tested;

[0011] S2) performing image processing on the image to be detected and the template image according to a preset image processing method to obtain the contour to be detected and the template contour;

[0012] S3) drawing a connected domain between the contour to be detected and the template contour, and obtaining the shortest straight-line distance from each contour point of the contour to be detected to the template contour and its corresponding shortest distance point;

[0013] S4) determining whether the line connecting each contour point to the corresponding shortest distance point completely falls within the connected domain; if so, marking the contour point as a directly connected point; otherwise, marking the contour point as a non-directly connected point;

[0014] S5) calculating the minimum distance between each contour point and the corresponding shortest distance point along a path inside the connected domain according to a preset internal distance calculation method, as the internal distance of each contour point;

[0015] S6) comparing the internal distance of each contour point according to a preset abnormal point identification method to identify whether each contour point is an abnormal point, and analyzing all abnormal points according to a preset burr analysis method to obtain burr information on the surface of the component to be inspected.

[0016] Preferably, the image processing method preset in step S2) includes the following steps:

[0017] S2.1) converting the color image into a grayscale image and performing Gaussian filtering to obtain a filtered image;

[0018] S2.2) performing adaptive threshold binarization on the filtered image using the OTSU method to obtain a binarized image;

[0019] S2.3) Fill holes in the binary image.

[0020] Preferably, the internal distance calculation method is preset in step S5), comprising the following steps:

[0021] S5.1) taking a straight point of the contour to be detected as a starting point;

[0022] S5.2) Starting from the starting point, calculate the inner distances of all contour points in a clockwise direction according to the calculation rules.

[0023] Preferably, the internal distance calculation method preset in step S5) further includes the following steps:

[0024] S5.3) Starting from the starting point, calculate the internal distances of all contour points in sequence in a counterclockwise direction according to the calculation rules;

[0025] S5.4) Compare the internal distances obtained in step S5.2) and step S5.3) for each contour point, and take the smaller value of the two as the final value of the internal distance of the contour point.

[0026] Preferably, the calculation rule in step S5.2) or step S5.3) is: if a contour point marked as a directly connected point is encountered, the internal distance of the contour point is equal to the shortest straight-line distance between the directly connected point and the contour point corresponding to the directly connected point; if a contour point marked as a non-directly connected point is encountered, the internal distance of the contour point is equal to the sum of the contour distance between the non-directly connected point and the previous adjacent contour point and the internal distance of the previous adjacent contour point.

[0027] Preferably, the preset outlier identification method in step S6) is:

[0028] The inner distance of each contour point is compared with a preset height threshold. If the inner distance of the contour point is greater than the preset height threshold, the contour point is identified as an abnormal point, otherwise the contour point is identified as a normal point.

[0029] Preferably, the burr information on the surface of the component to be inspected in step S6) includes but is not limited to the number of burrs.

[0030] Preferably, the burr analysis method is preset in step S6), comprising the following steps:

[0031] S6.1) Starting from the starting point, traverse all outliers in order and merge them. Merge several consecutive outliers as a valid outlier. If the starting point and the last contour point are both outliers, merge the starting point and the last contour point as a valid outlier, obtaining several valid outliers. The width of each valid outlier is equal to the number of outliers contained in the valid outlier.

[0032] S6.2) Traverse all valid outlier points to perform burr identification and burr number counting, compare and analyze the width of each valid outlier point with a preset width threshold, if the width of the valid outlier point is greater than the preset width threshold, then the valid outlier point is identified as a burr, and the number of burrs is counted.

[0033] The present invention adopts the above technical solution, and through image processing of the parts to be inspected, realizes that the machine replaces manual automatic detection of burrs on the surface of the parts to obtain the required burr information, which helps to save labor costs. In addition, the burr recognition rate is high, which reduces human influence and helps to improve detection efficiency and reliability. It has the advantages of wide application range, fast detection speed, high accuracy, low fault tolerance, and long-term operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. The following description is given with respect to the drawings:

[0035] Figure 1 This is a flowchart of a method for detecting burrs on component surfaces based on machine vision according to the present invention;

[0036] Figure 2 Schematic diagram of the outline of a component to be inspected in an embodiment of the present invention;

[0037] Figure 3 Schematic diagram of the connected domain between the contour to be detected and the template contour in an embodiment of the present invention;

[0038] Figure 4 Schematic diagram of directly connected points and indirect connected points in an embodiment of the present invention;

[0039] Figure 5 Schematic diagram of the internal distance of contour points in an embodiment of the present invention. DETAILED DESCRIPTION

[0040] The embodiments described below are only some of the embodiments of the present invention and do not represent all embodiments consistent with the present invention. Now, with reference to the accompanying drawings, the exemplary embodiments are described as follows:

[0041] like Figure 1-5 As shown in FIG1 , the present invention provides a method for detecting burrs on the surface of a component based on machine vision, which comprises the following steps:

[0042] S1) obtaining an image to be detected and a template image;

[0043] The image to be inspected is a color image obtained by collecting the surface of the component to be inspected;

[0044] The template image is a color image obtained by collecting the surface of the standard part corresponding to the part to be tested;

[0045] S2) performing image processing on the image to be detected and the template image according to a preset image processing method to obtain the contour to be detected and the template contour;

[0046] S3) drawing a connected domain between the contour to be detected and the template contour, and obtaining the shortest straight-line distance from each contour point of the contour to be detected to the template contour and its corresponding shortest distance point;

[0047] S4) determining whether the line connecting each contour point to the corresponding shortest distance point completely falls within the connected domain; if so, marking the contour point as a directly connected point; otherwise, marking the contour point as a non-directly connected point;

[0048] S5) calculating the minimum distance between each contour point and the corresponding shortest distance point along a path inside the connected domain according to a preset internal distance calculation method, as the internal distance of each contour point;

[0049] S6) comparing the internal distance of each contour point according to a preset abnormal point identification method to identify whether each contour point is an abnormal point, and analyzing all abnormal points according to a preset burr analysis method to obtain burr information on the surface of the component to be inspected.

[0050] As a preferred embodiment, based on the above, the image processing method is preset in step S2), including the following steps:

[0051] S2.1) converting the color image into a grayscale image and performing Gaussian filtering to obtain a filtered image;

[0052] S2.2) performing adaptive threshold binarization on the filtered image using the OTSU method to obtain a binarized image;

[0053] S2.3) Fill holes in the binary image.

[0054] As a preferred embodiment, based on the above, the internal distance calculation method is preset in step S5), including the following steps:

[0055] S5.1) taking a straight point of the contour to be detected as a starting point;

[0056] S5.2) Starting from the starting point, calculate the inner distances of all contour points in a clockwise direction according to the calculation rules.

[0057] As a preferred embodiment, based on the above, further, the internal distance calculation method is preset in step S5), further comprising the following steps:

[0058] S5.3) Starting from the starting point, calculate the internal distances of all contour points in sequence in a counterclockwise direction according to the calculation rules;

[0059] S5.4) Compare the internal distances obtained for each contour point according to step S5.2) and step S5.3), and take the smaller value of the two as the final value of the internal distance of the contour point.

[0060] As a preferred embodiment, based on the above, the calculation rule in step S5.2) or step S5.3) is: if a contour point marked as a directly connected point is encountered, the internal distance of the contour point is equal to the shortest straight-line distance between the directly connected point and the contour point corresponding to the directly connected point; if a contour point marked as a non-directly connected point is encountered, the internal distance of the contour point is equal to the sum of the contour distance between the non-directly connected point and the previous adjacent contour point and the internal distance of the previous adjacent contour point.

[0061] As a preferred embodiment, based on the above, the preset outlier identification method in step S6) is:

[0062] The inner distance of each contour point is compared with a preset height threshold. If the inner distance of the contour point is greater than the preset height threshold, the contour point is identified as an abnormal point, otherwise the contour point is identified as a normal point.

[0063] As a preferred embodiment, based on the above, the burr information on the surface of the component to be inspected in step S6) includes but is not limited to the number of burrs.

[0064] As a preferred embodiment, based on the above, the burr analysis method is preset in step S6), including the following steps:

[0065] S6.1) Starting from the starting point, traverse all outliers in order and merge them. Merge several consecutive outliers as a valid outlier. If the starting point and the last contour point are both outliers, merge the starting point and the last contour point as a valid outlier, obtaining several valid outliers. The width of each valid outlier is equal to the number of outliers contained in the valid outlier.

[0066] S6.2) Traverse all valid outlier points to perform burr identification and burr number counting, compare and analyze the width of each valid outlier point with a preset width threshold, if the width of the valid outlier point is greater than the preset width threshold, then the valid outlier point is identified as a burr, and the number of burrs is counted.

[0067] Example

[0068] like Figure 1 As shown, the present invention provides a method for detecting burrs on the surface of a component based on machine vision, which includes the following steps:

[0069] S1) capturing a color image of the target product through a lens, image sensor, or light source to obtain an image to be detected and a template image;

[0070] The image to be detected is a color image obtained by collecting the surface of the component to be detected; the component to be detected is as follows: Figure 2 There is a burr in the range shown. The length of the burr is Figure 2 The internal distance is shown in the direction of the solid arrow, not the shortest distance shown in the direction of the dotted arrow;

[0071] The template image is a color image obtained by collecting the surface of the standard part corresponding to the part to be tested; the standard part corresponds to the part to be tested, such as Figure 2 There are no burrs within the range shown;

[0072] S2) performing image processing on the image to be detected and the template image according to a preset image processing method to obtain the contour to be detected and the template contour;

[0073] The image processing method preset in step S2) includes the following steps:

[0074] S2.1) converting the color image into a grayscale image and performing Gaussian filtering to obtain a filtered image;

[0075] S2.2) performing adaptive threshold binarization on the filtered image using the OTSU method to obtain a binarized image;

[0076] S2.3) filling holes in the binary image;

[0077] S3) Draw the connected domain between the contour to be detected and the template contour (also known as: contour connected domain, such as Figure 3 The shaded part shown by the oblique line is used in the figure), and the shortest straight-line distance (i.e., Euclidean distance) of each contour point to be detected to the template contour and its corresponding shortest distance point (such as Figure 4 or Figure 5 points on the template outline shown in );

[0078] S4) Determine whether the line between each contour point and the corresponding shortest distance point is completely within the connected domain. If so, mark the contour point as a direct connection point (e.g. Figure 4 If not, the contour point is marked as a non-direct point (as shown in Figure 4 shown);

[0079] S5) calculating the minimum distance between each contour point and the corresponding shortest distance point along a path inside the connected domain according to a preset internal distance calculation method, as the internal distance of each contour point;

[0080] The internal distance calculation method preset in step S5) includes the following steps:

[0081] S5.1) taking a straight point of the contour to be detected as a starting point;

[0082] S5.2) Starting from the starting point, calculate the inner distances of all contour points in a clockwise direction according to the calculation rules;

[0083] The above calculation rules are:

[0084] If a contour point marked as a directly connected point is encountered, the internal distance of the contour point is equal to the shortest straight-line distance between the directly connected point and the corresponding contour point;

[0085] For example, Figure 5The contour point P1 on the contour to be detected is a directly connected point, and the internal distance D1 of the contour point P1 is equal to the shortest straight line distance L1 of the contour point P1, that is, D1 = L1;

[0086] If a contour point marked as a non-directly connected point is encountered, the internal distance of the contour point is equal to the sum of the contour distance between the non-directly connected point and the previous adjacent contour point and the internal distance of the previous adjacent contour point;

[0087] For example, Figure 5 The contour point P2 on the contour to be detected is a non-directly connected point. The internal distance D2 of the contour point P2 is equal to the sum of the contour distance L2 between the contour point P2 and the contour point P1 and the shortest straight line distance L1 of the contour point P1.

[0088] That is, D2=L2+L1;

[0089] For example, Figure 5 The contour point P3 on the contour to be detected is a non-directly connected point. The internal distance D3 of the contour point P3 is equal to the sum of the contour distance L3 between the contour point P3 and the contour point P2 and the internal distance D2 of the contour point P2.

[0090] That is, D3 = L3 + D2;

[0091] Among them, since the internal distance D2 of the contour point P2 is equal to the sum of the distance L2 between the contour point P2 and the contour point P1 and the shortest straight line distance L1 of the contour point P1, that is, D2 = L2 + L1;

[0092] Therefore, D3=L3+L2+L1;

[0093] In order to improve the accuracy of the internal distance calculation of each contour point on the contour to be detected, the internal distance calculation method is preset in step S5), and further includes the following steps:

[0094] S5.3) Starting from the starting point, calculate the internal distances of all contour points in sequence in a counterclockwise direction according to the calculation rules;

[0095] S5.4) comparing the internal distances obtained for each contour point in step S5.2) and step S5.3), and taking the smaller value of the two as the final value of the internal distance of the contour point;

[0096] S6) first comparing the inner distance of each contour point according to a preset outlier identification method to identify whether each contour point is an outlier, the preset outlier identification method being: comparing the inner distance of each contour point with a preset height threshold; if the inner distance of the contour point is greater than the preset height threshold, the contour point is identified as an outlier; otherwise, the contour point is identified as a normal point;

[0097] Then, all abnormal points are analyzed according to a preset burr analysis method to obtain burr information on the surface of the component to be inspected, which includes but is not limited to the number of burrs;

[0098] The preset burr analysis method includes the following steps:

[0099] S6.1) Starting from the starting point, traverse all outliers in order and merge them. Merge several consecutive outliers as a valid outlier. If the starting point and the last contour point are both outliers, merge the starting point and the last contour point as a valid outlier, obtaining several valid outliers. The width of each valid outlier is equal to the number of outliers contained in the valid outlier.

[0100] S6.2) Traverse all valid outlier points to perform burr identification and burr number counting, compare and analyze the width of each valid outlier point with a preset width threshold, if the width of the valid outlier point is greater than the preset width threshold, then the valid outlier point is identified as a burr, and the number of burrs is counted.

[0101] like Figure 2 As shown, when the surface burr information of the component to be inspected also includes the length of the burr, the length of the burr is equal to the contour distance between the farthest effective abnormal point among the effective abnormal points contained in the burr and the previous adjacent normal point, and the farthest effective abnormal point is the effective abnormal point with the largest internal distance.

[0102] When the surface burr information of the component to be inspected also includes the shortest distance of the burr, the shortest distance of the burr is equal to the straight-line distance between the farthest effective abnormal point among the effective abnormal points contained in the burr and the normal point closest to the rear.

[0103] The above are only preferred specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any equivalent changes, modifications, substitutions and variations made by technicians in this technical field based on the concept of the present invention through logical analysis, reasoning or limited experiments on the basis of the existing technology should be within the scope of protection determined by the claims.

Claims

1. A method for detecting burrs on component surfaces based on machine vision, characterized in that: It includes the following steps: S1) obtaining an image to be detected and a template image; The image to be detected is a color image obtained by collecting the surface of the component to be detected; The template image is a color image obtained by collecting the surface of the standard part corresponding to the part to be tested; S2) performing image processing on the image to be detected and the template image according to a preset image processing method to obtain the contour to be detected and the template contour; S3) drawing a connected domain between the contour to be detected and the template contour, and obtaining the shortest straight-line distance from each contour point of the contour to be detected to the template contour and its corresponding shortest distance point; S4) determining whether the line connecting each contour point to the corresponding shortest distance point completely falls within the connected domain; if so, marking the contour point as a directly connected point; otherwise, marking the contour point as a non-directly connected point; S5) calculating the minimum distance between each contour point and the corresponding shortest distance point along the internal path of the connected domain according to a preset internal distance calculation method, as the internal distance of each contour point; In step S5), the internal distance calculation method is preset, including the following steps: S5.1) taking a straight point of the contour to be detected as a starting point; S5.2) Starting from the starting point, calculate the inner distances of all contour points in a clockwise direction according to the calculation rules; S5.3) Starting from the starting point, calculate the internal distances of all contour points in sequence in a counterclockwise direction according to the calculation rules; S5.4) comparing the internal distances obtained for each contour point in step S5.2) and step S5.3), and taking the smaller value of the two as the final value of the internal distance of the contour point; S6) comparing the internal distance of each contour point according to a preset abnormal point identification method to identify whether each contour point is an abnormal point, and analyzing all abnormal points according to a preset burr analysis method to obtain burr information on the surface of the component to be inspected.

2. The method for detecting burrs on component surfaces based on machine vision according to claim 1, characterized in that: step S2) presets an image processing method, comprising the following steps: S2.1) converting the color image into a grayscale image and performing Gaussian filtering to obtain a filtered image; S2.2) performing adaptive threshold binarization on the filtered image using the OTSU method to obtain a binarized image; S2.3) Fill holes in the binary image.

3. The method for detecting burrs on component surfaces based on machine vision according to claim 1, wherein: The calculation rule is: if a contour point marked as a directly connected point is encountered, the internal distance of the contour point is equal to the shortest straight-line distance between the directly connected point and the corresponding contour point; if a contour point marked as a non-directly connected point is encountered, the internal distance of the contour point is equal to the sum of the contour distance between the non-directly connected point and the previous adjacent contour point and the internal distance of the previous adjacent contour point.

4. The method for detecting burrs on component surfaces based on machine vision according to claim 1, wherein: The default outlier identification method in step S6) is: The inner distance of each contour point is compared with a preset height threshold. If the inner distance of the contour point is greater than the preset height threshold, the contour point is identified as an abnormal point, otherwise the contour point is identified as a normal point.

5. The method for detecting burrs on component surfaces based on machine vision according to claim 1, characterized in that: In step S6), the surface burr information of the component to be inspected includes but is not limited to the number of burrs.

6. The method for detecting burrs on component surfaces based on machine vision according to claim 1, characterized in that: step S6) presets the burr analysis method, comprising the following steps: S6.1) Starting from the starting point, traverse all outliers in order and merge them. Merge several consecutive outliers as a valid outlier. If the starting point and the last contour point are both outliers, merge the starting point and the last contour point as a valid outlier, obtaining several valid outliers. The width of each valid outlier is equal to the number of outliers contained in the valid outlier. S6.2) Traverse all valid outlier points to perform burr identification and burr number counting, compare and analyze the width of each valid outlier point with a preset width threshold, if the width of the valid outlier point is greater than the preset width threshold, then the valid outlier point is identified as a burr, and the number of burrs is counted.

Citation Information

Patent Citations

  • Fillet radius measuring method of end-surface multi-fillet shaft type part

    CN107388991A

  • Contour detection method based on variable receptive field scale global modulation

    CN107767387A