Product quality inspection method and device and readable storage medium

The data of the cable surface point cloud data is obtained and spliced ​​through the binocular image acquisition terminal, which solves the problems of low detection accuracy and inability to detect surface undulations in the prior art, and achieves high-precision cable quality inspection.

CN119919334APending Publication Date: 2025-05-02CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311422648.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-30
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

In the quality inspection of prior art, there are problems such as low detection accuracy and inability to detect surface undulations in detail, especially when cables are moving at high speed and irregular jitter.

Method used

A binocular image acquisition terminal is used to obtain point cloud image data on the upper and lower surfaces of the product, and complete point cloud data is obtained through data stitching, and quality inspection is carried out based on this.

Benefits of technology

It improves the detection accuracy of cable size structure information, can detect the ups and downs and defects of the product surface in detail, and meets the manufacturer's needs for high-precision quality inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119919334A_ABST
    Figure CN119919334A_ABST
Patent Text Reader

Abstract

The invention provides a product quality inspection method and device and a readable storage medium, and the method specifically comprises the steps: obtaining the point cloud image data of a to-be-detected product, and the point cloud image data comprises the upper surface point cloud data of the product and the lower surface point cloud data of the product; performing data splicing according to the product upper surface point cloud data and the product lower surface point cloud data to obtain complete point cloud data of the to-be-detected product; and performing quality inspection according to the complete point cloud data to obtain a quality inspection result of the to-be-detected product. According to the invention, by using the 3D line structured light measurement mode, the size information of the product can be obtained, the surface structure defect detection of the product can be realized, compared with the existing 2D visual technology, the detection mode based on the point cloud technology does not have the influence of ghost shadow, the detection precision of the size structure information of the product can be greatly improved, and the detection efficiency is improved. The accuracy of the quality inspection result is ensured, and large-scale and high-precision automatic quality inspection of products can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent detection technology, and in particular to a product quality inspection method, device and readable storage medium. Background Art

[0002] Cable refers to a wire product used to transmit electrical (magnetic) energy, information and realize electromagnetic energy conversion. Cable quality inspection refers to the process of testing and evaluating cables during the production process or as finished products to ensure that their quality meets specific standards and requirements. The purpose of cable quality inspection is to detect whether the cables have any defects or undesirable characteristics to ensure their reliability, safety and performance. Through cable quality inspection, manufacturers and users can ensure that the quality and performance of cable products meet expectations, reduce the risk of product failure, and improve safety and reliability of use. At the same time, quality inspection also helps to monitor quality control and improvement in the production process to ensure that cable products comply with relevant regulations and standards.

[0003] In cable quality inspection, appearance inspection is the most basic quality inspection step, which mainly measures curvature, diameter specifications and surface defects. Among the automated quality inspection methods, it currently mainly relies on 2D machine vision or dedicated wire diameter gauges. Among them, the method based on 2D machine vision often uses a high-speed camera to capture the cable image, and finally measures the pixel width in the image and further maps it to obtain its actual diameter. Dedicated wire diameter gauges often irradiate a rotating polygonal mirror with a semiconductor laser to obtain parallel light, which is then scanned to form a measurement distance. Finally, the outer diameter and other measurement values ​​are calculated by measuring the situation where the target object blocks the laser.

[0004] However, when using 2D machine vision for automated inspection, the imaging results often have serious afterimages due to the irregular jitter of the cable being inspected during high-speed movement, which directly leads to low diameter detection accuracy and seriously affects its use.

[0005] At the same time, during the data collection process, 2D machine vision or diameter gauges can only obtain the orthographic projection of the observed surface of the object to be inspected, and cannot detect the actual undulations of the observed surface in detail. Due to the lack of complete inspection data, there are also large errors in the curvature measurement of cables. When there are bulges, irregularities and other defects on the cable surface, the inspection accuracy is low, which is far from meeting the actual needs of manufacturers.

[0006] Therefore, the current cable appearance quality inspection method has certain defects. Summary of the invention

[0007] The technical problem to be solved by the present application is to provide a product quality inspection method, device and readable storage medium to solve the problems existing in the prior art in view of the above-mentioned deficiencies in the prior art.

[0008] In a first aspect, the present application provides a product quality inspection method, the method comprising:

[0009] S1. Acquire point cloud image data of the product to be inspected, wherein the point cloud image data includes point cloud data of the upper surface of the product and point cloud data of the lower surface of the product;

[0010] The point cloud data of the upper surface of the product is obtained by a first binocular image acquisition terminal, and the point cloud data of the lower surface of the product is obtained by a second binocular image acquisition terminal. The first binocular image acquisition terminal and the second binocular image acquisition terminal are relatively arranged around the product to be inspected;

[0011] S3. Perform data splicing based on the upper surface point cloud data of the product and the lower surface point cloud data of the product to obtain complete point cloud data of the product to be tested;

[0012] S4. Perform quality inspection based on the complete point cloud data to obtain the quality inspection result of the product to be inspected.

[0013] In some embodiments, it also includes:

[0014] S2. Determine the diameter of the product to be inspected based on the point cloud data of the upper surface of the product or the point cloud data of the lower surface of the product.

[0015] In some embodiments, determining the diameter of the product to be inspected according to the point cloud data of the upper surface of the product includes:

[0016] Acquire a first distance between a product center plane and a camera lens plane of the first binocular image acquisition terminal, wherein the product center plane is a plane where a product center point is located, and the product center plane is parallel to the camera lens plane;

[0017] Determine a first detection point and a second detection point in the point cloud data of the upper surface of the product, wherein the elevation values ​​of the first detection point and the second detection point are equal to the first distance, and the elevation value of the detection point between the first detection point and the second detection point is less than the first distance;

[0018] The distance between the first detection point and the second detection point is determined as the diameter of the product to be detected.

[0019] In some embodiments, determining the diameter of the product to be inspected according to the point cloud data of the lower surface of the product includes:

[0020] Acquire a second distance between a product center plane and a camera lens plane of the second binocular image acquisition terminal, wherein the product center plane is a plane where a product center point is located, and the product center plane is parallel to the camera lens plane;

[0021] Determine a third detection point and a fourth detection point in the point cloud data of the lower surface of the product, wherein the elevation values ​​of the third detection point and the fourth detection point are equal to the second distance, and the elevation value of the detection point between the third detection point and the fourth detection point is less than the second distance;

[0022] The distance between the third detection point and the fourth detection point is determined as the diameter of the product to be detected.

[0023] In some embodiments, S3 includes:

[0024] S31. Obtaining a third distance between the camera lens plane of the first binocular image acquisition terminal and the camera lens plane of the second binocular image acquisition terminal;

[0025] S32. Performing elevation transformation on the surface point cloud data of the product according to the third distance to obtain first transformed point cloud data, wherein the elevation value of the detection point in the first transformed point cloud data represents the distance between the detection point and the camera lens plane of the second binocular image acquisition terminal;

[0026] Alternatively, the point cloud data of the lower surface of the product is subjected to elevation transformation according to the third distance to obtain second transformed point cloud data, wherein the elevation value of the detection point in the second transformed point cloud data represents the distance between the detection point and the camera lens plane of the first binocular image acquisition terminal;

[0027] S33. Performing data splicing on the surface point cloud data of the product and the second transformed point cloud data according to the time series information of the point cloud data to obtain the complete point cloud data;

[0028] Alternatively, the point cloud data of the lower surface of the product and the first transformed point cloud data are spliced ​​according to the time series information of the point cloud data to obtain the complete point cloud data.

[0029] In some embodiments, S4 includes:

[0030] S41. Determine the curvature of the product to be detected according to the diameter of the product to be detected, the coordinate information of the detection points in the complete point cloud data, and the interval distance between adjacent detection points;

[0031] S42. If the curvature of the product to be inspected meets the preset requirement, determine that the quality inspection result of the product to be inspected is passed.

[0032] In some embodiments, the curvature of the product to be inspected is determined by the following formula:

[0033]

[0034] Wherein, L represents the curvature of the product to be detected, R represents the diameter of the product to be detected, Δd represents the interval distance between adjacent detection points, and z a Indicates the elevation value of the detection point in the surface point cloud data of the product, z b represents the elevation value of the detection point in the point cloud data after the second transformation, or, a represents the elevation value of the detection point in the point cloud data after the first transformation, z b It represents the elevation value of the detection point in the point cloud data of the lower surface of the product.

[0035] In some embodiments, S4 further includes:

[0036] The complete point cloud data is detected by a defect detection network model to obtain a defect detection result, wherein the defect detection network model is trained by defective product sample point cloud data;

[0037] If the defect detection result of the product to be detected meets the preset requirements, the quality inspection result of the product to be detected is determined to be passed.

[0038] In a second aspect, the present application provides a product quality inspection device, the device comprising:

[0039] A data acquisition module, which is configured to acquire point cloud image data of the product to be inspected, wherein the point cloud image data includes point cloud data of the upper surface of the product and point cloud data of the lower surface of the product;

[0040] The point cloud data of the upper surface of the product is obtained by a first binocular image acquisition terminal, and the point cloud data of the lower surface of the product is obtained by a second binocular image acquisition terminal. The first binocular image acquisition terminal and the second binocular image acquisition terminal are relatively arranged around the product to be inspected;

[0041] A data processing module, which is configured to perform data splicing based on the point cloud data of the upper surface of the product and the point cloud data of the lower surface of the product to obtain complete point cloud data of the product to be inspected;

[0042] The product quality inspection module is configured to perform quality inspection based on the complete point cloud data to obtain a quality inspection result of the product to be inspected.

[0043] In a third aspect, the present application provides a product quality inspection device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to implement the product quality inspection method described in the first aspect above.

[0044] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the product quality inspection method described in the first aspect is implemented.

[0045] The product quality inspection method, device and readable storage medium provided by the present application specifically obtain point cloud image data of a product to be inspected, wherein the point cloud image data includes point cloud data of the upper surface of the product and point cloud data of the lower surface of the product; wherein the point cloud data of the upper surface of the product is obtained by a first binocular image acquisition terminal, and the point cloud data of the lower surface of the product is obtained by a second binocular image acquisition terminal, and the first binocular image acquisition terminal and the second binocular image acquisition terminal are relatively arranged around the product to be inspected; data splicing is performed based on the point cloud data of the upper surface of the product and the point cloud data of the lower surface of the product to obtain complete point cloud data of the product to be inspected; quality inspection is performed based on the complete point cloud data to obtain a quality inspection result of the product to be inspected. This application uses a 3D line structured light measurement method and two sets of binocular image acquisition terminals to perform three-dimensional measurement of the product to be inspected, and then performs three-dimensional reconstruction and quality inspection processing based on the obtained point cloud data. It can not only obtain the size information of the product, but also realize the surface structure defect detection of the product. Compared with the existing 2D vision technology, the detection method based on point cloud technology in this application is not affected by afterimages, which can greatly improve the detection accuracy of product size and structure information, ensure the accuracy of quality inspection results, and help to realize large-scale, high-precision automated quality inspection of products. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0047] Figure 1 A schematic diagram of an application scenario of the technical solution of this application;

[0048] Figure 2 This is a schematic diagram of another application scenario of the technical solution of this application;

[0049] Figure 3 A flowchart of a product quality inspection method provided in an embodiment of the present application;

[0050] Figure 4 This is a schematic diagram of setting detection points in an embodiment of the present application;

[0051] Figure 5 This is a schematic diagram of determining the diameter of the product to be inspected according to the point cloud data of the upper surface of the product in an embodiment of the present application;

[0052] Figure 6This is a schematic diagram of determining the diameter of the product to be inspected according to the point cloud data of the lower surface of the product in an embodiment of the present application;

[0053] Figure 7 This is a schematic diagram of data splicing in an embodiment of the present application;

[0054] Figure 8 A schematic diagram of determining the elevation value of a detection point in an embodiment of the present application;

[0055] Fig. 9 A schematic diagram of the structure of a product quality inspection device provided in an embodiment of the present application;

[0056] Fig.10 A schematic diagram of the structure of another product quality inspection device provided in an embodiment of the present application.

[0057] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0058] In order to enable those skilled in the art to better understand the technical solution of the present application, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0059] It should be understood that the specific embodiments and drawings described herein are only used to explain the present application, rather than to limit the present application.

[0060] It can be understood that, in the absence of conflict, the various embodiments in the present application and the various features in the embodiments can be combined with each other.

[0061] It can be understood that, for the convenience of description, the drawings of the present application only show the parts related to the present application, while the parts unrelated to the present application are not shown in the drawings.

[0062] It can be understood that each unit and module involved in the embodiments of the present application may correspond to only one physical structure, or may be composed of multiple physical structures, or multiple units and modules may be integrated into one physical structure.

[0063] It can be understood that the terms "first", "second", etc. in the embodiments of the present application are used to distinguish different objects, or to distinguish different processing of the same object, rather than to describe a specific order of objects.

[0064] It is understandable that, in the absence of conflict, the functions and steps marked in the flowcharts and block diagrams of the present application may occur in an order different from that marked in the drawings.

[0065] It is understood that the flowcharts and block diagrams of the present application illustrate the possible architectures, functions, and operations of the systems, devices, equipment, and methods according to the various embodiments of the present application. Among them, each box in the flowchart or block diagram may represent a unit, module, program segment, code, which contains executable instructions for implementing the specified functions. Moreover, each box or combination of boxes in the block diagram and flowchart may be implemented by a hardware-based system that implements the specified functions, or by a combination of hardware and computer instructions.

[0066] It can be understood that the units and modules involved in the embodiments of the present application can be implemented by software or hardware, for example, the units and modules can be located in a processor.

[0067] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0068] The present application provides a product quality inspection method, the working process of which can be implemented by electronic devices, such as computers, handheld smart terminals, etc. For the convenience of explanation, the method execution subject is described as a computer in each embodiment of the present application.

[0069] The product quality inspection method provided in this application can be applied to the quality inspection of cylindrical products with regular and uniform dimensions, such as cables, water pipes, etc. This application does not limit the specific type of product.

[0070] Figure 1 This is a schematic diagram of the application scenario of the technical solution of this application, such as Figure 1 As shown, the present application sets two sets of binocular image acquisition terminals to complete the acquisition of 3D point cloud data of the product to be inspected in the form of line structured light. The two sets of binocular image acquisition terminals are relatively arranged around the product to be inspected, thereby achieving full coverage acquisition of the product surface. For example, the two sets of binocular image acquisition terminals are respectively arranged above and below the product to be inspected, or at other two relative positions. The product to be inspected can be arranged according to Figure 1 The product moves in the direction of motion shown in the figure, thereby enabling quality inspection of all surfaces of the product.

[0071] In addition, the binocular image acquisition terminal is equipped with a communication module to ensure that the binocular image acquisition terminal can communicate with the data processing equipment. For example, the binocular image acquisition terminal can be connected to the computer through a 4G / 5G communication module. After collecting the 3D point cloud data of the product, the binocular image acquisition terminal sends the 3D point cloud data to the computer, so that the computer can implement the product quality inspection process through the method of the present application.

[0072] Optionally, the binocular image acquisition terminal may also be equipped with a processor, which can implement the product quality inspection process through the method of the present application, and then send the quality inspection results to other devices.

[0073] Figure 2 This is another application scenario diagram of the technical solution of this application, such as Figure 2 As shown, the technical solution of the present application can also perform quality inspection on multiple products at the same time, that is, multiple products to be inspected can be placed simultaneously in the detection area of ​​the binocular image acquisition terminal, so that 3D point cloud data of multiple products to be inspected can be collected simultaneously by the binocular image acquisition terminal and transmitted to the computer for quality inspection.

[0074] Figure 3 A schematic diagram of a product quality inspection method provided in an embodiment of the present application, such as Figure 3 As shown, the present application provides a product quality inspection method, the method comprising:

[0075] S1. Acquire point cloud image data of the product to be inspected, wherein the point cloud image data includes point cloud data of the upper surface of the product and point cloud data of the lower surface of the product;

[0076] Among them, the point cloud data of the upper surface of the product is obtained through the first binocular image acquisition terminal, and the point cloud data of the lower surface of the product is obtained through the second binocular image acquisition terminal. The first binocular image acquisition terminal and the second binocular image acquisition terminal are relatively arranged around the product to be inspected; for example, the first binocular image acquisition terminal and the second binocular image acquisition terminal are respectively arranged above and below the product to be inspected, or at other two relative positions, as long as full coverage of the product surface can be achieved.

[0077] Specifically, when collecting point cloud data, the first binocular image acquisition terminal and the second binocular image acquisition terminal may first set a plurality of detection points in the detection area, and the plurality of detection points may be arranged at fixed intervals on the surface of the product to be detected.

[0078] For example, Figure 4 Schematic diagram of setting detection points in the embodiment of the present application, such as Figure 4As shown, the product center plane is the plane where the product center point is located. The pure black dots in the figure represent multiple detection points set by the first binocular image acquisition terminal on the upper surface of the product to be detected, and the pure white dots represent multiple detection points set by the second binocular image acquisition terminal on the lower surface of the product to be detected. The dots with patterns represent detection points located on the product center plane. The detection points located on the product center plane can be identified as the common detection points of the first binocular image acquisition terminal and the second binocular image acquisition terminal. Multiple detection points are arranged at a fixed interval Δd, and Δd can be, for example, 0.1mm, 0.2mm or other values.

[0079] refer to Figure 4 The point cloud data collected by the first binocular image acquisition terminal is the coordinate data of the pure black dots and the dots with patterns in the figure. The coordinate data takes the first binocular image acquisition terminal as the coordinate system reference, and the coordinate data includes the elevation value from the detection point to the camera lens plane of the first binocular image acquisition terminal.

[0080] The point cloud data collected by the second binocular image acquisition terminal is the coordinate data of the pure white dots and the patterned dots in the figure. The coordinate data is based on the second binocular image acquisition terminal as the coordinate system reference, and the coordinate data includes the elevation value from the detection point to the camera lens plane of the second binocular image acquisition terminal.

[0081] Optionally, the computer obtains point cloud image data of the product to be inspected sent by the binocular image acquisition terminal. The point cloud image data of the product to be inspected may be real-time data acquired by the binocular image acquisition terminal or non-real-time data, which is not limited in the present application.

[0082] S3. Perform data splicing based on the upper surface point cloud data of the product and the lower surface point cloud data of the product to obtain complete point cloud data of the product to be tested;

[0083] In the point cloud image data, the product upper surface point cloud data includes the elevation value of the detection point on the product upper surface, and the elevation value represents the elevation value from the detection point to the camera lens plane of the first binocular image acquisition terminal. In addition, the product lower surface point cloud data includes the elevation value of the detection point on the product lower surface, and the elevation value represents the elevation value from the detection point to the camera lens plane of the second binocular image acquisition terminal.

[0084] After obtaining the product upper surface point cloud data and the product lower surface point cloud data, in order to facilitate data processing, the computer splices the product upper surface point cloud data and the product lower surface point cloud data to obtain the complete point cloud data of the product to be inspected.

[0085] Optionally, the coordinate system references corresponding to the product upper surface point cloud data and the product lower surface point cloud data are different. Therefore, the data stitching process may include a coordinate conversion process, thereby ensuring that the coordinate systems of the two point cloud data are consistent.

[0086] S4. Perform quality inspection based on the complete point cloud data to obtain the quality inspection result of the product to be inspected.

[0087] After obtaining the complete point cloud data of the product to be inspected, the computer can perform quality inspection based on the complete point cloud data to obtain the quality inspection result of the product to be inspected. The quality inspection result can be passed or failed. For failed products, the computer can send a prompt message to remind relevant personnel to handle it.

[0088] The present application provides a product quality inspection method, which uses a 3D line structured light measurement method and two sets of binocular image acquisition terminals to perform three-dimensional measurement of the product to be inspected, and then performs three-dimensional reconstruction and quality inspection processing based on the obtained point cloud data. Not only can the size information of the product be obtained, but also the surface structure defect detection of the product can be realized. Compared with the existing 2D vision technology, the detection method based on point cloud technology of the present application is not affected by residual images, which can greatly improve the detection accuracy of product size structure information, ensure the accuracy of quality inspection results, and help to realize large-scale, high-precision automated quality inspection of products.

[0089] In some embodiments, the method further includes: S2. determining the diameter of the product to be inspected based on the point cloud data of the upper surface of the product or the point cloud data of the lower surface of the product.

[0090] For cylindrical products, the product diameter is an important dimensional information. Therefore, the method of the present application also determines the diameter of the product to be inspected based on the point cloud data of the upper surface of the product or the point cloud data of the lower surface of the product. The obtained diameter measurement result can be used to determine whether the product size meets the specification requirements.

[0091] In some embodiments, determining the diameter of the product to be inspected according to the point cloud data of the upper surface of the product includes:

[0092] S211. Obtain a first distance between a product center plane and a camera lens plane of the first binocular image acquisition terminal, wherein the product center plane is a plane where a product center point is located, and the product center plane is parallel to the camera lens plane;

[0093] S212. Determine a first detection point and a second detection point in the surface point cloud data of the product, wherein the elevation values ​​of the first detection point and the second detection point are equal to the first distance, and the elevation value of the detection point between the first detection point and the second detection point is less than the first distance;

[0094] S213. Determine the distance between the first detection point and the second detection point as the diameter of the product to be detected.

[0095] Specifically, Figure 5 Schematic diagram of determining the diameter of the product to be inspected according to the point cloud data on the upper surface of the product in the embodiment of the present application, as shown in Figure 5 As shown, the first distance between the center plane of the product and the camera lens plane of the first binocular image acquisition terminal is d1, and the elevation values ​​of the detection points P1, P2, P3, and P4 in the figure are equal to the first distance d1. According to the determination conditions of the above-mentioned first detection point and the second detection point, it can be determined that point P1 is the first detection point and point P2 is the second detection point; or, point P2 is the first detection point and point P1 is the second detection point; or, point P3 is the first detection point and point P4 is the second detection point; or, point P4 is the first detection point and point P3 is the second detection point.

[0096] After determining the first detection point and the second detection point, the distance between them is the diameter R of the product to be detected, that is:

[0097] R=D P1-P2 =D P3-P4

[0098] Based on the above conditions and calculation process, the diameter of the product to be inspected can be accurately calculated to avoid calculation errors (for example, if point P2 is the first inspection point and point P3 is the second inspection point, it will lead to an error in the diameter calculation result).

[0099] Optional, for Figure 5 Other test points whose mid-elevation value is equal to the first distance d1 but do not meet the determination conditions of the first test point and the second test point can be considered as boundary points or test points where there is no cable on the center surface of the product, that is, invalid points. Such test points can be directly discarded to reduce the amount of data. For example, Figure 5 The detection points between the detection points P2 and P3 can be considered as invalid points and can be directly discarded to reduce the amount of data and reduce the calculation pressure.

[0100] In some embodiments, determining the diameter of the product to be inspected according to the point cloud data of the lower surface of the product includes:

[0101] S221. Obtain a second distance between the product center plane and the camera lens plane of the second binocular image acquisition terminal, wherein the product center plane is a plane where the product center point is located, and the product center plane is parallel to the camera lens plane;

[0102] S222. Determine a third detection point and a fourth detection point in the point cloud data of the lower surface of the product, wherein the elevation values ​​of the third detection point and the fourth detection point are equal to the second distance, and the elevation value of the detection point between the third detection point and the fourth detection point is less than the second distance;

[0103] S223. Determine the distance between the third detection point and the fourth detection point as the diameter of the product to be detected.

[0104] Specifically, Figure 6 Schematic diagram of determining the diameter of the product to be inspected according to the point cloud data of the lower surface of the product in the embodiment of the present application, as shown in Figure 6 As shown, the second distance between the center plane of the product and the camera lens plane of the second binocular image acquisition terminal is d2, and the elevation values ​​of the detection points P5, P6, P7, and P8 in the figure are equal to the second distance d2. According to the determination conditions of the third detection point and the fourth detection point, it can be determined that point P5 is the third detection point and point P6 is the fourth detection point; or, point P6 is the third detection point and point P5 is the fourth detection point; or, point P7 is the third detection point and point P8 is the fourth detection point; or, point P8 is the third detection point and point P7 is the fourth detection point.

[0105] After determining the third detection point and the fourth detection point, the distance between them is the diameter R of the product to be detected, that is:

[0106] R=D P5-P6 =D P7-P8

[0107] Based on the above conditions and calculation process, the diameter of the product to be inspected can be accurately calculated to avoid calculation errors (for example, if point P6 is the third inspection point and point P7 is the fourth inspection point, it will lead to an error in the diameter calculation result).

[0108] Optional, for Figure 6 Other test points whose mid-elevation value is equal to the second distance d2 but do not meet the determination conditions of the third and fourth test points can be considered as boundary points or test points where there is no cable on the center surface of the product, that is, invalid points. Such test points can be directly discarded to reduce the amount of data. For example, Figure 6 The detection points between the detection point P6 and the detection point P7 can be considered as invalid points and can be directly discarded to reduce the amount of data and reduce the calculation pressure.

[0109] In some embodiments, S3 performs data splicing based on the product upper surface point cloud data and the product lower surface point cloud data to obtain complete point cloud data of the product to be inspected, including:

[0110] S31. Obtaining a third distance between the camera lens plane of the first binocular image acquisition terminal and the camera lens plane of the second binocular image acquisition terminal;

[0111] S32. Performing elevation transformation on the surface point cloud data of the product according to the third distance to obtain first transformed point cloud data, wherein the elevation value of the detection point in the first transformed point cloud data represents the distance between the detection point and the camera lens plane of the second binocular image acquisition terminal;

[0112] Alternatively, the point cloud data of the lower surface of the product is subjected to elevation transformation according to the third distance to obtain second transformed point cloud data, wherein the elevation value of the detection point in the second transformed point cloud data represents the distance between the detection point and the camera lens plane of the first binocular image acquisition terminal;

[0113] S33. Performing data splicing on the surface point cloud data of the product and the second transformed point cloud data according to the time series information of the point cloud data to obtain the complete point cloud data;

[0114] Alternatively, the point cloud data of the lower surface of the product and the first transformed point cloud data are spliced ​​according to the time series information of the point cloud data to obtain the complete point cloud data.

[0115] Specifically, Figure 7 Schematic diagram of data splicing in the embodiment of the present application, such as Figure 7 As shown, the third distance between the camera lens plane of the first binocular image acquisition terminal and the camera lens plane of the second binocular image acquisition terminal is d3, and d3=d1+d2, and the coordinates of any detection point P9 in the point cloud data of the upper surface of the product are (X1, Y1, Z1), where Z1 represents the elevation value from P9 to the camera lens plane of the first binocular image acquisition terminal. The coordinates of any detection point P10 in the point cloud data of the lower surface of the product are (X2, Y2, Z2), where Z2 represents the elevation value from P10 to the camera lens plane of the second binocular image acquisition terminal.

[0116] Since the coordinate system references corresponding to the upper surface point cloud data and the lower surface point cloud data of the product are different, in order to ensure the consistency of the coordinate system, the point cloud data needs to be converted into a coordinate system. Specifically, the X-axis coordinate and the Y-axis coordinate of the detection point are kept unchanged, and the converted Z-axis coordinate Z′ is:

[0117] Z′=d3-Z

[0118] For example, the coordinates of P9 are (X1, Y1, Z1), where Z1 represents the elevation value from P9 to the camera lens plane of the first binocular image acquisition terminal. After elevation conversion of P9, the converted coordinates are (X1, Y1, d3-Z1). At this time, the converted Z-axis coordinate d3-Z1 of P9 represents the elevation value from P9 to the camera lens plane of the second binocular image acquisition terminal.

[0119] Similarly, the coordinates of P10 are (X2, Y2, Z2), where Z2 represents the elevation value from P10 to the camera lens plane of the second binocular image acquisition terminal. After elevation conversion of P10, the converted coordinates are (X2, Y2, d3-Z2). At this time, the converted Z-axis coordinate d3-Z2 of P10 represents the elevation value from P10 to the camera lens plane of the first binocular image acquisition terminal.

[0120] After the elevation conversion, the converted point cloud data is consistent with the coordinate system benchmark of another unconverted point cloud data. At this time, the complete point cloud data can be obtained by data splicing.

[0121] In some embodiments, S4 performs quality inspection according to the complete point cloud data to obtain the quality inspection result of the product to be inspected, including:

[0122] S41. Determine the curvature of the product to be detected according to the diameter of the product to be detected, the coordinate information of the detection points in the complete point cloud data, and the interval distance between adjacent detection points;

[0123] S42. If the curvature of the product to be inspected meets the preset requirement, determine that the quality inspection result of the product to be inspected is passed.

[0124] Specifically, the curvature of the product to be tested is determined by the following formula:

[0125]

[0126] Wherein, L represents the curvature of the product to be detected, R represents the diameter of the product to be detected, Δd represents the interval distance between adjacent detection points, and z a Indicates the elevation value of the detection point in the surface point cloud data of the product, z b represents the elevation value of the detection point in the point cloud data after the second transformation, or, a represents the elevation value of the detection point in the point cloud data after the first transformation, z b It represents the elevation value of the detection point in the point cloud data of the lower surface of the product.

[0127] This step performs curvature testing on the product to ensure that the product curvature meets the preset requirements, thereby completing the curvature quality inspection process of the product.

[0128] In some embodiments, S4 performs quality inspection according to the complete point cloud data to obtain the quality inspection result of the product to be inspected, and further includes:

[0129] The complete point cloud data is detected by a defect detection network model to obtain a defect detection result, wherein the defect detection network model is trained by defective product sample point cloud data;

[0130] If the defect detection result of the product to be detected meets the preset requirements, the quality inspection result of the product to be detected is determined to be passed.

[0131] Specifically, product defects include scratches, surface bumps, etc., and the sample point cloud data of defective products includes sample point cloud data of products with the above defects. By training the model with the sample point cloud data of defective products, a defect detection network model can be obtained. The defect detection network model can be used to identify the point cloud data to determine whether the point cloud data contains defects, thereby completing the defect inspection of the product.

[0132] In some embodiments, a process of determining an elevation value from a detection point to a camera lens plane of a binocular image acquisition terminal is explained.

[0133] Figure 8 Schematic diagram of determining the elevation value of the detection point in the embodiment of the present application, as shown in Figure 8 As shown, the second binocular image acquisition terminal is used as an example for explanation.

[0134] Assuming that the parallax of the detection point Pi in the left and right images formed by the second binocular image acquisition terminal is diff, the center / focus distance between the left and right cameras is M, and the focal length of the camera is f, then the elevation value Zi from Pi to the camera lens plane of the second binocular image acquisition terminal is:

[0135]

[0136] diff=N1+N2

[0137] It should be understood that, although the various steps in the flowcharts in the above-described embodiments are sequentially displayed according to the indications of the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and they can be executed in other orders. Moreover, at least a portion of the steps in the figure may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily to be carried out sequentially, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0138] Fig. 9 A schematic diagram of a product quality inspection device provided in an embodiment of the present application, such as Fig. 9 As shown, the present application provides a product quality inspection device, the device comprising:

[0139] A data acquisition module 11, which is configured to acquire point cloud image data of the product to be inspected, wherein the point cloud image data includes point cloud data of the upper surface of the product and point cloud data of the lower surface of the product;

[0140] The point cloud data of the upper surface of the product is obtained by a first binocular image acquisition terminal, and the point cloud data of the lower surface of the product is obtained by a second binocular image acquisition terminal. The first binocular image acquisition terminal and the second binocular image acquisition terminal are relatively arranged around the product to be inspected;

[0141] A data processing module 12, which is configured to perform data splicing based on the upper surface point cloud data of the product and the lower surface point cloud data of the product to obtain complete point cloud data of the product to be inspected;

[0142] The product quality inspection module 13 is configured to perform quality inspection based on the complete point cloud data to obtain a quality inspection result of the product to be inspected.

[0143] The present application provides a product quality inspection device, which uses a 3D line structured light measurement method and two sets of binocular image acquisition terminals to perform three-dimensional measurement of the product to be inspected, and then performs three-dimensional reconstruction and quality inspection processing based on the obtained point cloud data. Not only can the size information of the product be obtained, but also the surface structure defect detection of the product can be realized. Compared with the existing 2D vision technology, the detection method based on point cloud technology of the present application is not affected by residual images, which can greatly improve the detection accuracy of product size structure information, ensure the accuracy of quality inspection results, and help to realize large-scale, high-precision automated quality inspection of products.

[0144] Regarding the limitation on the product quality inspection device, reference may be made to the limitation on the product quality inspection method in the above-mentioned embodiments of the present application, which will not be elaborated in this embodiment.

[0145] Fig.10 Another schematic diagram of a product quality inspection device provided in an embodiment of the present application is shown in FIG. Fig.10 As shown, in some embodiments, the present application provides a product quality inspection device, including a memory 22 and a processor 21, the memory stores a computer program, and the processor is configured to run the computer program to execute the product quality inspection method in the above-mentioned embodiments of the present application.

[0146] The memory is connected to the processor, the memory may be a flash memory or a read-only memory or other memory, and the processor may be a central processing unit or a single-chip microcomputer.

[0147] In some embodiments, the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the product quality inspection method in the above-mentioned embodiments of the present application is implemented.

[0148] The computer-readable storage medium includes volatile or non-volatile, removable or non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, computer program modules or other data). Computer-readable storage media include, but are not limited to, RAM (Random Access Memory), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable read only memory), flash memory or other memory technology, CD-ROM (Compact Disc Read-Only Memory), digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer.

[0149] It is to be understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of the present application, but the present application is not limited thereto. For those skilled in the art, various modifications and improvements can be made without departing from the spirit and substance of the present application, and these modifications and improvements are also considered to be within the scope of protection of the present application.

Claims

1. A product quality inspection method, characterized in that: The method comprises: S1. Acquire point cloud image data of the product to be inspected, wherein the point cloud image data includes point cloud data of the upper surface of the product and point cloud data of the lower surface of the product; The point cloud data of the upper surface of the product is obtained by a first binocular image acquisition terminal, and the point cloud data of the lower surface of the product is obtained by a second binocular image acquisition terminal. The first binocular image acquisition terminal and the second binocular image acquisition terminal are relatively arranged around the product to be inspected; S3. Perform data splicing based on the upper surface point cloud data of the product and the lower surface point cloud data of the product to obtain complete point cloud data of the product to be tested; S4. Perform quality inspection based on the complete point cloud data to obtain the quality inspection result of the product to be inspected.

2. The product quality inspection method according to claim 1, characterized in that: Also includes: S2. Determine the diameter of the product to be inspected based on the point cloud data of the upper surface of the product or the point cloud data of the lower surface of the product.

3. The product quality inspection method according to claim 2, characterized in that: Determining the diameter of the product to be inspected according to the point cloud data of the upper surface of the product includes: Acquire a first distance between a product center plane and a camera lens plane of the first binocular image acquisition terminal, wherein the product center plane is a plane where a product center point is located, and the product center plane is parallel to the camera lens plane; Determine a first detection point and a second detection point in the point cloud data of the upper surface of the product, wherein the elevation values ​​of the first detection point and the second detection point are equal to the first distance, and the elevation value of the detection point between the first detection point and the second detection point is less than the first distance; The distance between the first detection point and the second detection point is determined as the diameter of the product to be detected.

4. The product quality inspection method according to claim 2, characterized in that: Determining the diameter of the product to be inspected according to the point cloud data of the lower surface of the product includes: Acquire a second distance between a product center plane and a camera lens plane of the second binocular image acquisition terminal, wherein the product center plane is a plane where a product center point is located, and the product center plane is parallel to the camera lens plane; Determine a third detection point and a fourth detection point in the point cloud data of the lower surface of the product, wherein the elevation values ​​of the third detection point and the fourth detection point are equal to the second distance, and the elevation value of the detection point between the third detection point and the fourth detection point is less than the second distance; The distance between the third detection point and the fourth detection point is determined as the diameter of the product to be detected.

5. The product quality inspection method according to claim 2, characterized in that: S3, including: S31. Obtaining a third distance between the camera lens plane of the first binocular image acquisition terminal and the camera lens plane of the second binocular image acquisition terminal; S32. Performing elevation transformation on the surface point cloud data of the product according to the third distance to obtain first transformed point cloud data, wherein the elevation value of the detection point in the first transformed point cloud data represents the distance between the detection point and the camera lens plane of the second binocular image acquisition terminal; Alternatively, the point cloud data of the lower surface of the product is subjected to elevation transformation according to the third distance to obtain second transformed point cloud data, wherein the elevation value of the detection point in the second transformed point cloud data represents the distance between the detection point and the camera lens plane of the first binocular image acquisition terminal; S33. Performing data splicing on the surface point cloud data of the product and the second transformed point cloud data according to the time series information of the point cloud data to obtain the complete point cloud data; Alternatively, the point cloud data of the lower surface of the product and the first transformed point cloud data are spliced ​​according to the time series information of the point cloud data to obtain the complete point cloud data.

6. The product quality inspection method according to claim 5, characterized in that: S4, including: S41. Determine the curvature of the product to be detected according to the diameter of the product to be detected, the coordinate information of the detection points in the complete point cloud data, and the interval distance between adjacent detection points; S42. If the curvature of the product to be inspected meets the preset requirement, determine that the quality inspection result of the product to be inspected is passed.

7. The product quality inspection method according to claim 6, characterized in that: The curvature of the product to be tested is determined by the following formula: Wherein, L represents the curvature of the product to be detected, R represents the diameter of the product to be detected, Δd represents the interval distance between adjacent detection points, and z a Indicates the elevation value of the detection point in the surface point cloud data of the product, z b represents the elevation value of the detection point in the point cloud data after the second transformation, or, a represents the elevation value of the detection point in the point cloud data after the first transformation, z b It represents the elevation value of the detection point in the point cloud data of the lower surface of the product.

8. The product quality inspection method according to any one of claims 1 to 7, characterized in that: S4, also includes: The complete point cloud data is detected by a defect detection network model to obtain a defect detection result, wherein the defect detection network model is trained by defective product sample point cloud data; If the defect detection result of the product to be detected meets the preset requirements, the quality inspection result of the product to be detected is determined to be passed.

9. A product quality inspection device, characterized in that: The device comprises: A data acquisition module, which is configured to acquire point cloud image data of the product to be inspected, wherein the point cloud image data includes point cloud data of the upper surface of the product and point cloud data of the lower surface of the product; The point cloud data of the upper surface of the product is obtained by a first binocular image acquisition terminal, and the point cloud data of the lower surface of the product is obtained by a second binocular image acquisition terminal. The first binocular image acquisition terminal and the second binocular image acquisition terminal are relatively arranged around the product to be inspected; A data processing module, which is configured to perform data splicing based on the point cloud data of the upper surface of the product and the point cloud data of the lower surface of the product to obtain complete point cloud data of the product to be inspected; The product quality inspection module is configured to perform quality inspection based on the complete point cloud data to obtain a quality inspection result of the product to be inspected.

10. A product quality inspection device, characterized in that: It comprises a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to implement the product quality inspection method according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the product quality inspection method according to any one of claims 1 to 8 is implemented.