Automatic positioning and assembling system

By setting circular marks on the target workpiece and using a 3D camera for elliptical fitting, the problem of low positioning accuracy of the existing positioning and assembly system is solved, high-precision positioning and assembly are achieved, and efficiency and quality are improved.

CN119609601AActive Publication Date: 2025-03-14BEIJING XINGHANG MECHANICAL ELECTRICAL EQUIP CO LTD

Patent Information

Application Number
CN202411955663.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-28
Publication Date
2025-03-14
Estimated Expiration
2044-12-28

AI Technical Summary

Technical Problem

When the existing visual positioning assembly system acquires workpiece position information, geometric feature extraction is easily affected by noise, resulting in low positioning accuracy and unable to meet the assembly accuracy requirements.

Method used

The automatic positioning and assembly system is adopted, by setting circular marks on the target workpiece, taking images with a 3D camera and performing elliptical fitting processing, the position deviation of the target workpiece is accurately obtained, and the control device coordinates the transportation device and assembly robotic arms to achieve high-precision positioning of the target workpiece.

Benefits of technology

High-precision positioning is achieved, assembly efficiency and quality is improved, labor costs are reduced, and the system is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119609601A_ABST
    Figure CN119609601A_ABST
Patent Text Reader

Abstract

The invention relates to an automatic positioning and assembling system, belongs to the technical field of positioning and assembling, and solves the problem of low positioning precision in the prior art. The system comprises a marking device, a conveying device, an assembling mechanical arm, a 3D camera and a control device. Wherein after the marking device sets at least three circular marks on a target workpiece, the control device controls the conveying device to move the target workpiece with the circular marks to an assembly position, and after the target workpiece is preliminarily in place, the 3D camera is controlled to shoot an image of the target workpiece at the current position to serve as a target image; the control device performs ellipse fitting processing on the circular mark on the target image so as to obtain translation deviation and rotation deviation; and the control device controls the conveying device to move the target workpiece to the assembly position according to the translation deviation and the rotation deviation. The automatic assembling and positioning system is high in positioning precision and beneficial to improving the assembling quality and efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of positioning and assembling, and in particular to an automatic positioning and assembling system. Background Art

[0002] In industrial production, the automatic positioning assembly system is one of the key technologies to achieve efficient and precise assembly. Traditional assembly systems mainly rely on manual operation, which has problems such as low efficiency, unstable precision and high labor intensity.

[0003] With the development of automation technology, a variety of automatic positioning and assembly systems have emerged, such as visual positioning and assembly systems, but they still have some shortcomings in practical applications. Specifically, the existing visual positioning and assembly systems identify the geometric features on the workpiece target workpiece image, determine the current position information of the workpiece target workpiece, and then compare it with the expected position to determine the position error for compensation. However, the geometric feature extraction is easily affected by noise, resulting in low accuracy of the acquired position information, poor positioning accuracy of the system, and cannot meet the accuracy requirements of the workpiece target workpiece assembly, and is not conducive to the stability and adaptability of the assembly. Summary of the invention

[0004] In view of the above analysis, an embodiment of the present invention aims to provide an automatic positioning and assembly system to solve the technical problem of poor positioning accuracy of existing positioning and assembly systems.

[0005] On the one hand, an embodiment of the present invention provides an automatic positioning and assembly system, the system comprising:

[0006] a marking device for setting a circular mark on a target workpiece;

[0007] A transport device, comprising a positioning table for carrying a target workpiece, wherein the positioning table transports the target workpiece to an assembly position by translation and / or rotation;

[0008] A 3D camera is arranged above the assembly position, and is used to capture an image of the target workpiece;

[0009] A control device, connected to the transport device, the assembly robot arm and the 3D camera respectively;

[0010] Among them, after the marking device sets at least three circular marks on the target workpiece, the control device controls the transportation device to move the target workpiece with the circular marks to the assembly position; after the control device detects that the target workpiece is initially in place, the control device controls the 3D camera to capture the image of the target workpiece at the current position as the target image; the control device performs ellipse fitting processing on the circular marks on the target image to obtain the translation deviation and rotation deviation between the current position of the target workpiece and the assembly position; the control device controls the transportation device to move the target workpiece to the assembly position according to the translation deviation and the rotation deviation.

[0011] Based on the further improvement of the above system, a proximity switch is provided at the assembly position, and the proximity switch is connected to the control device;

[0012] When the proximity switch senses that the target workpiece moves to the assembly position, it sends an in-position signal to the control device. After receiving the in-position signal, the control device determines that the target workpiece is initially in position, and then controls the 3D camera to capture an image of the target workpiece at the current position as the target image.

[0013] Based on the further improvement of the above system, the transport device further comprises: a mounting platform, the positioning platform comprises a slide and a turntable, the turntable is rotatably arranged on the slide, and a fixture for fixing the target workpiece is arranged on the turntable;

[0014] The installation platform is provided with a linear slide rail, and the bottom of the slide table is slidably connected to the linear slide rail.

[0015] Based on the further improvement of the above system, the transport device further includes: a first driving mechanism and a second driving mechanism; the first driving mechanism drives the slide to reciprocate along the linear slide rail; the second driving mechanism drives the turntable to rotate clockwise or counterclockwise on the slide;

[0016] Among them, after the control device obtains the translation deviation and the rotation deviation, the control device generates a translation instruction according to the translation deviation and sends it to the first drive mechanism, and the first drive mechanism drives the slide table to translate a corresponding distance according to the translation instruction; the control device generates a rotation instruction according to the rotation deviation and sends it to the second drive mechanism, and the second drive mechanism drives the turntable to rotate a corresponding angle according to the rotation instruction.

[0017] Based on the further improvement of the above system, the first driving mechanism includes: a first servo motor, a lead screw and a linear slider,

[0018] The length direction of the lead screw is parallel to the extension direction of the linear slide rail, the linear slider is fixedly connected to the bottom of the slide table, and the lead screw is threadedly connected to the linear slider;

[0019] The control device is connected to the first servo motor, and the rotating shaft of the first servo motor is connected to one end of the screw rod to drive the screw rod to rotate.

[0020] Based on the further improvement of the above system, the second driving mechanism comprises: a second servo motor, a worm and a turbine,

[0021] The turbine is fixedly connected to the bottom of the turntable, and the gear teeth of the turbine are meshed with the threaded teeth of the worm; the control device is connected to the second servo motor, and the shaft of the second servo motor is connected to one end of the worm to drive the turbine to rotate.

[0022] Based on the further improvement of the above system, the control device obtains the translation deviation and rotation deviation between the current position and the assembly position based on performing ellipse fitting processing on the circular mark on the target image, including the following steps:

[0023] Performing binarization processing on the target image to obtain a binarized image;

[0024] Based on performing ellipse fitting processing on the circular marks on the binary image, obtaining the three-dimensional coordinates of each circular mark in the image coordinate system;

[0025] Converting the coordinates of the circular mark in the image coordinate system into the coordinates of the positioning stage coordinate system;

[0026] Recording the acquired three-dimensional coordinates of the circular mark in the positioning platform coordinate system to form target point cloud data;

[0027] The target point cloud is matched with the reference point cloud to obtain the translation deviation and rotation deviation between the current position and the assembly position; the reference point cloud is the workpiece point cloud of the assembly position collected under the template posture.

[0028] Based on the further improvement of the above system, the method of performing ellipse fitting processing on the circular marks on the binary image to obtain the three-dimensional coordinates of each circular mark in the image coordinate system includes the following steps:

[0029] Performing ellipse fitting on the contours of the circular marks on the binary image to obtain an ellipse equation of each circular mark contour and the coordinates of the center of each ellipse;

[0030] Perform plane fitting according to the coordinates of the center of each ellipse to obtain the fitting plane equation and the normal vector of the fitting plane;

[0031] Calculating an affine transformation matrix according to the ellipse equation of the circular mark and the normal vector of the fitting plane;

[0032] The coordinates of the center of each ellipse are converted into corresponding circle center coordinates through the affine transformation matrix, and the circle center coordinates are used as the three-dimensional coordinates of the circular mark in the image coordinate system.

[0033] Based on the further improvement of the above system, the step of converting the coordinates of the circular mark in the image coordinate system into the coordinates of the positioning stage coordinate system comprises the following steps:

[0034] Convert the coordinates of the circular mark in the image coordinate system to the coordinates of the camera coordinate system according to the intrinsic parameter matrix of the 3D camera;

[0035] According to the external parameter matrix of the 3D camera, the coordinates of the circular mark in the image coordinate system are converted into the coordinates of the positioning stage coordinate system.

[0036] Based on the further improvement of the above system, the target point cloud is matched with the reference point cloud based on the iterative closest point algorithm to obtain the translation deviation and rotation deviation between the current position and the assembly position, including the following steps:

[0037] Set the initial translation deviation and rotation deviation;

[0038] For each point in the target point cloud, a nearest neighbor search algorithm is used to find the closest point in the reference point cloud, and the corresponding two points are used as a matching point pair;

[0039] Calculating the error between the target point cloud and the reference point cloud according to the matching point pairs;

[0040] With the goal of minimizing the error between the target point cloud and the reference point cloud, the translation deviation and the rotation deviation are optimized and adjusted to obtain the optimal translation deviation and rotation deviation as the translation deviation and rotation deviation between the current position and the assembly position.

[0041] Compared with the prior art, the present invention can achieve at least one of the following beneficial effects:

[0042] 1. The automatic assembly system of the present invention sets a circular mark on the target workpiece, uses a 3D camera to capture images and performs ellipse fitting processing to accurately obtain the position deviation of the target workpiece, and then the control device coordinates the transportation device and the assembly robot arm to achieve high-precision positioning of the target workpiece. It has the advantages of high positioning accuracy, strong flexibility, high degree of automation, and real-time feedback adjustment, which can effectively improve assembly efficiency and quality and reduce labor costs.

[0043] 2. The transport device of the present invention, by arranging a linear slide rail on the mounting platform, and slidingly connecting the bottom of the slide with a rotatable turntable on the linear slide rail, enables the target workpiece to achieve translation and rotation at the same time, and cooperates with the clamp on the turntable to fix the target workpiece, thereby realizing flexible positioning and precise movement of the target workpiece during the assembly process, and improving the flexibility and accuracy of assembly.

[0044] 3. In the present invention, the control device obtains the translation deviation and rotation deviation between the current position of the target workpiece and the assembly position based on the ellipse fitting of the circular mark on the target image, wherein the ellipse fitting can accurately determine the position of the circular mark in the image, thereby obtaining high-precision coordinate information, and the ellipse fitting method is applicable to circular marks of various shapes and sizes, and can well handle the situation where the circle appears as an ellipse in the image due to changes in viewing angle, lens distortion, etc., so that the coordinate information can be stably extracted in different application scenarios and complex environments. This method is not only conducive to improving the positioning compensation accuracy, but also can enhance the robustness and adaptability of the system, can effectively cope with assembly tasks in complex environments and different postures, and ensure the efficiency and accuracy of the assembly process.

[0045] In the present invention, the above-mentioned technical solutions can also be combined with each other to achieve more preferred combination solutions. Other features and advantages of the present invention will be described in the subsequent description, and some advantages can become obvious from the description, or can be understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained through the contents particularly pointed out in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] The drawings are only for the purpose of illustrating particular embodiments and are not to be considered limiting of the present invention. Like reference symbols denote like components throughout the drawings.

[0047] Figure 1 A schematic diagram of the structure of an automatic positioning and assembly system according to an embodiment of the present invention;

[0048] Figure 2 It is a schematic structural diagram of the installation platform, the slide table and the first driving mechanism of an embodiment of the present invention;

[0049] Figure 3 It is a schematic structural diagram of a turntable and a second driving mechanism according to an embodiment of the present invention.

[0050] Reference numerals:

[0051] 1-target workpiece; 2-3D camera; 3-transportation device; 4-mechanical arm;

[0052] 101-circular mark;

[0053] 301-installation platform; 302-slide table; 303-turntable; 304-first servo motor;

[0054] 305-screw rod; 306-linear slider; 307-second servo motor; 308-turbine;

[0055] 309-worm gear; 310-proximity switch. DETAILED DESCRIPTION

[0056] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not used to limit the scope of the present invention.

[0057] The embodiment of the present invention provides an automatic positioning assembly system, such as Figure 1 The system comprises:

[0058] A marking device for setting a circular mark 101 on a target workpiece to be assembled;

[0059] The transport device 3 comprises a positioning table for carrying the target workpiece, and the positioning table transports the target workpiece to the assembly position by translation and / or rotation;

[0060] 3D camera 2, used for capturing an image of the target workpiece;

[0061] A control device, connected to the transport device 3, the assembly robot 4 and the 3D camera 2 respectively;

[0062] Among them, after the marking device sets at least three circular marks 101 on the target workpiece, the control device controls the transportation device 3 to move the target workpiece with the circular marks 101 to the assembly position; after the control device detects that the target workpiece is initially in place, it controls the 3D camera 2 to capture the image of the target workpiece at the current position as the target image; the control device performs ellipse fitting processing on the circular marks 101 on the target image to obtain the translation deviation and rotation deviation between the current position of the target workpiece and the assembly position; the control device controls the transportation device 3 to move the target workpiece to the assembly position according to the translation deviation and the rotation deviation.

[0063] During implementation, at least three circular marks 101 distributed along a circle are set on the target workpiece by a marking device; the 3D camera 2 is set at the end of a mechanical arm 4, so that the 3D camera 2 is located above the target workpiece to capture images through the mechanical arm 4. In addition, after the transport device 3 moves the target workpiece to the assembly position, the workpiece to be assembled is installed on the target workpiece by another mechanical arm.

[0064] Compared with the prior art, the automatic assembly system of the embodiment of the present invention, by setting a circular mark 101 on the target workpiece, uses a 3D camera 2 to capture images and performs ellipse fitting processing to accurately obtain the position deviation of the target workpiece, and then the control device coordinates the transportation device 3 and the assembly robot arm 4 to achieve high-precision positioning of the target workpiece. It has the advantages of high positioning accuracy, strong flexibility, high degree of automation and real-time feedback adjustment, etc., which can effectively improve assembly efficiency and quality and reduce labor costs.

[0065] In an embodiment of the present invention, the control device obtains the translation deviation and rotation deviation between the current position of the target workpiece and the assembly position based on the ellipse fitting of the circular mark 101 on the target image, wherein the ellipse fitting can accurately determine the position of the circular mark 101 in the image, thereby obtaining high-precision coordinate information, and the ellipse fitting method is applicable to circular marks 101 of various shapes and sizes, and can well handle the situation where the circle appears as an ellipse in the image due to changes in viewing angle, lens distortion, etc., so that the coordinate information can be stably extracted in different application scenarios and complex environments. This method is not only conducive to improving the positioning compensation accuracy, but also can enhance the robustness and adaptability of the system, can effectively cope with assembly tasks in complex environments and different postures, and ensure the efficiency and accuracy of the assembly process.

[0066] It should be noted that the positioning table in the embodiment of the present invention transports the target workpiece through translational motion and rotational motion. The transportation device 3 receives the control instruction and transports the target workpiece to the assembly position. However, due to the positioning deviation, the positioning table cannot stop accurately at the assembly position, which causes the positioning of the target workpiece to deviate, that is, there is a deviation between the current position of the target workpiece and the assembly position.

[0067] Specifically, a proximity switch 310 is provided at the assembly position, and the proximity switch 310 is connected to the control device. When the proximity switch 310 senses that the target workpiece moves to the assembly position, it sends an in-position signal to the control device. After receiving the in-position signal, the control device determines that the target workpiece is preliminarily in position, and then controls the 3D camera 2 to capture an image of the target workpiece at the current position as a target image.

[0068] In this embodiment, the target workpiece is sensed by the proximity switch 310 to determine that the target workpiece is preliminarily in place, and the 3D camera 2 is triggered to capture and acquire a target image.

[0069] In one embodiment, Figure 2As shown, the transport device 3 further includes: a mounting platform 301, the positioning platform includes a slide 302 and a turntable 303, the turntable 303 is rotatably arranged on the slide 302, and a fixture for fixing the target workpiece is arranged on the turntable 303. A linear slide is arranged on the mounting platform 301, and the bottom of the slide 302 is slidably connected to the linear slide.

[0070] During implementation, the target workpiece is a cabin body, and the fixture on the turntable 303 is used to position the cabin body.

[0071] The transport device 3 of the embodiment of the present invention, by arranging a linear slide rail on the mounting platform 301, and slidingly connecting the bottom of the slide 302 with a rotatable turntable 303 on the linear slide rail, enables the target workpiece to achieve translation and rotation at the same time, and cooperates with the clamp on the turntable 303 to fix the target workpiece, thereby achieving flexible positioning and precise movement of the target workpiece during the assembly process, and improving the flexibility and accuracy of assembly.

[0072] Specifically, the transport device 3 further includes: a first driving mechanism and a second driving mechanism; the first driving mechanism drives the slide 302 to reciprocate along the linear slide rail; the second driving mechanism drives the turntable 303 to rotate clockwise or counterclockwise on the slide 302.

[0073] Among them, after the control device obtains the translation deviation and the rotation deviation, the control device generates a translation instruction according to the translation deviation and sends it to the first driving mechanism, and the first driving mechanism drives the slide 302 to translate a corresponding distance according to the translation instruction; the control device generates a rotation instruction according to the rotation deviation and sends it to the second driving mechanism, and the second driving mechanism drives the turntable 303 to rotate a corresponding angle according to the rotation instruction.

[0074] More specifically, Figure 2 As shown, the first driving mechanism includes: a first servo motor 304, a lead screw 305 and a linear slider 306. The length direction of the lead screw 305 is parallel to the extension direction of the linear slide rail. The linear slider 306 is fixedly connected to the bottom of the slide table 302. The lead screw 305 is threadedly connected to the linear slider 306. The control device is connected to the first servo motor 304. The rotating shaft of the first servo motor 304 is connected to one end of the lead screw 305 to drive the lead screw 305 to rotate.

[0075] During implementation, after the control device obtains the translation deviation and the rotation deviation, the control device generates a translation instruction according to the translation deviation and sends it to the first servo motor 304. The first servo motor 304 rotates a corresponding angle according to the translation instruction to drive the slide 302 to translate a corresponding distance.

[0076] More specifically, Figure 3 As shown, the second driving mechanism includes: a second servo motor 307, a worm 309 and a turbine 308, wherein the turbine 308 is fixedly connected to the bottom of the turntable 303, and the gear teeth of the turbine 308 are meshed with the threaded teeth of the worm 309; the control device is connected to the second servo motor 307, and the rotating shaft of the second servo motor 307 is connected to one end of the worm 309 to drive the turbine 308 to rotate.

[0077] During implementation, after the control device obtains the translation deviation and the rotation deviation, the control device generates a rotation instruction according to the rotation deviation and sends it to the second servo motor 307. The second servo motor 307 rotates a corresponding angle according to the rotation instruction to drive the turntable 303 to rotate a corresponding angle.

[0078] In one embodiment, the control device obtains the translation deviation and rotation deviation between the current position and the assembly position based on performing ellipse fitting processing on the circular mark 101 on the target image, including the following steps:

[0079] Step 1, performing binarization processing on the target image to obtain a binarized image;

[0080] Step 2, based on performing ellipse fitting processing on the circular marks 101 on the binary image, obtaining the three-dimensional coordinates of each circular mark 101 in the image coordinate system;

[0081] Step 3, converting the coordinates of the circular mark 101 in the image coordinate system into the coordinates of the positioning stage coordinate system;

[0082] Step 4, recording the acquired three-dimensional coordinates of the circular mark 101 in the positioning platform coordinate system to form target point cloud data;

[0083] Step 5, matching the target point cloud with the reference point cloud to obtain the translation deviation and rotation deviation between the current position and the assembly position; the reference point cloud is the workpiece point cloud of the assembly position collected under the template posture.

[0084] In the embodiment of the present invention, through binarization processing and ellipse fitting, high-precision positioning of the circular mark 101 can be achieved. Among them, the binarization processing simplifies the gray value of the image into two values, usually 0 and 255. The binarization processing facilitates the subsequent ellipse fitting and edge detection by simplifying the image, enhancing the contrast, reducing the noise and other effects.

[0085] Step 1: binarize the target image to obtain a binarized image.

[0086] Specifically, performing binarization processing on the target image to obtain a binarized image includes:

[0087] For each pixel in the target image, a neighborhood is defined with the pixel as the center;

[0088] Calculate the local threshold corresponding to the pixel point according to the pixel value of the neighborhood;

[0089] The current pixel value of each pixel is compared with its local threshold. If the current pixel value is greater than the threshold, the pixel value of the pixel is set to the maximum value; if the current pixel value is less than the threshold, the pixel value of the pixel is set to zero, thereby obtaining a binary image.

[0090] In the embodiment of the present invention, when performing binarization processing, an adaptive threshold processing technology is used to complete the threshold processing of the image using a variable threshold. The adaptive threshold processing adaptively determines the threshold for different local areas, and the result is more accurate, which improves the image segmentation accuracy and can better retain the image detail information.

[0091] Specifically, the formula for calculating the local threshold corresponding to the pixel point according to the pixel value of the neighborhood is:

[0092]

[0093]

[0094] Where T(x,y) is the local threshold corresponding to the pixel (x,y), W(x,y) represents the neighborhood centered on the pixel (x,y), I(i,j) is the pixel value corresponding to the pixel (i,j), ω(i,j) is the weight corresponding to the pixel (i,j), and σ is the standard deviation of the Gaussian distribution.

[0095] In the embodiment of the present invention, a local threshold is obtained by calculating a weighted average value of adjacent areas around each pixel, and the threshold is used to process the current pixel.

[0096] After binarization, the image only contains two pixel values, which reduces the complexity of the image and highlights the contour and shape features in the image, which can improve the accuracy of subsequent ellipse fitting.

[0097] Step 2, based on performing ellipse fitting processing on the circular marks 101 on the binary image, obtain the three-dimensional coordinates of each circular mark 101 in the image coordinate system, including the following steps:

[0098] Performing ellipse fitting on the contours of the circular marks 101 on the binary image to obtain an ellipse equation of the contour of each circular mark 101 and the coordinates of the center of each ellipse;

[0099] Perform plane fitting according to the coordinates of the center of each ellipse to obtain the fitting plane equation and the normal vector of the fitting plane;

[0100] Calculating an affine transformation matrix according to the ellipse equation of the circular mark 101 and the normal vector of the fitting plane;

[0101] The coordinates of the center of each ellipse are converted into corresponding circle center coordinates through the affine transformation matrix, and the circle center coordinates are used as the three-dimensional coordinates of the circular mark 101 in the image coordinate system.

[0102] It should be noted that the 3D camera 2 can obtain a planar image and depth information of the photographed object, that is, three-dimensional position information.

[0103] More specifically, performing ellipse fitting on the contours of the circular marks 101 on the binary image to obtain the ellipse equation of each circular mark 101 contour and the coordinates of each ellipse center includes the following steps:

[0104] The edge point coordinates of the circular mark 101 on the binary image are extracted by using an edge detection algorithm, and the edge point coordinates are fitted by using a least square method to obtain an ellipse equation of the contour of the circular mark 101;

[0105] The coordinates of the center of the ellipse are acquired based on the ellipse equation of the outline of the circular mark 101 .

[0106] The standard equation of the ellipse is:

[0107] Ax 2 +bxy+Cy 2 +Dx+Ey+F=0;

[0108] The quadratic form of the standard equation of an ellipse is:

[0109] x T Qx=0;

[0110]

[0111]

[0112] The objective function of fitting the edge point coordinates using the least squares method is:

[0113] X opt =argmin(E ellipse );

[0114]

[0115] Where, X opt To optimize the goal, E ellipse is the error; u i and v i are the coordinates of the i-th edge point of the extracted circle center mark; u projected and v projected are the coordinates of the i-th edge point to be found.

[0116] More specifically, performing plane fitting according to the coordinates of each circular mark 101 in the image coordinate system to obtain a fitting plane equation and a normal vector of the fitting plane includes:

[0117] Taking the two circular marks 101 as a group, calculating the direction vector of the line connecting the center points of the two circular marks 101;

[0118] Based on the cross product of the direction vectors of the two connecting lines, the least squares method is used to solve the normal vector of the fitting plane and obtain the equation of the fitting plane.

[0119] The fitting plane equation is: n x X+n y Y+n z Z = 0;

[0120] The plane normal vector is:

[0121] Among them, X, Y, and Z are the coordinates of the X-axis, Y-axis, and Z-axis in the image coordinate system, respectively. x 、n y 、n z are the normal vectors of the fitted plane Components on the X-axis, Y-axis, and Z-axis.

[0122] The normal vector of the fitted plane can be obtained by the direction vector of any two connecting lines. The cross product of is:

[0123] Since the direction vectors of any two connecting lines can be calculated, the least squares method is used for fitting to obtain the optimal value of the normal vector of the fitting plane.

[0124] More specifically, the calculation of the affine transformation matrix between the image coordinate system and the positioning stage coordinate system according to the ellipse equation of the circular mark 101 and the normal vector of the fitting plane comprises the following steps:

[0125] Determine the major axis a and the minor axis b of the ellipse according to the ellipse equation of the circular mark 101;

[0126] Calculating the angle θ between the normal vector of the fitting plane and the normal vector of the positioning platform plane;

[0127] The affine transformation matrix θ between the image coordinate system and the positioning stage coordinate system is calculated according to the major axis a and the minor axis b of the ellipse and the angle θ. The formula is T s :

[0128]

[0129] r = 0.5 × (a + b);

[0130] Where r is the average radius of the ellipse.

[0131] It should be noted that the normal vector of the positioning platform plane Known,

[0132] Step 3, converting the coordinates of the circular mark 101 in the image coordinate system into the coordinates of the positioning platform coordinate system, comprises the following steps:

[0133] Convert the coordinates of the circular mark 101 in the image coordinate system into the coordinates of the camera coordinate system according to the intrinsic parameter matrix of the 3D camera 2;

[0134] According to the external parameter matrix of the 3D camera 2 , the coordinates of the circular mark 101 in the image coordinate system are converted into coordinates in the positioning stage coordinate system.

[0135] The coordinates of the circular mark 101 in the image coordinate system are converted into the coordinates of the camera coordinate system according to the intrinsic parameter matrix of the 3D camera 2, and the formula is as follows:

[0136]

[0137] Where [uv 1] T is the coordinate expression of the circular marker 101 in the image coordinate system, [x c y c z c ] T is the coordinate expression of the circular mark 101 in the camera coordinate system, and K is the internal parameter matrix.

[0138] The companies in the internal reference matrix are:

[0139] According to the external parameter matrix of the 3D camera 2, the coordinates of the circular mark 101 in the image coordinate system are converted into the coordinates of the positioning stage coordinate system. The formula is:

[0140]

[0141] In the formula, left [x w y w z w 1] T is the coordinate point expression of the circular marker 101 in the positioning stage coordinate system, [x c y c z c 1] T It is the expression of the ellipse coordinate point in the camera coordinate system, and T is the external parameter matrix.

[0142] The formula of the external parameter matrix is:

[0143]

[0144] Where R is a 3×3 rotation matrix and t is a 3×1 translation matrix.

[0145] During implementation, the intrinsic parameter matrix and the extrinsic parameter matrix of the 3D camera 2 can be obtained through calibration.

[0146] Step 5, matching the target point cloud with the reference point cloud to obtain the translation deviation and rotation deviation between the current position and the assembly position; the reference point cloud is the workpiece point cloud of the assembly position collected under the template posture.

[0147] Specifically, matching the target point cloud with the reference point cloud based on the iterative closest point algorithm to obtain the translation deviation and rotation deviation between the current position and the assembly position includes the following steps:

[0148] Set the initial translation deviation and rotation deviation;

[0149] For each point in the target point cloud, a nearest neighbor search algorithm is used to find the closest point in the reference point cloud, and the corresponding two points are used as a matching point pair;

[0150] Calculating the error between the target point cloud and the reference point cloud according to the matching point pairs;

[0151] With the goal of minimizing the error between the target point cloud and the reference point cloud, the translation deviation and the rotation deviation are optimized and adjusted to obtain the optimal translation deviation and rotation deviation as the translation deviation and rotation deviation between the current position and the assembly position.

[0152] Define the reference point cloud as P = (p1, p2, p3, ..., p N ); the coordinates of each point in the reference point cloud are p i =(x i ,y i ,z i ) T ; The target point cloud is Q = (q1, q2, q3, ..., q N );The coordinates of each point in the target point cloud are q i =(x i ′,y i ′,z i ′) T .

[0153] The formula for the error between the target point cloud and the reference point cloud is:

[0154]

[0155] q i =Rp i +t;

[0156] Where E(R,t) is the error, p i is the coordinate of the i-th point of the reference point cloud, q i is the coordinate of the i-th point of the target point cloud, R is the rotation deviation, and t is the translation deviation.

[0157] During implementation, the least square method is used to optimize and adjust the translation deviation and the rotation deviation.

[0158] The formulas for the translation deviation and the rotation deviation are:

[0159] R=VU T ;

[0160]

[0161] Among them, U and V T are the left singular vector matrix and the right singular vector matrix of the covariance matrix H, respectively. and are the centroids of the reference point cloud and the target point cloud respectively. They are calculated by the following steps:

[0162] Calculate the centroid of the reference point cloud and the target point cloud and

[0163]

[0164]

[0165] Centralized Data:

[0166]

[0167]

[0168] Calculate the covariance matrix H:

[0169]

[0170] Singularity decomposition:

[0171] H=U∑V T ;

[0172] Perform singular value decomposition (SVD) on the covariance matrix H to obtain the left singular vector matrix U, the singular value matrix Σ, and the right singular vector matrix V T .

[0173] Those skilled in the art will appreciate that all or part of the processes of the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, wherein the computer-readable storage medium is a disk, an optical disk, a read-only storage memory, or a random access memory, etc.

[0174] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.

Claims

1. An automatic positioning assembly system, characterized in that: The system comprises: a marking device for setting a circular mark on a target workpiece; A transport device, comprising a positioning table for carrying a target workpiece, wherein the positioning table transports the target workpiece to an assembly position by translation and / or rotation; A 3D camera is arranged above the assembly position, and is used to capture an image of the target workpiece; A control device, connected to the transport device, the assembly robot arm and the 3D camera respectively; Among them, after the marking device sets at least three circular marks on the target workpiece, the control device controls the transportation device to move the target workpiece with the circular marks to the assembly position; after the control device detects that the target workpiece is initially in place, the control device controls the 3D camera to capture the image of the target workpiece at the current position as the target image; the control device performs ellipse fitting processing on the circular marks on the target image to obtain the translation deviation and rotation deviation between the current position of the target workpiece and the assembly position; the control device controls the transportation device to move the target workpiece to the assembly position according to the translation deviation and the rotation deviation.

2. The system according to claim 1, characterized in that A proximity switch is provided at the assembly position, and the proximity switch is connected to the control device; When the proximity switch senses that the target workpiece moves to the assembly position, it sends an in-position signal to the control device. After receiving the in-position signal, the control device determines that the target workpiece is initially in position, and then controls the 3D camera to capture an image of the target workpiece at the current position as the target image.

3. The system according to claim 1 or 2, characterized in that: The transport device further comprises: a mounting platform, the positioning platform comprises a slide and a turntable, the turntable is rotatably arranged on the slide, and a fixture for fixing the target workpiece is arranged on the turntable; The installation platform is provided with a linear slide rail, and the bottom of the slide table is slidably connected to the linear slide rail.

4. The system according to claim 3, characterized in that The transport device further comprises: a first driving mechanism and a second driving mechanism; the first driving mechanism drives the slide to reciprocate along the linear slide rail; the second driving mechanism drives the turntable to rotate clockwise or counterclockwise on the slide; Among them, after the control device obtains the translation deviation and the rotation deviation, the control device generates a translation instruction according to the translation deviation and sends it to the first drive mechanism, and the first drive mechanism drives the slide table to translate a corresponding distance according to the translation instruction; the control device generates a rotation instruction according to the rotation deviation and sends it to the second drive mechanism, and the second drive mechanism drives the turntable to rotate a corresponding angle according to the rotation instruction.

5. The system according to claim 4, characterized in that The first driving mechanism comprises: a first servo motor, a lead screw and a linear slider, The length direction of the lead screw is parallel to the extension direction of the linear slide rail, the linear slider is fixedly connected to the bottom of the slide table, and the lead screw is threadedly connected to the linear slider; The control device is connected to the first servo motor, and the rotating shaft of the first servo motor is connected to one end of the screw rod to drive the screw rod to rotate.

6. The system according to claim 4, characterized in that The second driving mechanism comprises: a second servo motor, a worm and a turbine, The turbine is fixedly connected to the bottom of the turntable, and the gear teeth of the turbine are meshed with the threaded teeth of the worm; the control device is connected to the second servo motor, and the shaft of the second servo motor is connected to one end of the worm to drive the turbine to rotate.

7. The system according to claim 1 or 2, characterized in that: The control device obtains the translation deviation and rotation deviation between the current position and the assembly position based on performing ellipse fitting processing on the circular mark on the target image, including the following steps: Performing binarization processing on the target image to obtain a binarized image; Based on performing ellipse fitting processing on the circular marks on the binary image, obtaining the three-dimensional coordinates of each circular mark in the image coordinate system; Converting the coordinates of the circular mark in the image coordinate system into the coordinates of the positioning stage coordinate system; Recording the acquired three-dimensional coordinates of the circular mark in the positioning platform coordinate system to form target point cloud data; Matching the target point cloud with the reference point cloud to obtain the translation deviation and rotation deviation between the current position and the assembly position; The reference point cloud is the workpiece point cloud of the assembly position collected under the template posture.

8. The system according to claim 7, characterized in that The method of performing ellipse fitting processing on the circular marks on the binary image to obtain the three-dimensional coordinates of each circular mark in the image coordinate system comprises the following steps: Performing ellipse fitting on the contours of the circular marks on the binary image to obtain an ellipse equation of each circular mark contour and the coordinates of the center of each ellipse; Perform plane fitting according to the coordinates of the center of each ellipse to obtain the fitting plane equation and the normal vector of the fitting plane; Calculating an affine transformation matrix according to the ellipse equation of the circular mark and the normal vector of the fitting plane; The coordinates of the center of each ellipse are converted into corresponding circle center coordinates through the affine transformation matrix, and the circle center coordinates are used as the three-dimensional coordinates of the circular mark in the image coordinate system.

9. The system according to claim 7, characterized in that The step of converting the coordinates of the circular mark in the image coordinate system into the coordinates of the positioning stage coordinate system comprises the following steps: Convert the coordinates of the circular mark in the image coordinate system to the coordinates of the camera coordinate system according to the intrinsic parameter matrix of the 3D camera; According to the external parameter matrix of the 3D camera, the coordinates of the circular mark in the image coordinate system are converted into the coordinates of the positioning stage coordinate system.

10. The system according to claim 7, characterized in that The method of matching the target point cloud with the reference point cloud based on an iterative closest point algorithm to obtain a translation deviation and a rotation deviation between a current position and an assembly position includes the following steps: Set the initial translation deviation and rotation deviation; For each point in the target point cloud, a nearest neighbor search algorithm is used to find the closest point in the reference point cloud, and the corresponding two points are used as a matching point pair; Calculating the error between the target point cloud and the reference point cloud according to the matching point pairs; With the goal of minimizing the error between the target point cloud and the reference point cloud, the translation deviation and the rotation deviation are optimized and adjusted to obtain the optimal translation deviation and rotation deviation as the translation deviation and rotation deviation between the current position and the assembly position.

Citation Information

Patent Citations

  • Method and device for evaluating visual positioning accuracy of circular target, storage medium and processing equipment

    CN108596980A

  • Sunflower module assembling system based on visual guidance

    CN110497187A

  • Grabbing positioning method of robot

    CN111645074A

  • Assembly hole positioning method based on machine vision

    CN113838127A

  • Method and system for recognizing three-dimensional position and attitude on the basis of sense of sight

    JP1995098208A

Cited By

  • Automatic assembly detection system based on CCD industrial camera

    CN120269311A