Three-dimensional vision detection method and device, electronic equipment and computer readable storage medium

By acquiring point cloud data of each component in a 3D structure, determining depth thresholds and type information, and generating template information, the problem of low efficiency in manual inspection in existing technologies is solved, and efficient and accurate automated inspection is achieved.

CN116168160BActive Publication Date: 2026-03-27LCFC HEFEI ELECTRONICS TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-24
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing 3D vision inspection methods rely on manual operation, resulting in high labor and time costs, and making it difficult to efficiently and accurately inspect multiple components in a 3D structure.

Method used

By acquiring point cloud data of each component in a 3D structure, determining depth threshold information and component type information, generating template information, and using corresponding detection algorithms for automated detection.

Benefits of technology

It improves the efficiency and accuracy of 3D vision inspection, reduces manual intervention, lowers costs, and achieves highly efficient automated inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116168160B_ABST
    Figure CN116168160B_ABST
Patent Text Reader

Abstract

The application provides a three-dimensional visual detection method and device, electronic equipment and computer readable storage medium; the method comprises the following steps: for each component in a three-dimensional structure, acquiring first point cloud data corresponding to the component; determining the depth threshold information and the component type information of the component according to the first point cloud data; determining the template information of the three-dimensional structure according to the depth threshold information and the component type information of all components; when performing three-dimensional visual detection on the three-dimensional structure, loading the template information of the three-dimensional structure, and using the detection algorithm corresponding to the component type information of each component in the template information to detect the component according to the component type information. The three-dimensional visual detection method provided by the application can improve the accuracy of three-dimensional visual detection, improve the efficiency of three-dimensional visual detection, and avoid the consumption of manpower and time cost caused by artificial visual detection in the traditional way.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of three-dimensional vision detection, and in particular to a three-dimensional vision detection method and device, electronic equipment and a computer readable storage medium. BACKGROUND

[0002] Currently, in the three-dimensional structure of electronic equipment, the commonly used three-dimensional vision detection method is a manual detection method based on three-dimensional point cloud data, that is, the point cloud data of the attached components in the three-dimensional structure of the electronic equipment is framed by a manual method, and the detection standard and other information are input based on the point cloud data, so as to complete the three-dimensional vision detection. However, when a large number of attached components need to be detected in the three-dimensional structure, this method will consume a large amount of labor cost and time cost. SUMMARY

[0003] The three-dimensional vision detection method and device, electronic equipment and computer readable storage medium provided by the present application embodiment can avoid the consumption of labor and time cost caused by artificial vision detection when performing three-dimensional vision detection in the traditional way, improve the efficiency of three-dimensional vision detection, and obtain the depth threshold information and component type information of each component based on the first point cloud data corresponding to each component in the three-dimensional structure, so as to perform three-dimensional vision detection on the three-dimensional structure and improve the accuracy of three-dimensional vision detection.

[0004] The technical scheme of the present application embodiment is as follows:

[0005] In a first aspect, the present application provides a three-dimensional vision detection method, comprising:

[0006] For each component in the three-dimensional structure, obtaining first point cloud data corresponding to the component;

[0007] According to the first point cloud data, determining the depth threshold information and component type information of the component;

[0008] According to the depth threshold information and component type information of all components, determining the template information of the three-dimensional structure; when performing three-dimensional vision detection on the three-dimensional structure, loading the template information of the three-dimensional structure, and using the detection algorithm corresponding to the component type information of each component in the template information to detect the component according to the component type information.

[0009] In the above scheme, the first point cloud data corresponding to each component in the three-dimensional structure is obtained, comprising:

[0010] Obtaining a design document in a preset format corresponding to the three-dimensional structure;

[0011] Converting the design document into a point cloud data file;

[0012] obtain the first point cloud data based on the point cloud data file;

[0013] The first point cloud data comprises three-dimensional coordinate information of each point cloud data and annotation information of the component.

[0014] In the above scheme, the depth threshold information and the component type information of the component are determined according to the first point cloud data, comprising:

[0015] obtaining a first depth value of each point cloud data in the first point cloud data in a first direction;

[0016] determining a mean value of a product between the first depth value and a preset first parameter value as the depth threshold information.

[0017] In the above scheme, the depth threshold information and the component type information of the component are determined according to the first point cloud data, comprising:

[0018] obtaining a maximum depth value of the first point cloud data in the first direction;

[0019] obtaining second point cloud data adjacent to the point cloud data on the contour of the component;

[0020] determining a first variance between the component and the second point cloud data according to the maximum depth value and a depth value of the second point cloud data;

[0021] determining the component type information of the component according to a value of the first variance, the component type information being used to represent an attachment type of the component in the three-dimensional structure.

[0022] In the above scheme, the first variance between the component and the first point cloud data is determined according to the maximum depth value and the depth value of the second point cloud data, comprising:

[0023] determining a first mean value of a difference between the maximum depth value and the depth value of the second point cloud data;

[0024] determining a cumulative sum after square operation of a difference between the maximum depth value and the depth value of each second point cloud data, and subtracting the first mean value from the difference, as the first variance.

[0025] In the above scheme, the component type information of the component is determined according to the value of the first variance, comprising:

[0026] if the value of the first variance is greater than a preset variance threshold, the component type information is determined as a first type;

[0027] If the value of the first variance is less than or equal to the preset variance threshold, the component type information is determined as a second type.

[0028] In the foregoing solution, the template information of the three-dimensional structure is determined according to the depth threshold information and the component type information of all components, and includes:

[0029] For the first point cloud data corresponding to each component, the three-dimensional coordinate information of each point cloud data, the annotation information of the component, the depth threshold information of the component, and the component type information of the component are collectively encapsulated as the template information of the component.

[0030] The template information of the three-dimensional structure is determined based on the template information of all components.

[0031] In a second aspect, an embodiment of the present application provides a three-dimensional visual detection device, which includes:

[0032] A point cloud acquisition module is configured to acquire first point cloud data corresponding to each component in a three-dimensional structure.

[0033] A component information module is configured to determine depth threshold information and component type information of the component according to the first point cloud data.

[0034] A three-dimensional visual detection module is configured to determine template information of the three-dimensional structure according to the depth threshold information and the component type information of all components, and load the template information of the three-dimensional structure when performing three-dimensional visual detection on the three-dimensional structure, and perform component detection according to the component type information of each component in the template information and using a detection algorithm corresponding to the component type information.

[0035] In a third aspect, an embodiment of the present application provides an electronic device, which includes at least one processor, and a memory connected with the at least one processor in communication; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the three-dimensional visual detection method provided by the embodiment of the present application.

[0036] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, which includes a set of computer executable instructions, and the instructions are executed to perform the three-dimensional visual detection method provided by the embodiment of the present application.

[0037] The three-dimensional visual detection method provided by the embodiment of the application comprises the following steps: acquiring first point cloud data corresponding to each component in a three-dimensional structure; determining depth threshold information and component type information of the component according to the first point cloud data; and performing three-dimensional visual detection on the three-dimensional structure according to the depth threshold information and the component type information of all components. The three-dimensional visual detection method provided by the application can avoid the consumption of manpower and time cost caused by a large number of manual frame selections and frequent parameter settings in the traditional mode, improve the efficiency of three-dimensional visual detection, and at the same time, the depth threshold information and the component type information of each component are acquired based on the first point cloud data corresponding to each component in the three-dimensional structure, so that the three-dimensional visual detection is performed on the three-dimensional structure, and the accuracy of the three-dimensional visual detection is improved. BRIEF DESCRIPTION OF DRAWINGS

[0038] The accompanying drawings are used to better understand the scheme, but do not constitute a limitation on the application. Among them:

[0039] Figure 1 is an optional processing flow diagram of the three-dimensional visual detection method provided by the embodiment of the application;

[0040] Figure 2 is a schematic diagram of a three-dimensional structure provided by the embodiment of the application;

[0041] Figure 3 is an effect diagram of component type information provided by the embodiment of the application;

[0042] Figure 4 is a file conversion schematic diagram provided by the embodiment of the application;

[0043] Figure 5 is an optional structure schematic diagram of a three-dimensional visual detection device provided by the embodiment of the application;

[0044] Figure 6 is an optional electronic device schematic diagram provided by the embodiment of the application. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical scheme and advantages of the application more clear, the application will be further described in detail below with reference to the drawings, and the described embodiments should not be regarded as a limitation on the application. All other embodiments obtained by a person skilled in the art without creative labor are within the scope of protection of the application.

[0046] In the following description, "some embodiments" are described, which describe a subset of all possible embodiments, but it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict.

[0047] In the following description, the terms "first\second" are merely distinguished similar objects, and do not represent the specific order of the objects. Understandably, the "first\second" can be interchanged with the specific order or sequence as allowed, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein.

[0048] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing the embodiments of the present application only and is not intended to limit the present application.

[0049] A three-dimensional visual detection method provided by the embodiments of the present application will be described below. Referring to Figure 1 , Figure 1 is a schematic diagram of an optional processing flow of the three-dimensional visual detection method provided by the embodiments of the present application, which will be described below in combination with steps S101-S103 shown in Figure 1 .

[0050] In step S101, for each component in the three-dimensional structure, first point cloud data corresponding to the component is obtained.

[0051] In some embodiments, the design document of the three-dimensional structure of the electronic device can be read based on CAD (Computer Aided Design) drawing software, such as a file in STP format (a format of a three-dimensional graphics file). The STP file contains the three-dimensional structure of the entire electronic device, such as the internal structure of a notebook computer, and the point cloud information of each component in the three-dimensional structure. For example, Figure 2 is a schematic diagram of a component in a three-dimensional structure such as the internal structure of a notebook computer. As an example, the attachment position of the component can be in the position area indicated by label ① and label ②, can be in the position area indicated by label ③ and label ④, or other component attachment areas in the three-dimensional structure.

[0052] In some embodiments, the STP file conforms to the ISO-10303-21 protocol, and the ISO-10303-21 protocol can be converted into the format of a PCD (Point Cloud Date) file in the format of <x, y, z, lable>, so as to realize reading of each point cloud data in the point cloud information contained in the STP file. Wherein, <x, y, z> is three-dimensional coordinate information of each point cloud data, and if in a three-dimensional coordinate system, the X axis represents the horizontal direction of the three-dimensional coordinate system, the Y axis represents the vertical direction of the three-dimensional coordinate system, and the Z axis represents the depth direction of the three-dimensional coordinate system, then x represents the coordinate value of each point cloud data in the x axis direction, y represents the coordinate value of each point cloud data in the y axis direction, and z represents the coordinate value of each point cloud data in the z axis direction, and z is also the depth value of the point cloud data. Lable is the labeling information of the part where each point cloud data is located, wherein lable[i] corresponds to a part numbered i in a three-dimensional structure. In the three-dimensional structure, each part has a unique number.

[0053] As an example, Figure 4 The left side is a schematic diagram of the STP file in binary form, wherein the DATA part stores all information of the three-dimensional structure. Figure 4 The right side is a schematic diagram of the converted PCD file in binary form, including a PCD header and a PCD data segment. Wherein the PCD data segment part stores all information of the three-dimensional structure. Figure 4 The right side is a schematic diagram of the converted PCD file in binary form, including a PCD header and a PCD data segment. Wherein the PCD data segment part stores all information of the three-dimensional structure.

[0054] In some embodiments, according to the point cloud data file converted from the STP file, the first point cloud data corresponding to each part can be obtained, that is, the three-dimensional coordinate information of each point cloud data corresponding to each part and the labeling information of the part corresponding to each point cloud data are obtained.

[0055] Step S102, determining the depth threshold information and the part type information of the part according to the first point cloud data.

[0056] In some embodiments, the process of determining the depth threshold of the part can be as shown in steps 201-202.

[0057] Step 201, obtaining a first depth value of each point cloud data in the first direction in the first point cloud data.

[0058] Wherein, the first direction is the z axis direction, and the first depth value is the value of the point cloud data in the z axis direction.

[0059] Step 202, determining the mean value of the product between the first depth value and the preset first parameter value as the depth threshold information.

[0060] The calculation method of the depth threshold information can be shown in formula (1). In formula (1), represents the part numbered i in the three-dimensional structure. N represents the number of point cloud data in the part, and jj represents the j-th point cloud data in the point cloud data in the part, represents the value of the j-th point cloud data in the z-axis direction. The first parameter value can be determined according to experience, for example, it can be determined as 2 / 3.

[0061] (1)

[0062] In some embodiments, the process of determining the part type information of the part can be shown in steps 301-302.

[0063] Step 301, obtaining the maximum depth value of the first point cloud data in the first direction.

[0064] Wherein, the first direction is the z-axis direction.

[0065] Step 302, obtaining the second point cloud data adjacent to the point cloud data on the contour of the part.

[0066] Step 303, determining the first variance between the part and the second point cloud data according to the maximum depth value and the depth value of the second point cloud data.

[0067] In the calculation of the first variance, first, the mean value of the difference between the obtained maximum depth value and the depth value of the second point cloud data is determined as the first mean value. As shown in formula (2). In formula (2), N represents the number of second point cloud data, represents the maximum depth value of the first point cloud data of the i-th part in the first direction, represents the depth value of the j-th point cloud data in the second point cloud data in the first direction, represents the first mean value of the i-th part.

[0068]

[0069] Secondly, the difference between the maximum depth value and the depth value of each second point cloud data is subtracted from the first mean value, and the cumulative sum after the square operation is determined as the first variance. As shown in formula (3). In formula (3), represents the first variance, and N represents the number of second point cloud data, represents the maximum depth value of the first point cloud data of the i-th part in the first direction, represents the first mean value of the i-th part. represents the first variance of the i-th part.

[0070]

[0071] In some embodiments, the component type information can be determined based on the value of the first variance corresponding to the component. If the component type information is of two types, the method for determining the component type information is as shown in formula (4). In formula (4), This provides the component type information for the i-th component. Let be the first variance of the i-th component. If the value of the first variance is greater than a preset variance threshold, the component type information is determined to be of the first type; if the value of the first variance is less than or equal to the preset variance threshold, the component type information is determined to be of the second type.

[0072]

[0073] As an example, in the component type information, the first type and the second type are as follows: Figure 3 As shown. The first type can be... Figure 3 The diagram on the right shows that the component is not obstructed from the front, back, left, or right during attachment. Therefore, when testing such components, there is no need to consider whether the component is obstructed or covered. The second type could be... Figure 3 The diagram on the left shows that when two parts are attached, they may overlap. When testing such parts, it is necessary to consider the possibility that the parts may be obscured or covered.

[0074] In some embodiments, the component type information can be determined based on the actual situation. If there are more than two types of components, such as three or four types, after roughly classifying the components into two categories according to the above method, in each subsequent category, the components in each category are further subdivided based on the first variance information of the components, and classified into different component type information.

[0075] Step S103: Perform three-dimensional visual inspection on the three-dimensional structure based on the depth threshold information and component type information of all components.

[0076] In some embodiments, the three-dimensional coordinate information of each point cloud data, the annotation information of the component, the depth threshold information of the component, and the component type information of the component can be encapsulated into the template information of the component based on the first point cloud data corresponding to each component. The template information of the three-dimensional structure can be determined based on the template information of all components.

[0077] In some embodiments, when performing three-dimensional visual inspection on the three-dimensional structure, template information of the three-dimensional structure can be loaded, and according to the component type information of each component in the template information, a detection algorithm corresponding to the component type information is used to detect the component. Wherein, the detection algorithm can be determined based on the currently commonly used detection algorithm based on artificial intelligence machine learning. When performing visual inspection on the three-dimensional structure, based on the depth threshold information corresponding to the component in the template information of the three-dimensional structure, it is judged whether the component has defects and whether the attachment position of the component has defects. If there are defects, the prompt information of the defects can be returned, and if there are no defects, the prompt information of normal detection can be returned.

[0078] The three-dimensional structure visual inspection method in the present application is based on the point cloud data of the components in the three-dimensional structure to obtain the depth threshold information and the component type information of the components, and according to the depth threshold information and the component type information of all components, the three-dimensional structure is visually inspected. The accuracy of the three-dimensional structure visual inspection can be improved, and the efficiency of the three-dimensional structure visual inspection can be improved, and an accurate three-dimensional model can be provided for the detection algorithm of the three-dimensional visual inspection, which improves the efficiency of the three-dimensional visual inspection compared with the method of visual inspection by artificial.

[0079] Figure 5 An optional device structure schematic diagram of the three-dimensional visual inspection device provided by the embodiments of the present application is shown, the three-dimensional visual inspection device 500 includes a point cloud acquisition module 501, a component information module 502 and a three-dimensional visual inspection module 503. Wherein,

[0080] The point cloud acquisition module 501 is configured to acquire first point cloud data corresponding to each component in the three-dimensional structure;

[0081] The component information module 502 is configured to determine the depth threshold information and the component type information of the component according to the first point cloud data;

[0082] The three-dimensional visual inspection module 503 is configured to perform three-dimensional visual inspection on the three-dimensional structure according to the depth threshold information and the component type information of all components.

[0083] In some embodiments, the point cloud acquisition module 501 is further configured to: acquire a design document in a preset format corresponding to the three-dimensional structure; convert the design document into a point cloud data file; acquire the first point cloud data based on the point cloud data file; wherein the first point cloud data includes three-dimensional coordinate information of each point cloud data and labeling information of the component.

[0084] In some embodiments, the component information module 502 is further configured to: obtain a maximum depth value of the first point cloud data in a first direction; obtain second point cloud data adjacent to the point cloud data on the contour of the component; determine a first variance between the component and the second point cloud data according to the maximum depth value and a depth value of the second point cloud data; and determine component type information of the component according to a value of the first variance, the component type information being used to represent an attachment type of the component in the three-dimensional structure.

[0085] In some embodiments, the component information module 502 is further configured to: determine a first mean value of a difference between the maximum depth value and the depth value of the second point cloud data; and determine the first variance by performing a square operation on an accumulated sum of a difference between the maximum depth value and the depth value of each second point cloud data, and subtracting the first mean value from the difference.

[0086] In some embodiments, the component information module 502 is further configured to: determine the component type information as a first type if the value of the first variance is greater than a preset variance threshold; and determine the component type information as a second type if the value of the first variance is less than or equal to the preset variance threshold.

[0087] In some embodiments, the three-dimensional visual detection module 503 is further configured to: for each component corresponding to the first point cloud data, encapsulate three-dimensional coordinate information of each point cloud data, label information of the component, depth threshold information of the component, and component type information of the component as template information of the component; and determine template information of the three-dimensional structure based on the template information of all components.

[0088] It should be noted that the three-dimensional visual detection device of the embodiments of the present application is similar to the description of the three-dimensional visual detection method embodiments described above, and has similar beneficial effects as the method embodiments, and thus will not be described in detail. For technical details of the three-dimensional visual detection device provided by the embodiments of the present application, they can be understood according to the description of any one of the accompanying drawings. Figures 1 to 4

[0089] Figure 6 ​A schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure is shown. The electronic device 600 is used to implement the three-dimensional visual detection method of the embodiments of the present disclosure. In some optional embodiments, the electronic device 600 can implement the three-dimensional visual detection method provided by the embodiments of the present disclosure by running a computer program. For example, the computer program can be a software module in an operating system; can be a Native APP (Application), i.e., a program that needs to be installed in an operating system to run; can be a small program, i.e., a program that only needs to be downloaded into a browser environment to run; and can also be a small program that can be embedded into any APP. In summary, the above computer program can be any form of application program, module or plug-in.

[0090] In actual applications, the electronic device 600 can be a stand-alone physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, and basic cloud computing services such as big data and artificial intelligence platforms. Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and network in a wide area network or a local area network to achieve data calculation, storage, processing, and sharing. The electronic device 600 can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart television, a smart watch, and the like, but is not limited thereto.

[0091] The electronic device is intended to represent various forms including digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular telephones, smart phones, wearable devices, vehicle-mounted terminals, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit the implementations of the present application described and / or claimed in this document.

[0092] As Figure 6As shown, the electronic device 600 includes a computing unit 601 that can perform various appropriate actions and processes in accordance with a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. Various programs and data required for the operation of the electronic device 600 can also be stored in the RAM 603. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0093] A plurality of components in the electronic device 600 are connected to the I / O interface 605, including an input unit 606 such as a keyboard, a mouse, and the like, an output unit 607 such as various types of displays, a speaker, and the like, a storage unit 608 such as a magnetic disk, an optical disk, and the like, and a communication unit 609 such as a network card, a modem, a wireless communication transceiver, and the like. The communication unit 609 allows the electronic device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0094] The computing unit 601 can be various general-purpose and / or special-purpose processing components having processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, and the like. The computing unit 601 performs various methods and processes described above, such as the three-dimensional visual inspection method. For example, in some optional embodiments, the three-dimensional visual inspection method can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 608. In some optional embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the three-dimensional visual inspection method described above can be performed. Alternatively, in other embodiments, the computing unit 601 can be configured as the three-dimensional visual inspection method by any other appropriate means, such as by means of firmware.

[0095] Embodiments of the present application provide a computer-readable storage medium storing executable instructions, wherein the executable instructions, when executed by a processor, cause the processor to perform the three-dimensional visual inspection method provided by embodiments of the present application.

[0096] In some embodiments, the computer-readable storage medium can be a memory such as a FRAM, ROM, PROM, EPROM, EEPROM, flash memory, a magnetic surface memory, an optical disk, or a CD-ROM, etc.; or can be various devices including one or any combination of the above memories.

[0097] In some embodiments, the executable instructions can be in the form of a program, software, software modules, scripts, or code, written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages; and it can be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.

[0098] As an example, the executable instructions can be deployed in a single computing device, or across multiple computing devices located at one site, or distributed across multiple sites and interconnected by a communication network.

[0099] The present application is described with reference to the flowchart and / or block diagram illustrations of the methods, apparatus (systems) and computer program products according to embodiments of the present application. It will be understood that each block of the flowchart and / or block diagrams, and combinations of blocks in the flowchart and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processing device or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart and / or block diagram block or blocks. Figure 1 The flowchart and / or block diagrams can include one or more flowcharts and / or block diagrams. Figure 1 The flowchart and / or block diagrams can include one or more flowcharts and / or block diagrams.

[0100] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions means which implement the function specified in the flowchart and / or block diagram block or blocks. Figure 1 The flowchart and / or block diagrams can include one or more flowcharts and / or block diagrams. Figure 1 Figure 1 The flowchart and / or block diagrams can include one or more flowcharts and / or block diagrams.

[0101] It should be understood that, in various embodiments of the present application, the size of the serial number of each implementation process does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0102] The above merely illustrates the embodiments of the present application, and is not used to limit the protection scope of the present application. Any modification, equivalent replacement and improvement made within the spirit and scope of the present application shall fall into the protection scope of the present application.

Claims

1. A three-dimensional vision inspection method, characterized in that, The method comprises: For each component in the three-dimensional structure, obtain the first point cloud data corresponding to the component; According to the first point cloud data, determine the depth threshold information and the component type information of the component, comprising: obtaining the maximum depth value of the first point cloud data in the first direction; obtaining the second point cloud data adjacent to the point cloud data on the outline of the component; according to the difference between the maximum depth value and the variance of the depth value of each second point cloud data as the first variance; If the value of the first variance is greater than the preset variance threshold, the component type information is determined as the first type; if the value of the first variance is less than or equal to the preset variance threshold, the component type information is determined as the second type; the first type represents that there is no occlusion when the component is attached; the second type represents that when two components are attached, the two components are stacked up and down; According to the depth threshold information and the component type information of all components, determine the template information of the three-dimensional structure; when performing three-dimensional visual detection on the three-dimensional structure, load the template information of the three-dimensional structure, and according to the component type information of each component in the template information, use the detection algorithm corresponding to the component type information to detect the component.

2. The method of claim 1, wherein, The method comprises: Obtain the design document of a preset format corresponding to the three-dimensional structure; Convert the design document into a point cloud data file; Obtain the first point cloud data based on the point cloud data file; The first point cloud data comprises three-dimensional coordinate information of each point cloud data and label information of the component.

3. The method of claim 1, wherein, The method further comprises: Obtain the first depth value of each point cloud data in the first direction in the first point cloud data; Determine the mean value of the product between the first depth value and the preset first parameter value as the depth threshold information.

4. The method of claim 1, wherein, The method further comprises: Determine the mean value of the difference between the maximum depth value and the depth value of the second point cloud data as the first mean value; Subtract the first mean value from the difference between the maximum depth value and the depth value of each second point cloud data, and determine the cumulative sum of the square operation of the obtained difference as the first variance.

5. The method of claim 1, wherein, The method further comprises: For the first point cloud data corresponding to each component, encapsulate the three-dimensional coordinate information of each point cloud data, the label information of the component, the depth threshold information of the component, and the component type information of the component as the template information of the component; Determine the template information of the three-dimensional structure based on the template information of all components.

6. A three-dimensional vision inspection apparatus characterized by comprising: The device comprises: A point cloud acquisition module, configured to obtain the first point cloud data corresponding to each component in the three-dimensional structure; The component information module is configured to determine depth threshold information and component type information of the component according to the first point cloud data, and includes: obtaining a maximum depth value of the first point cloud data in a first direction; obtaining second point cloud data adjacent to the point cloud data on the contour of the component; and taking a difference between the maximum depth value and a depth value of each of the second point cloud data as a first variance. If a value of the first variance is greater than a preset variance threshold, the component type information is determined as a first type; if the value of the first variance is less than or equal to the preset variance threshold, the component type information is determined as a second type; the first type indicates that there is no occlusion when the component is attached; and the second type indicates that two components are stacked up and down when the two components are attached. The three-dimensional visual detection module is configured to determine template information of the three-dimensional structure according to the depth threshold information and the component type information of all components; and load the template information of the three-dimensional structure when performing three-dimensional visual detection on the three-dimensional structure, and perform component detection using a detection algorithm corresponding to the component type information of each component in the template information according to the component type information.

7. An electronic device, comprising: The electronic device includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the three-dimensional visual detection method of any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The storage medium includes a set of computer-executable instructions that, when executed, perform the three-dimensional visual detection method of any one of claims 1-5.

Citation Information

Patent Citations

  • Depth detection method, depth detection device, storage medium and electronic equipment

    CN112927281A

  • DSM calculation method and device, computer equipment and storage medium

    CN113496550A