Local feature positioning method and system based on 3D vision and computer equipment
Through the local feature positioning method based on 3D vision, depth image data and random sampling consistency algorithm are used to solve the problem of insufficient positioning accuracy of the body's threaded holes, achieve high-precision and low-cost positioning effects, and improve the quality and quality of the body assembly. efficiency.
Patent Information
- Application Number
- CN202410679185.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-29
- Publication Date
- 2024-09-10
AI Technical Summary
The existing technology has insufficient accuracy in local positioning of threaded holes in the car body. Deep learning algorithms are limited by computing power and training data. It is difficult for traditional 2D algorithms to achieve high-precision positioning in a noisy environment.
A local feature positioning method based on 3D vision is used to collect the thread hole center through depth image data, build a local feature coordinate system, and use a random sampling consistency algorithm to filter noise to achieve high-precision identification and positioning of the thread hole center.
It achieves low-cost, high-efficiency and high-precision threaded hole positioning, improves the fit and consistency of body assembly, optimizes the manufacturing process, reduces assembly costs, and improves production efficiency.
Smart Images

Figure CN118628703A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of machine vision positioning technology, and in particular to a local feature positioning method, system and computer equipment based on 3D vision. Background Art
[0002] In the field of modern automobile intelligent assembly, the stability of the connection between the door and the body in white usually depends on the fit between the door hinge hole plane and the body thread hole plane, so the local positioning accuracy of the body thread hole must be ensured first. Accurate local positioning can improve the fit and consistency between the body and components, and improve the assembly quality and performance of the whole vehicle. Local positioning can also optimize the manufacturing process, reduce assembly costs, and thus improve production efficiency and economic benefits.
[0003] At present, the local positioning of the vehicle body can usually be divided into two stages: feature point recognition and coordinate system establishment. Among them, for feature point recognition, the existing deep learning algorithm is limited by computing power and the collection of training data, and it requires continuous iterative training for different working conditions to achieve high robustness. Traditional 2D algorithms are limited by feature area noise and usually have difficulty in achieving high-precision positioning.
[0004] In summary, it is necessary to provide a method that can improve the positioning accuracy of the threaded hole area of the vehicle body. Summary of the invention
[0005] The present invention provides a local feature positioning method, system and computer equipment based on 3D vision to improve the positioning accuracy of the threaded hole area of a vehicle body.
[0006] In order to achieve the above object, the present invention is implemented by the following technical solutions:
[0007] In a first aspect, the present invention provides a local feature positioning method based on 3D vision, comprising:
[0008] S1: Collecting depth image data of the target area, where the target area is the area where four threaded holes are evenly distributed in the middle of the vehicle body to be assembled;
[0009] S2: Identify the center of the threaded hole based on the depth image data;
[0010] S3: Construct a local feature coordinate system based on the spatial coordinates of the centers of the four threaded holes identified;
[0011] S4: Local feature positioning based on the local feature coordinate system.
[0012] In a second aspect, the present application provides a local feature positioning system based on 3D vision, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned first aspect method when executing the computer program.
[0013] In a third aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method of the first aspect when executing the computer program.
[0014] Beneficial effects:
[0015] The local feature positioning method based on 3D vision provided by the present invention regards the area where the four threaded holes in the middle of the white body of the automobile to be assembled are evenly distributed as the target area, and uses a 3D algorithm to accurately identify the centers of the four threaded holes on the vehicle body based on the target area. The method of forming a cross vector through the 3D coordinates of the centers of the four threaded holes and then constructing a local coordinate system can effectively reflect local manufacturing errors, and has the advantages of low cost, high efficiency, high precision and high robustness, thereby providing customers with a faster integration process and realizing a highly automated and universal solution.
[0016] In a further solution, a random sampling consistency algorithm is used to perform plane fitting on the local point clouds of the four threaded holes; filtering the noise based on the fitting plane can effectively overcome the influence of the edge noise of the threaded holes and effectively achieve high-precision positioning. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 A flowchart of a local feature positioning method based on 3D vision according to a preferred embodiment of the present invention;
[0018] Figure 2 A schematic diagram of the selection of characteristic points of local threaded holes on a vehicle body and the construction of a coordinate system according to a preferred embodiment of the present invention;
[0019] Figure 3 This is a flow chart of threaded hole center detection according to a preferred embodiment of the present invention;
[0020] Figure 4 A schematic diagram of constructing a coordinate system for a local feature area in a preferred embodiment of the present invention. DETAILED DESCRIPTION
[0021] The technical solution of the present invention is described clearly and completely below. Obviously, the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0022] Unless otherwise defined, the technical terms or scientific terms used in the present invention shall have the usual meanings understood by persons with ordinary skills in the field to which the present invention belongs. The words "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, words such as "one" or "one" do not indicate quantity restrictions, but indicate the existence of at least one. Words such as "connect" or "connected" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the object being described changes, the relative positional relationship also changes accordingly.
[0023] See also Figure 1 , the present application provides a local feature positioning method based on 3D vision, comprising:
[0024] S1: Collecting depth image data of the target area, where the target area is the area where four threaded holes are evenly distributed in the middle of the vehicle body to be assembled;
[0025] S2: Identify the center of the threaded hole based on the depth image data;
[0026] S3: Construct a local feature coordinate system based on the spatial coordinates of the centers of the four threaded holes identified;
[0027] S4: Local feature positioning based on the local feature coordinate system.
[0028] The above-mentioned local feature positioning method based on 3D vision regards the area where the four threaded holes are evenly distributed in the middle of the white body of the car to be assembled as the target area, and uses a 3D algorithm to accurately identify the centers of the four threaded holes on the car body based on the target area. The cross vector is formed by the 3D coordinates of the centers of the four threaded holes to construct a local coordinate system, which can effectively reflect local manufacturing errors. It has the advantages of low cost, high efficiency, high precision and high robustness, thereby providing customers with a faster integration process and realizing a highly automated and universal solution.
[0029] Optionally, in S1, if Figure 2 As shown, four evenly distributed threaded holes in the middle of the body-in-white to-be-assembled area are selected as the target area, and two 3D cameras with fixed mounting positions are used to collect depth map data of the two upper threaded hole areas A (first point) and B (second point) and the two lower threaded hole areas C (third point) and D (fourth point).
[0030] Furthermore, if Figure 3As shown in the figure, the depth map is converted into point cloud data, and the local point cloud data of the threaded hole is obtained by straight-through filtering according to the four threaded hole regions of interest (ROI) set a priori. There will be noise near the original threaded hole, and the noise mostly comes from the light source and the edge of the threaded hole. In order to obtain a local point cloud of the threaded hole with high flatness. The plane fitting is performed on the local point clouds of the four threaded holes using a random sampling consistency algorithm. For each threaded hole, the distance from all points to the fitting plane is traversed to judge whether the point is a noise point. If the distance is greater than the a priori threshold, it is judged as noise and filtered. This method can effectively filter out the outlier noise point cloud. In this way, all point clouds with high flatness (Cloud_target) are retained. Subsequently, all Cloud_targets are projected onto the plane equation obtained by fitting in the previous step, so that all local point clouds of the threaded hole can be projected onto the 2D plane. The edge point cloud of the threaded hole is detected based on the edge detection algorithm in the PCL library. The random sampling consistency algorithm is used again to fit the circle on its edge and obtain the 3D center. Finally, the coordinates of the centers of all threaded holes are converted from the camera coordinate system to the robot or world coordinate system through the calibrated external parameter matrix.
[0031] Then, if Figure 4 As shown in the figure, in the local coordinate system construction stage, based on the spatial coordinates of the four threaded hole centers obtained by identification, the following rules are used to define the local feature coordinate system. Connect the threaded hole centers at A and D, and at B and C respectively, and construct two sets of space vectors in, The X-axis vector representing the local feature area, represents the Y-axis vector, It represents the Z-axis vector. In order to retain only the directionality and ensure that the subsequent matrix operations have good mathematical properties, the X, Y, and Z axis vectors are normalized. Finally, the origin of the local feature coordinate system is obtained by calculating the center point of the two closest points in the AD and BC segments. The specific method is to traverse all points on the AD and BC segments with a set step size until point E in AD and point F in BC are found, so that the Euclidean distance between points EF is the shortest. The center point of points EF is taken to represent the origin of the local feature coordinate system. In one example, the step size is set to 0.1, which is only used as an example here and is not limited. In other feasible implementations, the step size can also be set to other values.
[0032] Then, local feature positioning is performed based on the local feature coordinate system.
[0033] The present application also provides a local feature positioning system based on 3D vision, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above-mentioned local feature positioning method based on 3D vision are implemented.
[0034] The present application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned local feature positioning method based on 3D vision when executing the computer program. The computer device can implement various embodiments of the above-mentioned local feature positioning method based on 3D vision, and can achieve the same beneficial effects, which will not be described in detail here.
[0035] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.
Claims
1. A local feature positioning method based on 3D vision, characterized in that: include: S1: collecting depth image data of a target area, where the target area is an area where four threaded holes are evenly distributed in the middle of a to-be-assembled area of a vehicle body in white; S2: Identify the center of the threaded hole based on the depth image data; S3: Construct a local feature coordinate system based on the spatial coordinates of the centers of the four threaded holes identified; S4: local feature positioning based on the local feature coordinate system.
2. The local feature positioning method based on 3D vision according to claim 1, characterized in that: The S1 includes: The four threaded holes evenly distributed in the middle of the to-be-assembled area of the automobile body in white are taken as the target area, and two 3D cameras with fixed mounting positions are used to respectively collect the depth map data of the target area.
3. The local feature positioning method based on 3D vision according to claim 1, characterized in that: The S2 includes: Convert the depth image into point cloud data, and filter the point cloud data according to the pre-set regions of interest (ROIs) of four threaded holes to obtain local point clouds of the four threaded holes; The random sampling consistency algorithm is used to perform plane fitting on the local point clouds of the four threaded holes; Filter noise based on the fitted plane; The coordinates of the center points of the four threaded holes are determined according to the point cloud after noise is filtered, and the coordinates of the center points of the four threaded holes are converted to the robot coordinate system.
4. The local feature positioning method based on 3D vision according to claim 3, characterized in that: The filtering of noise according to the fitting plane comprises: For each threaded hole point cloud, the distance from all points to the fitting plane is traversed and calculated. If the distance is greater than the prior threshold, it is judged as noise and filtered to obtain the final flatness point cloud Cloud_target.
5. The local feature positioning method based on 3D vision according to claim 4, characterized in that: The method of determining the coordinates of the center points of the four threaded holes according to the point cloud after filtering out the noise includes: All the final flatness point clouds Cloud_target are projected onto the fitting plane, and the edge point clouds of the threaded holes are detected based on the edge detection algorithm in the PCL library and the projection results. Based on the edge point clouds, the random sampling consistency algorithm is used again to perform circle fitting on the edges to obtain the 3D center of the circle, and the center point coordinates of the four threaded holes are determined according to the 3D center of the circle.
6. The local feature positioning method based on 3D vision according to claim 5, characterized in that: The S3 includes: The four threaded holes are set as the first point, the second point, the third point and the fourth point, wherein the first point and the second point are in the same plane, the third point and the fourth point are in the same plane, the third point is located relatively below the first point, and the fourth point is located relatively below the second point; Connect the first point and the fourth point of the threaded hole center to obtain a first space vector The second space vector is obtained by connecting the second point and the threaded hole center of the third point Will The X-axis vector representing the local feature area, represents the Y-axis vector, Represents the Z-axis vector; Normalize the X, Y, and Z axis vectors, and obtain the origin of the local feature coordinate system by calculating the center points of the two closest points in the AD and BC segments.
7. The local feature positioning method based on 3D vision according to claim 6, characterized in that: The calculation of the center point of the two closest points in the AD and BC segments to obtain the origin of the local feature coordinate system includes: Traverse all points on the AD and BC segments with a set step size until point E in AD and point F in BC are found, making the Euclidean distance between points EF the shortest. The center point of points EF is taken as the origin of the local feature coordinate system.
8. A local feature positioning system based on 3D vision, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in any one of claims 1 to 7 when executing the computer program.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Water cooling plate full-size detection equipment, method and system and combined measurement method
CN120043473A
A water-cooled plate full-size detection device, method, system and combined measurement method
CN120043473B
