Burr detection system and method based on TOF camera

Through TOF camera and three-dimensional reconstruction technology, combined with reference plane and front cross-section analysis, automatic detection of burrs is realized, which solves the problems of low efficiency, high cost and false detection and missed detection in the existing technology, and improves detection accuracy and comprehensiveness. .

CN118229683BActive Publication Date: 2024-09-10JIANGSU ZHONGKE CLOUD CONTROL INTELLIGENT IND EQUIP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410642948.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-23
Publication Date
2024-09-10
Estimated Expiration
2044-05-23

AI Technical Summary

Technical Problem

Existing burr detection methods rely on manual visual inspection or expensive high-resolution imaging equipment, which are inefficient, high-cost and susceptible to subjective factors. It is difficult to meet the needs of fast and accurate detection in industrial production, especially when complex surface structures and shooting angle changes It is easy for misdetection or missed detection to occur.

Method used

A TOF camera is used to obtain depth information and reflection intensity data. Through three-dimensional reconstruction and contour analysis technology, combined with the establishment of a reference plane and front-view cross-section analysis, automatic detection and marking of burrs is achieved, avoiding manual intervention and improving detection accuracy and comprehensiveness.

Benefits of technology

It realizes automated detection of burrs, reduces labor costs, improves detection efficiency and accuracy, avoids false detections and missed detections, and is suitable for detection of complex surface structures, regardless of the shooting angle.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118229683B
    Figure CN118229683B
Patent Text Reader

Abstract

The present invention discloses a burr detection system and method based on a TOF camera, and belongs to the technical field of burr detection. The system of the present invention includes a scanning and depth image generation module, a reference plane establishment and coincidence module, a target contour analysis module, a to-be-detected contour analysis module, and a burr detection and marking module; the scanning and depth image generation module obtains depth information and reflection intensity data, and generates a depth image and a 3D model of the product to be detected; the reference plane establishment and coincidence module obtains a sample 3D model of the target product from a database, establishes a reference plane and coincides with the model of the product to be detected; the target contour analysis module and the to-be-detected contour analysis module respectively analyze the front cross-sectional views of the target product and the product to be detected, and obtain a set of contour lines and bifurcation point coordinates; the burr detection and marking module detects burrs and marks them on the 3D model of the product to be detected in combination with the contour analysis results, and completes the burr detection task.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of burr detection, and in particular to a burr detection system and method based on a TOF camera. Background Art

[0002] With the continuous improvement of industrial manufacturing level, product quality requirements are getting higher and higher. In many manufacturing industries, burrs on the product surface have become one of the important factors affecting product quality. Burrs refer to the protrusions or depressions on the surface of the product, which may be caused by improper material processing, mold wear, inaccurate process parameter settings, etc.

[0003] However, the existing burr detection methods usually rely on manual visual inspection or the use of expensive high-resolution imaging equipment. These methods have the problems of high labor cost, low efficiency, and susceptibility to subjective factors, and are difficult to meet the needs of industrial production for fast and accurate detection. In addition, after obtaining high-definition product images using expensive high-resolution imaging equipment, the product surface burrs are detected by converting the product images into binary images. When the surface structure of the product is complex and the shooting angle of the image makes the surface structure of some products similar to the burrs on the product surface, it will cause false detection or missed detection. Summary of the invention

[0004] The purpose of the present invention is to provide a burr detection system and method based on a TOF camera to solve the problems raised in the above background technology.

[0005] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0006] The burr detection method based on TOF camera includes the following steps:

[0007] Step S100. Use a TOF camera to scan the surface of the product to be inspected, obtain depth information and reflection intensity data, generate a depth image of the product to be inspected based on the depth information and reflection intensity data, and obtain a 3D model of the product to be inspected based on the depth image;

[0008] Step S200. Obtain a sample 3D model of the target product from the database, and establish a reference plane according to the center point of the sample 3D model; overlap the sample 3D model of the target product with the 3D model of the product to be tested, and establish a reference plane corresponding to the sample 3D model of the target product on the 3D model of the product to be tested;

[0009] Step S300. Obtain a front cross-sectional view of the target product based on the reference plane, analyze the front cross-sectional view of the target product to obtain a target contour line of the target product; analyze the contour line of the target product to obtain a target contour bifurcation point coordinate set;

[0010] Step S400. Obtain a front cross-sectional view of the product to be inspected based on the reference plane, analyze the front cross-sectional view of the product to be inspected, and obtain a contour line to be inspected of the product to be inspected; analyze the contour line to be inspected based on a target contour bifurcation point coordinate set, thereby detecting burrs, and marking the detected burrs.

[0011] Step S100 includes:

[0012] S101. The depth information represents the distance between each pixel of the product to be inspected and the camera, and the reflection intensity data represents the intensity of the reflected light at each pixel of the product to be inspected; the TOF camera is used to scan the surface of the product to be inspected to obtain the depth information and reflection intensity data of each pixel of the product to be inspected;

[0013] S102. Obtain the depth information and reflection intensity data of each pixel of the product to be inspected, and generate a depth image of the product to be inspected; convert the depth information of each pixel in the depth image into three-dimensional coordinates to obtain a set of pixel coordinates;

[0014] S103. Perform three-dimensional reconstruction on the product to be inspected according to the pixel point coordinate set, thereby obtaining a 3D model of the product to be inspected.

[0015] Step S200 includes:

[0016] S201. The sample 3D model of the target product is constructed according to the sample production drawing of the product to be tested, and the sample 3D model of the target product has the same size parameters as the 3D model of the product to be tested; the calculation process of the center point is as follows:

[0017] The sample 3D model of the target product is placed in a three-dimensional coordinate system, and any point outside the sample 3D model of the target product is used as the coordinate origin o. The three axes of the three-dimensional coordinate system are L, W and H axes respectively; for the three planes LoW, WoH and LoH, respectively establish cutting planes k1, k2 and k3 parallel to the above three planes; the axis parallel to the normal of the cutting plane is named the parallel axis, and each cutting plane moves on the parallel axis to find the maximum and minimum values ​​of the intersection points of the cutting plane and the parallel axis, and retain the position of the cutting plane when the maximum and minimum values ​​are obtained; traverse all cutting planes, and gradually construct the boundary of the three-dimensional space according to the position and intersection points of the cutting planes, and obtain a closed three-dimensional space by connecting the intersection points of each adjacent cutting plane; obtain the vertex coordinates of the three-dimensional space, calculate the average value, and thus obtain the coordinates of the center point;

[0018] S202. Find the center point on the sample 3D model of the target product according to the coordinates of the center point, correspond the origin of the three-dimensional coordinate system of S201 to the center point, and use the LoW, WoH and LoH planes as reference planes; overlap the sample 3D model of the target product with the 3D model of the product to be tested, and establish a reference plane corresponding to the sample 3D model of the target product on the 3D model of the product to be tested.

[0019] Since the sample 3D model of the target product and the 3D model of the product to be inspected have the same size parameters, the overlap operation of the sample 3D model of the target product and the 3D model of the product to be inspected can be achieved; however, there may be burrs on the surface of the product to be inspected, and a reference point can be established on the smooth part of the surface of the product to be inspected, and the sample 3D model of the target product and the 3D model of the product to be inspected can be overlapped based on the reference point.

[0020] Step S300 includes:

[0021] S301. For each reference plane, take the coordinate axis on any side of the reference plane as the reference axis, take the line where the reference plane intersects the sample 3D model of the target product as the reference line, rotate clockwise around the reference axis, and the rotation angle is α°, and obtain the front view cross-sectional view of the sample 3D model of the target product for each rotation until the reference line stops after one circle around the reference axis, thereby forming a front view cross-sectional view set A of the sample 3D model of the target product, and A={a1,a2,...,an}, wherein a1 represents the first front view cross-sectional view of the sample 3D model of the target product, a2 represents the second front view cross-sectional view of the sample 3D model of the target product, and so on, an represents the nth front view cross-sectional view of the sample 3D model of the target product, n represents the sequence number of the front view cross-sectional view of the sample 3D model of the target product, and n=360° / α°;

[0022] By rotating clockwise to obtain a front cross-sectional view of the 3D model of the target product sample, the appearance and structural features of the target product can be fully displayed within a 360° range; by using the coordinate axis on any side of the reference plane as the reference axis and rotating clockwise around the reference axis, it can be ensured that each front cross-sectional view obtained can present a clear product form at different angles, which is conducive to observing the tiny details and features on the product surface.

[0023] S302. Based on each element in the front view cross-sectional view set A, a target contour line of the target product is obtained to form a target contour line set B, and the sequence number of each element in the target contour line set B is the same as the sequence number of each element in the front view cross-sectional view set A of the sample 3D model of the corresponding target product;

[0024] S303. For each element of the target contour line set B, traverse all connected area points of the target contour lines, find the endpoints, and traverse each endpoint until the bifurcation point of the branch is reached. During the traversal process, the bifurcation point coordinates of each branch are recorded to form the target contour bifurcation point coordinate set E.

[0025] Step S400 includes:

[0026] S401. Based on the method for obtaining the front cross-sectional view of the sample 3D model of the target product with reference to the reference plane, obtain the front cross-sectional view of the 3D model of the product to be detected, thereby forming a front cross-sectional view set C with the same element sequence number as the front cross-sectional view set A; for each element in the front cross-sectional view set C, perform the same analysis steps as each element in the front cross-sectional view set A, thereby obtaining a contour line set D to be detected;

[0027] S402. For each element of the set of contour lines to be detected D, traverse all connected area points of the contour lines to be detected, find the endpoints, and traverse each endpoint until the bifurcation point of the branch is reached. During the traversal process, the coordinates of the bifurcation point of each branch are recorded to form a set of coordinates F of the bifurcation point of the contour to be detected;

[0028] S403. For each element of the target contour line set B and the contour line set D to be detected, find the elements with the same sequential number in the target contour line set B and the contour line set D to be detected according to the sequential numbering of the elements; for the above elements, respectively obtain the target contour bifurcation point coordinate set E and the contour bifurcation point coordinate set F to be detected, and compare the target contour bifurcation point coordinates with the contour bifurcation point coordinates to be detected in turn. If E⊂F, record the coordinates of the contour bifurcation points to be detected in FE, and use the endpoints of the contour bifurcation points to be detected in FE as burr endpoints; obtain all burr endpoints, mark them on the front view cross-sectional view of the 3D model of the product to be detected, so as to find the corresponding coordinates of the burr endpoints on the 3D model of the product to be detected, and mark the burr endpoints on the 3D model of the product to be detected, thereby completing the burr detection task.

[0029] The burr detection system based on TOF camera includes: scanning and depth image generation module, reference plane establishment and coincidence module, target contour analysis module, to-be-detected contour analysis module and burr detection and marking module;

[0030] The scanning and depth image generation module uses a TOF camera to scan the surface of the product to be inspected, obtains depth information and reflection intensity data, combines the depth information and reflection intensity data to generate a depth image of the product to be inspected, and obtains a 3D model of the product to be inspected based on the depth image;

[0031] The reference plane establishment and coincidence module obtains the sample 3D model of the target product from the database, establishes the reference plane according to the center point of the sample 3D model; coincides the sample 3D model of the target product with the 3D model of the product to be tested, and establishes a reference plane corresponding to the sample 3D model of the target product on the 3D model of the product to be tested;

[0032] The target contour analysis module obtains a front cross-sectional view of the target product based on a reference plane, analyzes the front cross-sectional view of the target product to obtain a target contour line of the target product, and further analyzes the target contour line to obtain a target contour bifurcation point coordinate set;

[0033] The detection contour analysis module obtains a front view cross-sectional view of the product to be detected based on the reference plane, analyzes the front view cross-sectional view of the product to be detected, obtains a detection contour line of the product to be detected, and further analyzes the detection contour line to obtain a set of coordinates of bifurcation points of the detection contour;

[0034] The burr detection and marking module combines the analysis results of the target contour analysis module and the contour analysis module to detect the burrs and mark them on the 3D model of the product to be inspected, thus completing the burr detection task.

[0035] The scanning and depth image generation module includes a TOF camera scanning unit, a depth information acquisition unit, and a three-dimensional coordinate conversion unit;

[0036] The TOF camera scanning unit scans the surface of the product to be inspected to obtain depth information and reflection intensity data; the depth information acquisition unit obtains the depth information and reflection intensity data of each pixel point of the product to be inspected, and generates a depth image; the three-dimensional coordinate conversion unit converts the depth information of each pixel point in the depth image into three-dimensional coordinates, and performs conversion in the world coordinate system to obtain a pixel point coordinate set and a 3D model of the product to be inspected.

[0037] The reference plane establishment and coincidence module includes a sample 3D model acquisition unit and a coincidence analysis unit;

[0038] The sample 3D model acquisition unit acquires the sample 3D model of the target product from the database and establishes a reference plane based on the center point of the sample 3D model; the coincidence analysis unit coincides the sample 3D model of the target product with the 3D model of the product to be tested, and establishes a reference plane corresponding to the sample 3D model of the target product on the 3D model of the product to be tested.

[0039] The target contour analysis module includes a front view cross-section image generation unit, a target contour line extraction unit and a bifurcation point coordinate extraction unit;

[0040] The front view cross-sectional image generating unit obtains the front view cross-sectional image of the target product according to the reference plane, and forms a front view cross-sectional image set of the target product; the target contour line extracting unit obtains the target contour line of the target product based on each element in the front view cross-sectional image set, and forms a target contour line set; the bifurcation point coordinate extracting unit performs a connected area point traversal on each element in the target contour line set, finds the bifurcation point coordinates of the branch, and thus obtains the target contour bifurcation point coordinate set;

[0041] The to-be-detected contour analysis module includes a to-be-detected product front view cross-sectional image generation unit, a to-be-detected contour line extraction unit, and a to-be-detected bifurcation point coordinate extraction unit;

[0042] The front view cross-sectional image generation unit of the product to be detected obtains the front view cross-sectional image of the 3D model of the product to be detected based on the reference plane and the method for obtaining the front view cross-sectional image of the sample 3D model of the target product, thereby forming a set of front view cross-sectional images of the product to be detected; the contour line extraction unit to be detected performs the same analysis steps as the target contour line extraction unit on each element in the set of front view cross-sectional images of the product to be detected, thereby obtaining a set of contour lines to be detected; the bifurcation point coordinate extraction unit to be detected traverses each element in the set of contour lines to be detected, finds the bifurcation point coordinates of the branch, and forms a set of contour bifurcation point coordinates to be detected.

[0043] The burr detection and marking module includes a burr endpoint detection unit and a burr marking unit;

[0044] The burr endpoint detection unit compares the target contour bifurcation point coordinate set with the contour bifurcation point coordinate set to be detected, and detects the burr endpoints in the product to be detected; the burr marking unit marks the burr endpoints on the 3D model of the product to be detected to complete the burr detection task.

[0045] Compared with the prior art, the beneficial effects achieved by the present invention are:

[0046] A TOF camera is used to obtain depth information and reflection intensity data, and the subsequent processing is all completed by algorithms. There is no need for manual visual inspection, which realizes automatic detection of burrs, greatly reduces labor costs and improves efficiency. Through three-dimensional reconstruction and contour analysis technology, burrs on the product surface can be accurately detected, avoiding the influence of human subjective factors and effectively improving detection accuracy. Through the analysis of the front view cross-sectional view, burrs that may exist on the product surface can be detected in all directions, improving the comprehensiveness of detection. Compared with traditional high-resolution imaging equipment, TOF cameras can perform burr detection under complex surface structures and are not affected by shooting angles, avoiding false detection or missed detection, and have better applicability. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0048] Figure 1 It is a schematic diagram of the burr detection system module based on TOF camera of the present invention. DETAILED DESCRIPTION

[0049] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0050] See also Figure 1 , the present invention provides a technical solution:

[0051] The burr detection system based on TOF camera includes: scanning and depth image generation module, reference plane establishment and coincidence module, target contour analysis module, to-be-detected contour analysis module and burr detection and marking module;

[0052] The scanning and depth image generation module uses a TOF camera to scan the surface of the product to be inspected, obtains depth information and reflection intensity data, combines the depth information and reflection intensity data to generate a depth image of the product to be inspected, and obtains a 3D model of the product to be inspected based on the depth image;

[0053] The reference plane establishment and coincidence module obtains the sample 3D model of the target product from the database, establishes the reference plane according to the center point of the sample 3D model; coincides the sample 3D model of the target product with the 3D model of the product to be tested, and establishes a reference plane corresponding to the sample 3D model of the target product on the 3D model of the product to be tested;

[0054] The target contour analysis module obtains a front cross-sectional view of the target product based on a reference plane, analyzes the front cross-sectional view of the target product to obtain a target contour line of the target product, and further analyzes the target contour line to obtain a target contour bifurcation point coordinate set;

[0055] The detection contour analysis module obtains a front view cross-sectional view of the product to be detected based on the reference plane, analyzes the front view cross-sectional view of the product to be detected, obtains a detection contour line of the product to be detected, and further analyzes the detection contour line to obtain a set of coordinates of bifurcation points of the detection contour;

[0056] The burr detection and marking module combines the analysis results of the target contour analysis module and the contour analysis module to detect the burrs and mark them on the 3D model of the product to be inspected, thus completing the burr detection task.

[0057] The scanning and depth image generation module includes a TOF camera scanning unit, a depth information acquisition unit, and a three-dimensional coordinate conversion unit;

[0058] The TOF camera scanning unit scans the surface of the product to be inspected to obtain depth information and reflection intensity data; the depth information acquisition unit obtains the depth information and reflection intensity data of each pixel point of the product to be inspected, and generates a depth image; the three-dimensional coordinate conversion unit converts the depth information of each pixel point in the depth image into three-dimensional coordinates, and performs conversion in the world coordinate system to obtain a pixel point coordinate set and a 3D model of the product to be inspected.

[0059] The reference plane establishment and coincidence module includes a sample 3D model acquisition unit and a coincidence analysis unit;

[0060] The sample 3D model acquisition unit acquires the sample 3D model of the target product from the database and establishes a reference plane based on the center point of the sample 3D model; the coincidence analysis unit coincides the sample 3D model of the target product with the 3D model of the product to be tested, and establishes a reference plane corresponding to the sample 3D model of the target product on the 3D model of the product to be tested.

[0061] The target contour analysis module includes a front view cross-section image generation unit, a target contour line extraction unit and a bifurcation point coordinate extraction unit;

[0062] The front view cross-sectional image generating unit obtains the front view cross-sectional image of the target product according to the reference plane, and forms a front view cross-sectional image set of the target product; the target contour line extracting unit obtains the target contour line of the target product based on each element in the front view cross-sectional image set, and forms a target contour line set; the bifurcation point coordinate extracting unit performs a connected area point traversal on each element in the target contour line set, finds the bifurcation point coordinates of the branch, and thus obtains the target contour bifurcation point coordinate set;

[0063] The to-be-detected contour analysis module includes a to-be-detected product front view cross-sectional image generation unit, a to-be-detected contour line extraction unit, and a to-be-detected bifurcation point coordinate extraction unit;

[0064] The front view cross-sectional image generation unit of the product to be detected obtains the front view cross-sectional image of the 3D model of the product to be detected based on the reference plane and the method for obtaining the front view cross-sectional image of the sample 3D model of the target product, thereby forming a set of front view cross-sectional images of the product to be detected; the contour line extraction unit to be detected performs the same analysis steps as the target contour line extraction unit on each element in the set of front view cross-sectional images of the product to be detected, thereby obtaining a set of contour lines to be detected; the bifurcation point coordinate extraction unit to be detected traverses each element in the set of contour lines to be detected, finds the bifurcation point coordinates of the branch, and forms a set of contour bifurcation point coordinates to be detected.

[0065] The burr detection and marking module includes a burr endpoint detection unit and a burr marking unit;

[0066] The burr endpoint detection unit compares the target contour bifurcation point coordinate set with the contour bifurcation point coordinate set to be detected, and detects the burr endpoints in the product to be detected; the burr marking unit marks the burr endpoints on the 3D model of the product to be detected to complete the burr detection task.

[0067] The burr detection method based on TOF camera includes the following steps:

[0068] Step S100. Use a TOF camera to scan the surface of the product to be inspected, obtain depth information and reflection intensity data, generate a depth image of the product to be inspected based on the depth information and reflection intensity data, and obtain a 3D model of the product to be inspected based on the depth image;

[0069] Step S200. Obtain a sample 3D model of the target product from the database, and establish a reference plane according to the center point of the sample 3D model; overlap the sample 3D model of the target product with the 3D model of the product to be tested, and establish a reference plane corresponding to the sample 3D model of the target product on the 3D model of the product to be tested;

[0070] Step S300. Obtain a front cross-sectional view of the target product based on the reference plane, analyze the front cross-sectional view of the target product to obtain a target contour line of the target product; analyze the contour line of the target product to obtain a target contour bifurcation point coordinate set;

[0071] Step S400. Obtain a front cross-sectional view of the product to be inspected based on the reference plane, analyze the front cross-sectional view of the product to be inspected, and obtain a contour line to be inspected of the product to be inspected; analyze the contour line to be inspected based on a target contour bifurcation point coordinate set, thereby detecting burrs, and marking the detected burrs.

[0072] Step S100 includes:

[0073] S101. The depth information represents the distance between each pixel of the product to be inspected and the camera, and the reflection intensity data represents the intensity of the reflected light at each pixel of the product to be inspected; the TOF camera is used to scan the surface of the product to be inspected to obtain the depth information and reflection intensity data of each pixel of the product to be inspected;

[0074] S102. Obtain the depth information and reflection intensity data of each pixel of the product to be inspected, and generate a depth image of the product to be inspected; convert the depth information of each pixel in the depth image into three-dimensional coordinates to obtain a set of pixel coordinates;

[0075] In this embodiment, the specific process of converting the depth information of each pixel in the depth image into three-dimensional coordinates is as follows:

[0076] Assume that the intrinsic parameter matrix of the camera is K, and the depth value of the pixel in the depth image is D(u,v). According to the camera projection model, the depth value of the pixel is converted into the three-dimensional coordinate P in the camera coordinate system. c (x,y,z), the specific calculation formula is:

[0077] ,

[0078] Where (u,v) is the pixel coordinate in the depth image, and f x and f y is the focal length of the camera, c x and c y is the coordinate of the optical center on the image, X c , Y c and Z c Respectively represent the x, y, and z coordinates of the pixel point of the depth image in the camera coordinate system;

[0079] The three-dimensional coordinate P in the camera coordinate system c (x, y, z) is converted to the three-dimensional coordinate P in the world coordinate system w (x,y,z), the specific calculation formula is:

[0080] ,

[0081] Among them, R is the rotation matrix, which is used to rotate the coordinates in the camera coordinate system to the world coordinate system, and T is the translation vector, which represents the translation vector from the origin of the camera coordinate system to the origin of the world coordinate system.

[0082] S103. Perform three-dimensional reconstruction on the product to be inspected according to the pixel point coordinate set, thereby obtaining a 3D model of the product to be inspected.

[0083] Step S200 includes:

[0084] S201. The sample 3D model of the target product is constructed according to the sample production drawing of the product to be tested, and the sample 3D model of the target product has the same size parameters as the 3D model of the product to be tested; the calculation process of the center point is as follows:

[0085] The sample 3D model of the target product is placed in a three-dimensional coordinate system, and any point outside the sample 3D model of the target product is used as the coordinate origin o. The three axes of the three-dimensional coordinate system are L, W and H axes respectively; for the three planes LoW, WoH and LoH, respectively establish cutting planes k1, k2 and k3 parallel to the above three planes; the axis parallel to the normal of the cutting plane is named the parallel axis, and each cutting plane moves on the parallel axis to find the maximum and minimum values ​​of the intersection points of the cutting plane and the parallel axis, and retain the position of the cutting plane when the maximum and minimum values ​​are obtained; traverse all cutting planes, and gradually construct the boundary of the three-dimensional space according to the position and intersection points of the cutting planes, and obtain a closed three-dimensional space by connecting the intersection points of each adjacent cutting plane; obtain the vertex coordinates of the three-dimensional space, calculate the average value, and thus obtain the coordinates of the center point;

[0086] In this example, the parallel axes are determined as follows:

[0087] For the cutting plane k1 parallel to the LoW plane, its normal is parallel to the H axis, so the H axis is named the parallel axis;

[0088] For the cutting plane k2 parallel to the WoH plane, its normal is parallel to the L axis, so the L axis is named the parallel axis;

[0089] For the cutting plane k3 parallel to the LoH plane, its normal is parallel to the W axis, so the W axis is named the parallel axis.

[0090] S202. Find the center point on the sample 3D model of the target product according to the coordinates of the center point, correspond the origin of the three-dimensional coordinate system of S201 to the center point, and use the LoW, WoH and LoH planes as reference planes; overlap the sample 3D model of the target product with the 3D model of the product to be tested, and establish a reference plane corresponding to the sample 3D model of the target product on the 3D model of the product to be tested.

[0091] Since the sample 3D model of the target product and the 3D model of the product to be inspected have the same size parameters, the overlap operation of the sample 3D model of the target product and the 3D model of the product to be inspected can be achieved; however, there may be burrs on the surface of the product to be inspected, and a reference point can be established on the smooth part of the surface of the product to be inspected, and the sample 3D model of the target product and the 3D model of the product to be inspected can be overlapped based on the reference point.

[0092] Step S300 includes:

[0093] S301. For each reference plane, take the coordinate axis on any side of the reference plane as the reference axis, take the line where the reference plane intersects the sample 3D model of the target product as the reference line, rotate clockwise around the reference axis, and the rotation angle is α°, and obtain the front view cross-sectional view of the sample 3D model of the target product for each rotation until the reference line stops after one circle around the reference axis, thereby forming a front view cross-sectional view set A of the sample 3D model of the target product, and A={a1,a2,...,an}, wherein a1 represents the first front view cross-sectional view of the sample 3D model of the target product, a2 represents the second front view cross-sectional view of the sample 3D model of the target product, and so on, an represents the nth front view cross-sectional view of the sample 3D model of the target product, n represents the sequence number of the front view cross-sectional view of the sample 3D model of the target product, and n=360° / α°;

[0094] By rotating clockwise to obtain a front cross-sectional view of the 3D model of the target product sample, the appearance and structural features of the target product can be fully displayed within a 360° range; by using the coordinate axis on any side of the reference plane as the reference axis and rotating clockwise around the reference axis, it can be ensured that each front cross-sectional view obtained can present a clear product form at different angles, which is conducive to observing the tiny details and features on the product surface.

[0095] S302. Based on each element in the front view cross-sectional view set A, a target contour line of the target product is obtained to form a target contour line set B, and the sequence number of each element in the target contour line set B is the same as the sequence number of each element in the front view cross-sectional view set A of the sample 3D model of the corresponding target product;

[0096] S303. For each element of the target contour line set B, traverse all connected area points of the target contour lines, find the endpoints, and traverse each endpoint until the bifurcation point of the branch is reached. During the traversal process, the bifurcation point coordinates of each branch are recorded to form the target contour bifurcation point coordinate set E.

[0097] Step S400 includes:

[0098] S401. Based on the method for obtaining the front cross-sectional view of the sample 3D model of the target product with reference to the reference plane, obtain the front cross-sectional view of the 3D model of the product to be detected, thereby forming a front cross-sectional view set C with the same element sequence number as the front cross-sectional view set A; for each element in the front cross-sectional view set C, perform the same analysis steps as each element in the front cross-sectional view set A, thereby obtaining a contour line set D to be detected;

[0099] S402. For each element of the set of contour lines to be detected D, traverse all connected area points of the contour lines to be detected, find the endpoints, and traverse each endpoint until the bifurcation point of the branch is reached. During the traversal process, the coordinates of the bifurcation point of each branch are recorded to form a set of coordinates F of the bifurcation point of the contour to be detected;

[0100] S403. For each element of the target contour line set B and the contour line set D to be detected, find the elements with the same sequential number in the target contour line set B and the contour line set D to be detected according to the sequential numbering of the elements; for the above elements, respectively obtain the target contour bifurcation point coordinate set E and the contour bifurcation point coordinate set F to be detected, and compare the target contour bifurcation point coordinates with the contour bifurcation point coordinates to be detected in turn. If E⊂F, record the coordinates of the contour bifurcation points to be detected in FE, and use the endpoints of the contour bifurcation points to be detected in FE as burr endpoints; obtain all burr endpoints, mark them on the front view cross-sectional view of the 3D model of the product to be detected, so as to find the corresponding coordinates of the burr endpoints on the 3D model of the product to be detected, and mark the burr endpoints on the 3D model of the product to be detected, thereby completing the burr detection task.

[0101] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0102] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A burr detection method based on a TOF camera, characterized in that: The method comprises the following steps: Step S100. Use a TOF camera to scan the surface of the product to be inspected, obtain depth information and reflection intensity data, generate a depth image of the product to be inspected based on the depth information and reflection intensity data, and obtain a 3D model of the product to be inspected based on the depth image; Step S200. Obtain a sample 3D model of the target product from the database, and establish a reference plane according to the center point of the sample 3D model; overlap the sample 3D model of the target product with the 3D model of the product to be tested, and establish a reference plane corresponding to the sample 3D model of the target product on the 3D model of the product to be tested; The step S200 includes: S201. The sample 3D model of the target product is constructed according to the sample production drawing of the product to be tested, and the sample 3D model of the target product has the same size parameters as the 3D model of the product to be tested; the calculation process of the center point is as follows: The sample 3D model of the target product is placed in a three-dimensional coordinate system, and any point outside the sample 3D model of the target product is used as the coordinate origin o. The three axes of the three-dimensional coordinate system are L, W and H axes respectively; for the three planes LoW, WoH and LoH, respectively establish cutting planes k1, k2 and k3 parallel to the above three planes; the axis parallel to the normal of the cutting plane is named the parallel axis, and each cutting plane moves on the parallel axis to find the maximum and minimum values ​​of the intersection points of the cutting plane and the parallel axis, and retain the position of the cutting plane when the maximum and minimum values ​​are obtained; traverse all cutting planes, and gradually construct the boundary of the three-dimensional space according to the position and intersection points of the cutting planes, and obtain a closed three-dimensional space by connecting the intersection points of each adjacent cutting plane; obtain the vertex coordinates of the three-dimensional space, calculate the average value, and thus obtain the coordinates of the center point; S202. Find the center point on the sample 3D model of the target product according to the coordinates of the center point, correspond the origin of the three-dimensional coordinate system of S201 to the center point, and use the LoW, WoH and LoH planes as reference planes; overlap the sample 3D model of the target product with the 3D model of the product to be tested, and establish a reference plane corresponding to the sample 3D model of the target product on the 3D model of the product to be tested; Step S300. Obtain a front cross-sectional view of the target product based on the reference plane, analyze the front cross-sectional view of the target product to obtain a target contour line of the target product; analyze the contour line of the target product to obtain a target contour bifurcation point coordinate set; Step S400. Obtain a front cross-sectional view of the product to be inspected based on the reference plane, analyze the front cross-sectional view of the product to be inspected, and obtain a contour line to be inspected of the product to be inspected; analyze the contour line to be inspected based on a target contour bifurcation point coordinate set, thereby detecting burrs, and marking the detected burrs.

2. The burr detection method based on TOF camera according to claim 1, characterized in that: The step S100 includes: S101. The depth information represents the distance between each pixel of the product to be inspected and the camera, and the reflection intensity data represents the intensity of the reflected light at each pixel of the product to be inspected; the TOF camera is used to scan the surface of the product to be inspected to obtain the depth information and reflection intensity data of each pixel of the product to be inspected; S102. Obtain the depth information and reflection intensity data of each pixel of the product to be inspected, and generate a depth image of the product to be inspected; convert the depth information of each pixel in the depth image into three-dimensional coordinates to obtain a set of pixel coordinates; S103. Perform three-dimensional reconstruction on the product to be inspected according to the pixel point coordinate set, thereby obtaining a 3D model of the product to be inspected.

3. The burr detection method based on TOF camera according to claim 1, characterized in that: The step S300 includes: S301. For each reference plane, take the coordinate axis on any side of the reference plane as the reference axis, take the line where the reference plane intersects the sample 3D model of the target product as the reference line, rotate clockwise around the reference axis, and the rotation angle is α°, and obtain the front view cross-sectional view of the sample 3D model of the target product for each rotation until the reference line stops after one circle around the reference axis, thereby forming a front view cross-sectional view set A of the sample 3D model of the target product, and A={a1,a2,...,an}, wherein a1 represents the first front view cross-sectional view of the sample 3D model of the target product, a2 represents the second front view cross-sectional view of the sample 3D model of the target product, and so on, an represents the nth front view cross-sectional view of the sample 3D model of the target product, n represents the sequence number of the front view cross-sectional view of the sample 3D model of the target product, and n=360° / α°; S302. Based on each element in the front view cross-sectional view set A, a target contour line of the target product is obtained to form a target contour line set B, and the sequence number of each element in the target contour line set B is the same as the sequence number of each element in the front view cross-sectional view set A of the sample 3D model of the corresponding target product; S303. For each element of the target contour line set B, traverse all connected area points of the target contour lines, find the endpoints, and traverse each endpoint until the bifurcation point of the branch is reached. During the traversal process, the bifurcation point coordinates of each branch are recorded to form the target contour bifurcation point coordinate set E.

4. The burr detection method based on TOF camera according to claim 3, characterized in that: The step S400 includes: S401. Based on the method for obtaining the front cross-sectional view of the sample 3D model of the target product with reference to the reference plane, obtain the front cross-sectional view of the 3D model of the product to be detected, thereby forming a front cross-sectional view set C with the same element sequence number as the front cross-sectional view set A; for each element in the front cross-sectional view set C, perform the same analysis steps as each element in the front cross-sectional view set A, thereby obtaining a contour line set D to be detected; S402. For each element of the set of contour lines to be detected D, traverse all connected area points of the contour lines to be detected, find the endpoints, and traverse each endpoint until the bifurcation point of the branch is reached. During the traversal process, the coordinates of the bifurcation point of each branch are recorded to form a set of coordinates F of the bifurcation point of the contour to be detected; S403. For each element of the target contour line set B and the contour line set D to be detected, find the elements with the same sequential number in the target contour line set B and the contour line set D to be detected according to the sequential numbering of the elements; for the above elements, respectively obtain the target contour bifurcation point coordinate set E and the contour bifurcation point coordinate set F to be detected, and compare the target contour bifurcation point coordinates with the contour bifurcation point coordinates to be detected in turn. If E⊂F, record the coordinates of the contour bifurcation points to be detected in FE, and use the endpoints of the contour bifurcation points to be detected in FE as burr endpoints; obtain all burr endpoints, mark them on the front view cross-sectional view of the 3D model of the product to be detected, so as to find the corresponding coordinates of the burr endpoints on the 3D model of the product to be detected, and mark the burr endpoints on the 3D model of the product to be detected, thereby completing the burr detection task.

5. A burr detection system based on a TOF camera, applied to the burr detection method based on a TOF camera according to any one of claims 1 to 4, characterized in that: The system comprises: a scanning and depth image generation module, a reference plane establishment and coincidence module, a target contour analysis module, a to-be-detected contour analysis module, and a burr detection and marking module; The scanning and depth image generation module uses a TOF camera to scan the surface of the product to be inspected, obtains depth information and reflection intensity data, generates a depth image of the product to be inspected by combining the depth information and reflection intensity data, and obtains a 3D model of the product to be inspected based on the depth image; The reference plane establishment and coincidence module obtains a sample 3D model of the target product from a database, establishes a reference plane according to the center point of the sample 3D model; coincides the sample 3D model of the target product with the 3D model of the product to be tested, and establishes a reference plane corresponding to the sample 3D model of the target product on the 3D model of the product to be tested; The target contour analysis module obtains a front cross-sectional view of the target product based on the reference plane, analyzes the front cross-sectional view of the target product to obtain a target contour line of the target product, and further analyzes the target contour line to obtain a target contour bifurcation point coordinate set; The to-be-detected contour analysis module obtains a front view cross-sectional view of the to-be-detected product based on a reference plane, analyzes the front view cross-sectional view of the to-be-detected product to obtain a to-be-detected contour line of the to-be-detected product, and further analyzes the to-be-detected contour line to obtain a set of coordinates of bifurcation points of the to-be-detected contour; The burr detection and marking module combines the analysis results of the target contour analysis module and the to-be-detected contour analysis module to detect burrs and mark them on the 3D model of the to-be-detected product to complete the burr detection task.

6. The burr detection system based on TOF camera according to claim 5, characterized in that: The scanning and depth image generation module includes a TOF camera scanning unit, a depth information acquisition unit and a three-dimensional coordinate conversion unit; The TOF camera scanning unit scans the surface of the product to be inspected to obtain depth information and reflection intensity data; the depth information acquisition unit obtains the depth information and reflection intensity data of each pixel point of the product to be inspected, and generates a depth image; the three-dimensional coordinate conversion unit converts the depth information of each pixel point in the depth image into three-dimensional coordinates, and performs conversion in the world coordinate system to obtain a pixel point coordinate set and a 3D model of the product to be inspected.

7. The burr detection system based on TOF camera according to claim 6, characterized in that: The reference plane establishment and coincidence module includes a sample 3D model acquisition unit and a coincidence analysis unit; The sample 3D model acquisition unit acquires the sample 3D model of the target product from the database, and establishes a reference plane according to the center point of the sample 3D model; the coincidence analysis unit coincides the sample 3D model of the target product with the 3D model of the product to be detected, and establishes a reference plane corresponding to the sample 3D model of the target product on the 3D model of the product to be detected.

8. The burr detection system based on TOF camera according to claim 7, characterized in that: The target contour analysis module includes a front view cross-sectional image generation unit, a target contour line extraction unit and a bifurcation point coordinate extraction unit; The front view cross-sectional image generating unit obtains the front view cross-sectional image of the target product according to the reference plane to form a front view cross-sectional image set of the target product; the target contour line extracting unit obtains the target contour line of the target product based on each element in the front view cross-sectional image set to form a target contour line set; the bifurcation point coordinate extracting unit performs a connected area point traversal on each element in the target contour line set to find the bifurcation point coordinates of the branch, thereby obtaining a target contour bifurcation point coordinate set; The to-be-detected contour analysis module includes a to-be-detected product front view cross-sectional image generation unit, a to-be-detected contour line extraction unit, and a to-be-detected bifurcation point coordinate extraction unit; The front view cross-sectional image generation unit of the product to be detected obtains the front view cross-sectional image of the 3D model of the product to be detected based on the reference plane and the method for obtaining the front view cross-sectional image of the sample 3D model of the target product, thereby forming a set of front view cross-sectional images of the product to be detected; the contour line extraction unit to be detected performs the same analysis steps as the target contour line extraction unit on each element in the set of front view cross-sectional images of the product to be detected, thereby obtaining a set of contour lines to be detected; the bifurcation point coordinate extraction unit to be detected traverses each element in the set of contour lines to be detected, finds the bifurcation point coordinates of the branch, and forms a set of contour bifurcation point coordinates to be detected.

9. The burr detection system based on TOF camera according to claim 8, characterized in that: The burr detection and marking module includes a burr endpoint detection unit and a burr marking unit; The burr endpoint detection unit compares the target contour bifurcation point coordinate set with the contour bifurcation point coordinate set to be detected to detect the burr endpoints in the product to be detected; the burr marking unit marks the burr endpoints on the 3D model of the product to be detected to complete the burr detection task.