Five-axis dispensing machine based on trinocular vision and precision calibration method thereof
By using a three-eye vision system and a coordinated camera in a five-axis dispenser, the field of view is expanded and the calibration blind spot problem is solved. Combined with real-time image processing and dynamic error compensation, high-precision and stable calibration of five-axis dispenser is achieved, and the problem of unstable calibration accuracy in the existing technology is solved.
Patent Information
- Application Number
- CN202510064519.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2025-06-13
Smart Images

Figure CN120133085A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of dispensing positioning, and more specifically, to a five-axis dispensing machine based on trinocular vision and its precision calibration method. Background Art
[0002] With the rapid development of industrial manufacturing technology, the application range and technical level of dispensing machines have been continuously improved. For example, in the fields of high-precision manufacturing, complex curved surface coating, microelectronics packaging, etc., the dispensing accuracy has been improved to the micro-nano level. To meet the requirements of modern manufacturing for high-precision and multi-degree-of-freedom dispensing operations, five-axis dispensing machines have become key equipment. Most traditional calibration technologies rely on monocular or binocular vision systems. However, due to the limited field of view coverage of the monocular system, it is difficult to comprehensively capture the motion characteristics of the equipment, and it is easy to have a field of view blind area, resulting in the loss of key points. Although the binocular system expands the field of view, due to insufficient data redundancy, its ability to correct the drift of the rotation center and angular errors is limited.
[0003] To solve the calibration errors based on monocular or binocular vision systems, there are calibration methods based on multiocular vision systems in the prior art. However, this calibration method is not applicable to the precision calibration in five-axis dispensing machines, so factors such as vibration and temperature fluctuations in the industrial field will still significantly affect the calibration accuracy, and there are deficiencies in real-time performance and stability. It is difficult for five-axis dispensing machines to meet the micron-level accuracy requirements in five-axis motion calibration. Summary of the Invention
[0004] The purpose of the present invention is to overcome the deficiency that the calibration of the multiocular vision system in the prior art is not applicable to the precision calibration of five-axis dispensing machines, and to provide a five-axis dispensing machine based on trinocular vision and its precision calibration method, which can ensure the stability and reliability of the calibration accuracy, improve the matching degree between the dispensing path and the target surface, and achieve high-precision dispensing.
[0005] To solve the above technical problems, the technical solution adopted by the present invention is:
[0006] Provided is a five-axis dispensing machine based on binocular vision, including a dispensing device, and further including a five-axis moving device. The five-axis moving device includes an X-axis moving mechanism, a Y-axis moving mechanism, a Z-axis moving mechanism, and an AC rotary table. The fixed end of the Z-axis moving mechanism is connected to the moving end of the X-axis moving mechanism, the fixed end of the AC rotary table is connected to the moving end of the Y-axis moving mechanism, and the Z-axis moving mechanism is located above the AC rotary table. The dispensing device is installed on the moving end of the Z-axis moving mechanism. A first shooting component and a second shooting component are further installed on the moving end of the Z-axis moving mechanism. The first shooting component and the second shooting component have an overlapping field of view area. A first calibration plate is provided on the table surface of the AC rotary table. When the five-axis moving device moves, the first calibration plate can enter the overlapping field of view area. A third shooting component and a second calibration plate are provided on the AC rotary table. When the AC rotary table rotates, relative rotation can occur between the third shooting component and the second calibration plate, and the second calibration plate is within the field of view area of the third shooting component.
[0007] The present invention further provides a precision calibration method for a five-axis dispensing machine based on binocular vision, including the following steps: The first shooting component, the second shooting component, and the third shooting component respectively include a first camera, a second camera, and a third camera;
[0008] Including the following steps:
[0009] S1. Camera installation: The first camera and the second camera are coplanar, and an acute angle is formed between the optical axes of the first camera and the second camera; the third camera is installed on the AC rotary table;
[0010] S2. Camera self-calibration: By shooting calibration plate images at multiple positions, the internal and external parameters of the first camera, the second camera, and the third camera are calculated respectively, and the minimum reprojection error is obtained to check the calibration accuracy of each camera;
[0011] S3. Visual measurement, including the following steps:
[0012] S31. Measuring the translation errors in the X-axis and Y-axis directions: Driving the five-axis moving device to move along the X-axis and Y-axis directions respectively and recording the displacements to obtain the theoretical displacement data of the X-axis and Y-axis; Collecting the calibration images taken by the first camera and the second camera and respectively obtaining the actual displacement data of the X-axis and Y-axis according to the feature point matching of the calibration images; respectively constructing error analysis models of the X-axis and Y-axis according to the theoretical displacement data and the actual displacement data of the X-axis and Y-axis;
[0013] S32. Measure the translation error in the Z-axis direction: Drive the five-axis moving device to move in the Z-axis direction and record the displacement to obtain the theoretical displacement data of the Z-axis; Collect the calibration images captured by the first camera and obtain the actual displacement data of the Z-axis according to the image sharpness evaluation function; Construct a Z-axis error analysis model based on the theoretical displacement data and the actual displacement data of the Z-axis;
[0014] S33. Measure the angular error in the A-axis direction: Drive the five-axis moving device to rotate around the A-axis and record the rotation angle to obtain the theoretical rotation angle data of the A-axis; Collect the calibration images of the third camera and obtain the actual rotation angle data of the A-axis by using the principle of moment invariance of the image or the geometric change of the feature points;
[0015] S34. Measure the angular error in the C-axis direction: Drive the five-axis moving device to rotate around the C-axis and record the rotation angle to obtain the theoretical rotation angle data of the C-axis; Collect the calibration images of the first camera and the second camera and obtain the actual rotation angle data of the C-axis by using the principle of moment invariance of the image;
[0016] S4. Vision calibration, including the following steps:
[0017] S41. Perform dynamic error compensation on the error analysis models of the X-axis, Y-axis, and Z-axis, and on the angular error compensation matrices of the A-axis and C-axis to obtain the compensation and correction results; and construct a global error model;
[0018] S42. Construct the actual pose model of the end point of the dispensing head in the dispensing device;
[0019] S43. Uniformly map the compensation and correction results and the global error model to the actual pose model for optimization;
[0020] S5. Comprehensive compensation: Construct the theoretical forward kinematics model of the dispensing head of the dispensing device, and combine the theoretical forward kinematics model and the global error model to correct and compensate the actual pose model, and verify the correction and compensation effect through real-time error correction and trajectory re-measurement;
[0021] S6. Further optimization: Perform a global iterative optimization strategy on the corrected and compensated actual pose model based on the LM algorithm.
[0022] Compared with the prior art, the beneficial effects of the present invention are:
[0023] The settings of the X-axis moving mechanism, Y-axis moving mechanism, Z-axis moving mechanism, and AC rotary table can be used to achieve the five-axis movement of the dispensing device; the settings of the first calibration plate and the second calibration plate can be used for the measurement calibration of the five-axis dispensing machine, improving the dispensing calibration accuracy; in the accuracy calibration method, the first, second, and third cameras working together can effectively expand the field of view, and at the same time, by using the complementarity and data redundancy of multiple perspectives, the calibration blind area problem caused by the field of view limitation can be solved, and thus the calibration efficiency and stability of the five-axis moving device can be improved; moreover, by combining real-time calibration image processing and dynamic error compensation, the five-axis dispensing machine based on trinocular vision can capture the motion errors during operation and correct them immediately, meeting the on-line calibration requirements in the dynamic production environment; the five-axis dispensing machine based on trinocular vision can further enhance the anti-interference ability through field of view cross-validation and data redundancy settings, ensuring the stability and reliability of the calibration accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 FIG. 6 is a schematic structural diagram of the first perspective of the first embodiment of the five-axis dispensing machine based on trinocular vision of the present invention;
[0025] Figure 2 FIG. 10 is a schematic structural diagram of the second perspective of the first embodiment of the five-axis dispensing machine based on trinocular vision of the present invention;
[0026] Figure 3 FIG. 14 is a schematic structural diagram of the second embodiment of the five-axis dispensing machine based on trinocular vision of the present invention;
[0027] Figure 4 FIG. 18 is a schematic partial structural diagram of the second embodiment of the five-axis dispensing machine based on trinocular vision of the present invention;
[0028] Figure 5 FIG. 22 is a schematic structural diagram of the fine-tuning bracket of the present invention;
[0029] Figure 6 FIG. 26 is a flowchart of the accuracy calibration method of the five-axis dispensing machine based on trinocular vision of the present invention.
[0030] In the drawings: 100, X-axis moving mechanism; 110, X-axis grating scale; 200, Y-axis moving mechanism; 210, Y-axis grating scale; 300, Z-axis moving mechanism; 400, AC rotary table; 410, workbench; 420, C-axis rotating mechanism; 430, A-axis rotating mechanism; 440, mounting frame; 450, extension frame; 460, rotating table; 470, rotating slide; 510, first shooting component; 520, second shooting component; 530, third shooting component; 600, first calibration plate; 700, second calibration plate; 800, dispensing device; 900, base; 910, gantry. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0031] The present invention will be further described below in conjunction with specific embodiments. Among them, the attached drawings are only for illustrative purposes, showing only schematic diagrams, not physical diagrams, and should not be construed as a limitation to this patent; in order to better illustrate the embodiments of the present invention, some components in the attached drawings will be omitted, enlarged or reduced, which does not represent the size of the actual product; for those skilled in the art, it is understandable that some well-known structures and their descriptions in the attached drawings may be omitted.
[0032] In the attached drawings of the embodiments of the present invention, the same or similar reference numerals correspond to the same or similar components; in the description of the present invention, it should be understood that if there are terms such as "upper", "lower", "left", "right", etc. indicating the orientation or positional relationship, they are based on the orientation or positional relationship shown in the attached drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, the terms describing the positional relationship in the attached drawings are only for illustrative purposes and should not be construed as a limitation to this patent. For those of ordinary skill in the art, the specific meanings of the above terms can be understood according to specific circumstances.
[0033] Embodiment 1
[0034] As Figures 1 to 2 shown in the first embodiment of a five-axis dispensing machine based on binocular vision of the present invention, it includes a dispensing device 800, and also includes a five-axis moving device. The five-axis moving device includes an X-axis moving mechanism 100, a Y-axis moving mechanism 200, a Z-axis moving mechanism 300, and an AC rotary table 400. The fixed end of the Z-axis moving mechanism 300 is connected to the moving end of the X-axis moving mechanism 100, and the fixed end of the AC rotary table 400 is connected to the moving end of the Y-axis moving mechanism 200. The Z-axis moving mechanism 300 is located above the AC rotary table 400; the dispensing device 800 is installed on the moving end of the Z-axis moving mechanism 300.
[0035] Among them, a first shooting component 510 and a second shooting component 520 are also installed on the moving end of the Z-axis moving mechanism 300. The first shooting component 510 and the second shooting component 520 have an overlapping field of view range area; a first calibration plate 600 is provided on the tabletop of the AC rotary table 400. When the five-axis moving device moves, the first calibration plate 600 can enter the overlapping field of view range area.
[0036] Among them, a third shooting component 530 and a second calibration plate 700 are provided on the AC rotary table 400. When the AC rotary table 400 rotates, relative rotation can occur between the third shooting component 530 and the second calibration plate 700, and the second calibration plate 700 is within the field of view range area of the third shooting component 530.
[0037] The settings of the X-axis moving mechanism, Y-axis moving mechanism, Z-axis moving mechanism, and AC rotary table can be used to achieve the five-axis movement of the dispensing device; the settings of the first, second, and third shooting components can achieve multi-view layout, effectively expanding the field of view; the settings of the first calibration plate and the second calibration plate can be used for the measurement and calibration of the five-axis dispensing machine, improving the dispensing calibration accuracy. In this embodiment, the dispensing device 800 is a prior art and will not be elaborated here. In this embodiment, the five-axis dispensing machine based on trinocular vision further includes a motion control card. The X-axis moving mechanism 100, Y-axis moving mechanism 200, Z-axis moving mechanism 300, AC rotary table 400, first shooting component 510, second shooting component 520, third shooting component 530, and dispensing device 800 are all communicatively connected to the motion control card and can be used to control the coordinated operation between various mechanisms. Among them, the first calibration plate 600 is a checkerboard calibration plate.
[0038] As Figure 1 and Figure 2 shown, the AC rotary table 400 includes a worktable 410, a C-axis rotation mechanism 420, an A-axis rotation mechanism 430, and a mounting bracket 440. The first calibration plate 600 is placed on the tabletop of the worktable 410. The worktable 410 is connected to the rotating end of the C-axis rotation mechanism 420. The fixed end of the C-axis rotation mechanism 420 is connected to the rotating end of the A-axis rotation mechanism 430. The fixed end of the A-axis rotation mechanism 430 is connected to the moving end of the Y-axis moving mechanism 200 through the mounting bracket 440; the third shooting component 530 is connected to the mounting bracket 440, and the second calibration plate 700 is connected to the rotating end of the A-axis rotation mechanism 430.
[0039] In this embodiment, the third shooting component 530 is fixedly connected to the mounting bracket 440 through an extension bracket 450, so that there can be a certain distance between the third shooting component 530 and the second calibration plate 700 in the horizontal direction, facilitating the shooting operation of the third shooting component 530. The C-axis rotation mechanism 420 includes a C-axis rotation motor, and the A-axis rotation mechanism 430 includes an A-axis rotation motor. It should be noted that the axial directions of the C-axis and the Z-axis are parallel to each other, and the axial directions of the A-axis and the X-axis are parallel to each other. In this embodiment, the second calibration plate 700 is vertically arranged, and the second calibration plate 700 is a dot calibration plate. Specifically, the dot calibration plate is a fan-shaped or semi-circular plate member.
[0040] In this embodiment, the five-axis dispensing machine based on trinocular vision further includes a base 900. A gantry 910 is installed on the base 900. The fixed end of the Y-axis moving mechanism 200 is installed on the base 900, and the fixed end of the X-axis moving mechanism 100 is installed on the gantry 910. The settings of the base 900 and the gantry 910 can improve the operating stability of the five-axis dispensing machine based on trinocular vision.
[0041] It should be noted that the X-axis moving mechanism 100, the Y-axis moving mechanism 200, and the Z-axis moving mechanism 300 can each be any one of a slide rail and slider mechanism, a lead screw and nut mechanism, and a telescopic cylinder mechanism. The first shooting assembly 510 includes a first camera and a light source assembly, and the second shooting assembly 520 and the third shooting assembly 530 are both similar to or the same as the structure of the first shooting assembly 510.
[0042] Embodiment 2
[0043] As Figures 3 to 5 shown is the second embodiment of a five-axis dispensing machine based on binocular vision according to the present invention. This embodiment is similar to Embodiment 1, except that the second calibration plate 700 is fixedly installed on the mounting frame 440, and the third shooting assembly 530 is connected to the rotating end of the A-axis rotating mechanism 430 through a fine-tuning bracket. Among them: the fine-tuning bracket includes a rotating table 460 and a rotating slide table 470. The third shooting assembly 530 is connected to the rotating end of the rotating table 460 through the rotating slide table 470, and the fixed end of the rotating table 460 is connected to the rotating end of the A-axis rotating mechanism 430; the rotating table 460 has a degree of freedom of rotating around the Y-axis, and the rotating slide table 470 has a degree of freedom of rotating around the Z-axis and a degree of freedom of sliding in the X-axis direction. The setting of the fine-tuning bracket enables the third shooting assembly 530 to perform position fine-tuning around the Y-axis, around the Z-axis, and in the X-axis direction.
[0044] Embodiment 3
[0045] As Figure 6 shown is the first embodiment of a precision calibration method according to the present invention, which is applied to the five-axis dispensing machine based on binocular vision described in Embodiment 1. The first shooting assembly 510, the second shooting assembly 520, and the third shooting assembly 530 respectively include a first camera, a second camera, and a third camera;
[0046] It includes the following steps:
[0047] S1. Camera installation: The first camera and the second camera are coplanar, and the optical axis of the first camera is parallel to the Z-axis direction, and the included angle between the optical axis of the first camera and the optical axis of the second camera is 30°; the third camera is installed on the extension frame 450.
[0048] S2. Camera self-calibration: By shooting calibration plate images at multiple positions, calculate the internal and external parameters of the first camera, the second camera, and the third camera respectively, and obtain the minimized reprojection error to test the calibration accuracy of each camera; among them, it specifically includes the following steps:
[0049] S21. Drive the X-axis moving mechanism 100. During the movement, the first camera and the second camera cooperate to capture the calibration images of the first calibration board 600. Use the findChessboardCorner() function of OpenCV to perform corner detection on the feature points in the calibration images. After extracting the corners, calculate the relative position relationship between the first camera and the second camera;
[0050] S22. Drive the A-axis rotating mechanism 430 to rotate the workbench 410 around the A-axis. During the rotation, the third camera captures the calibration images of the second calibration board 700, and combines the Canny edge detection algorithm to extract the feature positions of the feature points in the calibration images;
[0051] S23. Calculate the internal and external parameters of the first camera, the second camera, and the third camera using the Zhang Zhengyou calibration method; where, let K i be the camera internal parameter matrix, describing the internal imaging parameters of the camera; let R i and t i be the rotation matrix and the translation vector, representing the conversion from the world coordinate to the camera coordinate; s is the scale factor, [X w , Y w , Z w be the three-dimensional coordinates of the calibration points, [u i , v i be its pixel projection, R A describe the rotation attitude of the second calibration board 700 or the third camera;
[0052] For the first camera and the second camera, their projection formula is:
[0053]
[0054] R 2 = R 1 ×R 30° , where:
[0055]
[0056] For the third camera, its projection formula is:
[0057]
[0058] S24. Use the calibration results in step S23 to check the captured calibration images, accumulate the feature point errors in all calibration images, and calculate the minimized reprojection error:
[0059]
[0060] In the formula, N represents the total number of feature points in all calibration images, [u calc,i , v calc,irepresents the actual observed pixel coordinates calculated through the internal and external parameters of each camera, [u obs,i , v obs,i represents the theoretical projected pixel coordinates;
[0061] If the minimized reprojection error is within the error threshold, then step S3 is executed; otherwise, after replacing the camera, return to step S1. It should be noted that the error threshold can be set according to the actual usage scenario.
[0062] S3. Visual measurement, including the following steps:
[0063] S31. Measure the translation errors in the X-axis and Y-axis directions: Drive the five-axis moving device to move along the X-axis and Y-axis directions respectively and record the displacements to obtain the theoretical displacement data of the X-axis and Y-axis; Collect the calibration images taken by the first camera and the second camera and obtain the actual displacement data of the X-axis and Y-axis respectively according to the feature point matching of the calibration images; Construct the error analysis models of the X-axis and Y-axis respectively according to the theoretical displacement data and the actual displacement data of the X-axis and Y-axis. In this embodiment, an X-axis grating scale 110 and a Y-axis grating scale 210 are respectively provided at the X-axis moving mechanism 100 and the Y-axis moving mechanism 200;
[0064] Specifically, step S31 includes the following steps:
[0065] S311. Drive the X-axis moving mechanism 100 and the Y-axis moving mechanism 200 to move at a fixed step size respectively; Specifically, the fixed step size is 0.1 mm;
[0066] S312. After each movement at a fixed step size is completed, collect the displacement data recorded by the X-axis grating scale 110 and the Y-axis grating scale 210 as the theoretical displacement data; and collect the calibration images taken by the first camera and the second camera, use the SURF algorithm to extract the feature points of the first calibration board 600 in the calibration images, match the corresponding points in the calibration images before and after the movement, and calculate the coordinate change data as the actual displacement data;
[0067] S313. Construct the error analysis models of the X-axis and Y-axis:
[0068]
[0069] In the formula, respectively represent the actual displacement data obtained when driving the X-axis moving mechanism 100 and the Y-axis moving mechanism 200 to move, respectively represent the theoretical displacement data recorded by the X-axis grating scale 110 and the Y-axis grating scale 210.
[0070] S32. Measure the translational error in the Z-axis direction: Drive the five-axis moving device to move in the Z-axis direction and record the displacement to obtain the theoretical displacement data of the Z-axis; Collect the calibration images captured by the first camera and obtain the actual displacement data of the Z-axis according to the image sharpness evaluation function; Construct a Z-axis error analysis model based on the theoretical displacement data and the actual displacement data of the Z-axis;
[0071] Specifically, step S32 includes the following steps:
[0072] S321. Drive the Z-axis moving mechanism 300 to move at a fixed step size; Specifically, the fixed step size is 0.1 mm;
[0073] S322. After each movement at a fixed step size is completed, collect the data fed back by the servo motor of the Z-axis moving mechanism 300 as the theoretical displacement data; and, collect the calibration images captured by the first camera; The collected calibration images are analyzed through the image sharpness evaluation function, and the edge information is extracted in combination with the Sobel operator to optimize the image features, and a sharpness change curve related to the focal plane is established;
[0074] Among them, the image sharpness evaluation function is:
[0075]
[0076] In the formula, f represents the focal length, represents the gradient value of the calibration image at the imaging plane point (x, y);
[0077] S323. By fitting the curve change of the image sharpness evaluation function Q(f), determine the position change corresponding to the best focal plane and perform displacement measurement to obtain the actual displacement data, and construct a Z-axis error analysis model:
[0078]
[0079] In the formula, represents the actually measured focal length at the i-th position, represents the theoretical focal length at the i-th position, represents the actually measured sharpness value, represents the theoretical sharpness value.
[0080] It should be noted that by using the focal plane change method, the actual displacement of the first calibration plate 600 is determined through the sharpness change curve, a least squares error model is constructed, the deviation between the actual displacement and the theoretical displacement is quantified, and the Z-axis translational error is evaluated and analyzed; By using the focal plane change method to find the maximum value of the image sharpness evaluation function Q(f), and by fitting the change of the sharpness curve, the best focal plane position is determined; That is, at the focal length f opt where the sharpness change curve Q(f) is the largest.
[0081] S33. Measuring the angular error in the A-axis direction: driving the five-axis mobile device to rotate around the A-axis and record the rotation angle to obtain the theoretical rotation angle data of the A-axis; collecting the calibration image of the third camera and using the principle of image moment invariance or geometric changes of feature points to obtain the actual rotation angle data of the A-axis;
[0082] Specifically, step S33 includes the following steps:
[0083] S331. Drive the A-axis rotation mechanism 430 to rotate at a fixed angle, so that the second calibration plate 700 rotates around the A-axis; specifically, the fixed angle is 1°;
[0084] S332. After each fixed angle rotation, the theoretical rotation angle data is obtained using the rotation data of the A-axis rotation motor. And, collect the calibration image of the second calibration plate 700 taken by the third camera; use the image moment invariance principle to obtain the actual rotation angle data of the workbench 410 around the A axis; wherein the image moment is defined as:
[0085] M p,q =∑ x ∑ y x p y q I(x,y);
[0086] Where M p,q Represents the moment of the image, I(x,y) represents the pixel intensity; according to the invariance of the moment, the actual rotation angle data is calculated
[0087] S333. A-axis rotation error based on actual rotation angle data and theoretical rotation angle data Construct the A-axis angle error compensation matrix R A (Δθ A ).
[0088] S34. Measure the angular error in the C-axis direction: drive the five-axis mobile device to rotate around the C-axis and record the rotation angle to obtain the theoretical rotation angle data of the C-axis; collect the calibration images of the first camera and the second camera and use the principle of image moment invariance to obtain the actual rotation angle data of the C-axis;
[0089] Specifically, step S34 includes the following steps:
[0090] S341. Drive the C-axis rotation mechanism 420 to rotate at a fixed angle, so that the second calibration plate 700 rotates around the C-axis; specifically, the fixed angle is 1°;
[0091] After each rotation by a fixed angle, theoretical rotation angle data is obtained using the rotation data of the C-axis rotation motor; and, calibration images of the first calibration plate 600 captured by the first camera and the second camera are collected; using a feature point detection algorithm with sub-pixel accuracy, the findChessboardCorner() function is used to extract the feature points of the first calibration plate 600, and the corresponding relationship between the feature points in the fields of view of the first camera and the second camera is established through SURF image matching technology;
[0092] Combined with the geometric principle of binocular vision, the spatial relationship between the first camera and the second camera is described by the fundamental matrix F and the essential matrix E to ensure the consistency of the matching results; where:
[0093]
[0094] In the formula, K 1 and K 2 respectively represent the internal parameter matrices of the first camera and the second camera;
[0095] Using the principle of image moment invariance, the actual rotation angle data of the AC rotary table 400 rotating around the C-axis is obtained;
[0096] Construct the C-axis angle error compensation matrix R C (Δθ C ); where:
[0097]
[0098] In the formula, represents the actual rotation angle data, represents the theoretical rotation angle data.
[0099] S4. Visual calibration, including the following steps:
[0100] Perform dynamic error compensation on the error analysis models of the X-axis, Y-axis, and Z-axis, as well as on the A-axis and C-axis angle error compensation matrices, to obtain the compensation and correction results; and, construct a global error model;
[0101] Specifically, step S41 includes the following steps:
[0102] Use the linear interpolation method to fit the data obtained in steps S31 and S32 to construct an error compensation curve, and the error compensation formula is:
[0103] P e =P m +ΔP;
[0104]
[0105] In the formula, P e represents the compensation correction result, i.e., the actual position after correction; P m represents the theoretical target position; ΔP represents the compensation value; where:
[0106] ΔP x = E X - f x ;
[0107] ΔP y = E Y - f y ;
[0108] ΔP z = E Z - f z ;
[0109] In the formula, E X , E Y , E Z respectively represent the error analysis models of the X-axis, Y-axis, and Z-axis, and f x , f y , f z respectively represent the compensation functions fitted by linear interpolation;
[0110] S412. Perform reverse compensation on the data obtained in steps S33 and S34; where the compensation formula is:
[0111] R e = R m · R c ;
[0112] R c = R A (Δθ A )· R C (Δθ C );
[0113] In the formula, R e represents the actual rotation matrix after correction, R m represents the theoretical target rotation matrix, and R c represents the reverse compensation matrix;
[0114] S413. Construct a global error model:
[0115]
[0116] In the formula, O actual represents the actual dispensing head direction in the dispensing device 800, and P actual represents the actual dispensing head position in the dispensing device 800, and O idealRepresents the ideal dispensing head direction in the dispensing device 800, P ideal Represents the ideal dispensing head position in the dispensing device 800.
[0117] S42. Construct the actual pose model of the end point of the dispensing head in the dispensing device 800; specifically:
[0118] Drive the five-axis moving device to take multiple random points within the space to be calibrated. Specifically, 500 random points can be taken. The first, second, and third cameras take multiple groups of calibration images, detect the feature points and extract the sub-pixel coordinates; use the PnP algorithm to obtain the actual pose model of the end point of the dispensing head in the dispensing device 800 in the camera coordinate system:
[0119]
[0120] In the formula, O actual Represents the actual dispensing head direction in the dispensing device 800, P actual Represents the actual dispensing head position in the dispensing device 800.
[0121] S43. Map the compensation correction result and the global error model to the actual pose model for optimization; specifically, according to the compensation correction result P e , insert error correction points at each segment of the actual pose model to ensure dynamic error correction within the full path range; correct the rotation path through the inverse compensation matrix R c to ensure that the attitude of the rotational motion meets the requirements of the target path; adjust the motion position of the end point by superimposing the error inverse compensation value in the control instruction to ensure the consistency between the actual position and the target position.
[0122] S5. Comprehensive compensation: Construct the theoretical forward kinematics model of the dispensing head of the dispensing device 800, combine the theoretical forward kinematics model with the global error model to correct and compensate the actual pose model, input the corrected and compensated actual pose model into the motion control card, and dynamically adjust the five-axis linkage trajectory through the compensation instruction; after calibration, verify the correction and compensation effect through real-time error correction and trajectory re-measurement; where:
[0123] The theoretical forward kinematics model is:
[0124]
[0125] In the formula, the 3×3 matrix O ideal Represents the ideal dispensing head direction in the dispensing device 800, and the 3×1 vector P ideal Represents the ideal dispensing head position in the dispensing device 800;
[0126] The correction and compensation formula is:
[0127]
[0128] In the formula, represents the actual pose model after correction, represents the theoretical forward kinematics model, and Δg represents the global error model.
[0129] S6. Further optimization: Perform global iterative optimization strategy on the actual posture model after correction and compensation based on the LM algorithm;
[0130] Specifically, step S6 includes the following steps:
[0131] S61. Construct the residual objective function based on the difference between the actual pose model after correction and compensation and the theoretical forward kinematics model:
[0132]
[0133] In the formula, represents the actual trajectory point in the actual pose model after correction and compensation, represents the theoretical trajectory points in the theoretical forward kinematics model;
[0134] S62. The error parameter is iteratively optimized by the LM algorithm. The iterative optimization formula of the error parameter x is as follows:
[0135] Δx=x k+1 -x k ;
[0136]
[0137] Δx=-(J T J+λi) -1 J T F(x k );
[0138] In the formula, J represents the Jacobian matrix, λ represents the adjustment factor, I represents the identity matrix, and k represents the parameter value of the current iteration step;
[0139] S63. Combined with the actual retest data, the residual objective function F(x k ), when ‖Δx‖<∈, it is considered that the convergence condition is met; specifically, ∈=0.001 can be set.
[0140] The present invention can be applied to complex working conditions and complex curved surface dispensing tasks, and can dynamically adjust compensation parameters to meet different industrial needs, ensuring the stability and reliability of the calibration results in the actual production environment; the present invention can improve the spatial positioning accuracy and trajectory tracking accuracy of the five-axis dispensing machine, and is suitable for high-precision manufacturing scenarios.
[0141] Embodiment 4
[0142] This embodiment is the second embodiment of a precision calibration method, which is applied to the five-axis dispensing machine based on binocular vision described in Embodiment 2. This embodiment is similar to Embodiment 3, except that in step S1, the third camera is connected to the rotating end of the A-axis rotating mechanism 430 through a fine-tuning bracket.
[0143] In addition, in step S332: after each rotation of a fixed angle, the theoretical rotation angle data is obtained by using the rotation data of the A-axis rotation motor. And, collect the calibration image of the second calibration plate 700 captured by the third camera; use the geometric change of the feature points to obtain the actual rotation angle data of the rotation around the A-axis in the workbench 410; where, according to:
[0144]
[0145] In the formula, R(θ) is the rotation matrix, [X′, Y′, Z′] T is the three-dimensional coordinates of the rotated feature points, [X, Y, Z] T the three-dimensional coordinates of the feature points before rotation; calculate the actual rotation angle data Then, according to the A-axis rotation error between the actual rotation angle data and the theoretical rotation angle data Construct the A-axis angle error compensation matrix R A (Δθ A ).
[0146] In the specific content of the above specific implementation manner, each technical feature can be combined arbitrarily without contradiction. For the sake of concise description, not all possible combinations of the above technical features are described. However, as long as the combinations of these technical features do not conflict, they should all be considered as the scope described in this specification.
[0147] Obviously, the above embodiments of the present invention are only examples for clearly explaining the present invention, and are not limitations on the implementation manners of the present invention. For those of ordinary skill in the art, other different forms of changes or modifications can be made on the basis of the above description. It is not necessary and impossible to list all the implementation manners here. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention shall be included in the protection scope of the claims of the present invention.
Claims
1. A five-axis glue dispensing machine based on trinocular vision, comprising a glue dispensing device (800), characterized in that: It also includes a five-axis moving device, which includes an X-axis moving mechanism (100), a Y-axis moving mechanism (200), a Z-axis moving mechanism (300), and an AC rotating worktable (400). The fixed end of the Z-axis moving mechanism (300) is connected to the moving end of the X-axis moving mechanism (100), the fixed end of the AC rotating worktable (400) is connected to the moving end of the Y-axis moving mechanism (200), and the Z-axis moving mechanism (300) is located above the AC rotating worktable (400); the dispensing device (800) is installed at the moving end of the Z-axis moving mechanism (300); The moving end of the Z-axis moving mechanism (300) is also equipped with a first shooting component (510) and a second shooting component (520), and the first shooting component (510) and the second shooting component (520) have an overlapping field of view range; a first calibration plate (600) is provided on the table surface of the AC rotating worktable (400), and when the five-axis moving device moves, the first calibration plate (600) can enter the overlapping field of view range; The AC rotating workbench (400) is provided with a third shooting component (530) and a second calibration plate (700). When the AC rotating workbench (400) rotates, the third shooting component (530) and the second calibration plate (700) can rotate relative to each other, and the second calibration plate (700) is within the field of view of the third shooting component (530).
2. The five-axis dispensing machine based on three-eye vision according to claim 1 is characterized in that: The AC rotating workbench (400) comprises a workbench (410), a C-axis rotating mechanism (420), an A-axis rotating mechanism (430), and a mounting frame (440); the workbench (410) is connected to the rotating end of the A-axis rotating mechanism (430) via the C-axis rotating mechanism (420); the fixed end of the A-axis rotating mechanism (430) is connected to the moving end of the Y-axis moving mechanism (200) via the mounting frame (440); the third shooting component (530) is connected to the mounting frame (440); and the second calibration plate (700) is connected to the rotating end of the A-axis rotating mechanism (430).
3. The five-axis dispensing machine based on three-eye vision according to claim 1 is characterized in that: The AC rotating worktable (400) comprises a worktable (410), a C-axis rotating mechanism (420), an A-axis rotating mechanism (430), and a mounting frame (440); the worktable (410) is connected to the rotating end of the A-axis rotating mechanism (430) via the C-axis rotating mechanism (420); the fixed end of the A-axis rotating mechanism (430) is connected to the moving end of the Y-axis moving mechanism (200) via the mounting frame (440); the second calibration plate (700) is mounted on the mounting frame (440); the third shooting assembly (530) is connected to the rotating end of the A-axis rotating mechanism (430) via a fine-tuning bracket; wherein: The fine-tuning bracket comprises a rotating table (460) and a rotating slide (470); the third shooting component (530) is connected to the rotating end of the rotating table (460) via the rotating slide (470); the fixed end of the rotating table (460) is connected to the rotating end of the A-axis rotating mechanism (430); the rotating table (460) has the degree of freedom to rotate around the Y-axis, and the rotating slide (470) has the degree of freedom to rotate around the Z-axis and the degree of freedom to slide along the X-axis.
4. A precision calibration method for a five-axis dispensing machine based on trinocular vision according to any one of claims 1 to 3, characterized in that: The first shooting component (510), the second shooting component (520), and the third shooting component (530) respectively include a first camera, a second camera, and a third camera; The steps include: S1. Camera installation: The first camera and the second camera are coplanar, and the optical axis of the first camera and the optical axis of the second camera are arranged at an acute angle; the third camera is installed on the AC rotating workbench (400); S2. Camera self-calibration: by taking images of the calibration plate at multiple positions, the internal and external parameters of the first camera, the second camera, and the third camera are calculated respectively, and the minimized reprojection error is obtained to verify the calibration accuracy of each camera; S3. Visual measurement, including the following steps: S31. Measure the translation error in the X-axis and Y-axis directions: drive the five-axis mobile device to move along the X-axis and Y-axis directions respectively and record the displacement to obtain the theoretical displacement data of the X-axis and Y-axis; collect the calibration images taken by the first camera and the second camera and obtain the actual displacement data of the X-axis and Y-axis respectively according to the feature point matching of the calibration images; respectively construct the error analysis models of the X-axis and Y-axis according to the theoretical displacement data and the actual displacement data of the X-axis and Y-axis; S32. Measuring the translation error in the Z-axis direction: driving the five-axis mobile device to move along the Z-axis direction and recording the displacement to obtain theoretical displacement data of the Z-axis; collecting the calibration image taken by the first camera and obtaining the actual displacement data of the Z-axis according to the image clarity evaluation function; constructing a Z-axis error analysis model according to the theoretical displacement data and the actual displacement data of the Z-axis; S33. Measuring the angular error in the A-axis direction: driving the five-axis mobile device to rotate around the A-axis and recording the rotation angle to obtain the theoretical rotation angle data of the A-axis; collecting the calibration image of the third camera and using the image moment invariance principle or the geometric change of the feature point to obtain the actual rotation angle data of the A-axis; S34. Measuring the angular error in the C-axis direction: driving the five-axis mobile device to rotate around the C-axis and recording the rotation angle to obtain the theoretical rotation angle data of the C-axis; collecting the calibration images of the first camera and the second camera and using the principle of image moment invariance to obtain the actual rotation angle data of the C-axis; S4. Visual calibration, including the following steps: S41. Perform dynamic error compensation on the error analysis models of the X-axis, Y-axis, and Z-axis, and on the angle error compensation matrices of the A-axis and C-axis to obtain compensation correction results; and construct a global error model; S42. Constructing an actual posture model of the end point of the glue dispensing head in the glue dispensing device (800); S43. Mapping the compensation correction result and the global error model to the actual posture model for optimization; S5. Comprehensive compensation: constructing a theoretical forward kinematics model of the dispensing head of the dispensing device (800), combining the theoretical forward kinematics model with the global error model to correct and compensate the actual posture model, and verifying the correction and compensation effect through real-time error correction and trajectory re-measurement; S6. Further optimization: A global iterative optimization strategy is performed on the actual posture model after correction and compensation based on the LM algorithm.
5. The accuracy calibration method according to claim 4, characterized in that: In step S1, the optical axis of the first camera is parallel to the Z axis, and the angle between the optical axis of the first camera and the optical axis of the second camera is 30°; step S2 specifically includes the following steps: S21. driving the X-axis moving mechanism (100), and during the movement, the first camera and the second camera cooperate to capture the calibration image of the first calibration board (600), use the findChessboardCorner() function to perform corner point detection on feature points in the calibration image, and calculate the relative position relationship between the first camera and the second camera after extracting the corner points; S22. driving the AC rotary table (400) to rotate around the A axis, and during the rotation, the third camera captures the calibration image of the second calibration plate (700), and extracts the characteristic positions of the characteristic points in the calibration image in combination with the Canny edge detection algorithm; S23. Calculate the internal and external parameters of the first camera, the second camera, and the third camera using Zhang Zhengyou calibration method; wherein, let K i is the camera intrinsic parameter matrix, R i and t i is the rotation matrix and translation vector, s is the scale factor, [X w ,Y w ,Z w ] is the three-dimensional coordinate of the calibration point, [u i ,v i ] is its pixel projection, R A Describing the rotational posture of the second calibration plate (700) or the third camera; For the first camera and the second camera, the projection formula is: R2=R1×R 30° ,in: For the third camera, the projection formula is: S24. Use the calibration result of step S23 to check the captured calibration image, accumulate the feature point errors in all calibration images, and calculate the minimum reprojection error: Where N represents the total number of feature points in all calibration images, [u calc,i ,v calc,i ] represents the actual observed pixel coordinates calculated by the internal and external parameters of each camera, [u obs,i ,v obs,i ] represents the theoretical projection pixel coordinates; If the minimized reprojection error is within the error threshold, step S3 is executed, otherwise, after changing the camera, the process returns to step S1.
6. The accuracy calibration method according to claim 4, characterized in that: The X-axis moving mechanism (100) and the Y-axis moving mechanism (200) are respectively provided with an X-axis grating ruler (110) and a Y-axis grating ruler (210); Step S31 specifically includes the following steps: S311. driving the X-axis moving mechanism (100) and the Y-axis moving mechanism (200) to move at a fixed step length respectively; S312. After each fixed-step movement is completed, the displacement data recorded by the X-axis grating ruler (110) and the Y-axis grating ruler (210) are collected as theoretical displacement data; and the calibration images taken by the first camera and the second camera are collected, and the feature points of the first calibration plate (600) in the calibration images are extracted using the SURF algorithm, and the corresponding points in the calibration images before and after the movement are matched, and the coordinate change data is calculated as the actual displacement data; S313. Construct the error analysis model of the X-axis and Y-axis: In the formula, respectively represent actual displacement data obtained when driving the X-axis moving mechanism (100) and the Y-axis moving mechanism (200) to move, Respectively represent the theoretical displacement data recorded by the X-axis grating ruler (110) and the Y-axis grating ruler (210); Step S32 specifically includes the following steps: S321. driving the Z-axis moving mechanism (300) to move at a fixed step length; S322. After each fixed-step movement is completed, the displacement data of the driving member of the Z-axis moving mechanism (300) is collected as theoretical displacement data; and the calibration image taken by the first camera is collected, and the collected calibration image is analyzed by an image clarity evaluation function, and the edge information is extracted in combination with the Sobel operator, the image features are optimized, and a clarity change curve related to the focal plane is established; Wherein, the image clarity evaluation function is: Where f is the focal length, Represents the gradient value of the calibration image at the imaging plane point (x, y); S323. By fitting the curve change of the image clarity evaluation function Q(f), the position change corresponding to the optimal focal plane is determined and the displacement measurement is performed to obtain the actual displacement data, and the error analysis model of the Z axis is constructed: In the formula, represents the actual measured focal length at the ith position, represents the theoretical focal length of the ith position, Indicates the actual measured clarity value, Representation and theoretical clarity values; Step S33 specifically includes the following steps: S331. driving the AC rotary table (400) to rotate around the A axis; S332. After each fixed-angle rotation is completed, the theoretical rotation angle data is obtained by using the rotation data of the driving member rotating around the A axis in the AC rotary table (400); and the calibration image of the second calibration plate (700) taken by the third camera is collected; and the actual rotation angle data of the AC rotary table (400) rotating around the A axis is obtained by using the image moment invariance principle or the geometric change of the feature point; S333. Construct an A-axis angle error compensation matrix R according to the actual rotation angle data and the theoretical rotation angle data. A (Δθ A ); Step S34 specifically includes the following steps: S341. driving the AC rotary table (400) to rotate around the C axis; S342. After each fixed-angle rotation is completed, the theoretical rotation angle data is obtained using the rotation data of the driving member rotating around the C axis in the AC rotary table (400); and the calibration images of the first calibration plate (600) taken by the first camera and the second camera are collected; the feature points of the first calibration plate (600) are extracted using the findChessboardCorner() function using a feature point detection algorithm with sub-pixel accuracy, and the corresponding relationship between the feature points in the field of view of the first camera and the second camera is established using the SURF image matching technology; S343. Combining the geometric principle of binocular vision, the spatial relationship between the first camera and the second camera is described by the basic matrix F and the essential matrix E to ensure the consistency of the matching results; wherein: Wherein, K1 and K2 represent the intrinsic parameter matrices of the first camera and the second camera respectively; S344. Using the principle of image moment invariance, the actual rotation angle data of the AC rotary table (400) rotating around the C axis is obtained; S345. Construct C-axis angle error compensation matrix R C (Δθ C );in: In the formula, Indicates the actual rotation angle data, Indicates theoretical rotation angle data.
7. The accuracy calibration method according to claim 6, characterized in that: Step S41 specifically includes the following steps: S411. Use the linear interpolation method to fit the data obtained in steps S31 and S32 to construct an error compensation curve. The error compensation formula is: P e =P m +ΔP; P e =[P ex ,P ey ,P ez ] T ; P m =[P mx ,P my ,P mz ] T ; ΔP=[ΔP x ,ΔP y ,ΔP z ] T ; Where P e Indicates the compensation correction result, that is, the actual position after correction; P m represents the theoretical target position; ΔP represents the compensation value; where: ΔP x =E X -f x ; ΔP y =E Y -f y ; ΔP z =E Z -f z ; In the formula, E X 、E Y 、E Z Respectively represent the error analysis models of the X-axis, Y-axis, and Z-axis, and f x 、f y 、f z They represent the compensation functions fitted by linear interpolation respectively; S412. Perform reverse compensation on the data obtained in steps S33 and S34; wherein the compensation formula is: R e =R m ·R c ; R c =R A (Dth A )·R C (Dth C ); In the formula, R e Represents the actual rotation matrix after correction, R m represents the theoretical target rotation matrix, R c represents the inverse compensation matrix; S413. Construct the global error model: In the formula, O actual represents the actual direction of the glue dispensing head in the glue dispensing device (800), P actual represents the actual position of the glue dispensing head in the glue dispensing device (800), ideal represents the ideal glue dispensing head direction in the glue dispensing device (800), P ideal Indicates the ideal position of the glue dispensing head in the glue dispensing device (800).
8. The accuracy calibration method according to claim 4, characterized in that: Step S42 specifically includes: driving the five-axis moving device to select multiple random points within the space to be calibrated, the first, second and third cameras taking multiple groups of calibration images, detecting feature points and extracting sub-pixel coordinates; and using the PnP algorithm to obtain the actual position and posture model of the end point of the dispensing head in the dispensing device (800) in the target coordinate system under the camera calibration system: In the formula, O actual represents the actual direction of the glue dispensing head in the glue dispensing device (800), P actual Indicates the actual position of the glue dispensing head in the glue dispensing device (800).
9. The accuracy calibration method according to claim 4, characterized in that: In step S5: The theoretical forward kinematics model is: In the formula, the 3×3 matrix O ideal The 3×1 vector P represents the ideal dispensing head direction in the dispensing device (800). ideal Indicates the ideal position of the glue dispensing head in the glue dispensing device (800); The correction compensation formula is: In the formula, represents the actual pose model after correction, represents the theoretical forward kinematics model, and Δg represents the global error model.
10. The accuracy calibration method according to claim 9, characterized in that: Step S6 specifically includes the following steps: S61. Construct the residual objective function based on the difference between the actual pose model after correction and compensation and the theoretical forward kinematics model: In the formula, represents the actual trajectory point in the actual pose model after correction and compensation, represents a theoretical trajectory point in the theoretical forward kinematics model; S62. The error parameter is iteratively optimized by the LM algorithm. The iterative optimization formula of the error parameter x is as follows: Δx=x k+1 -x + ; Δx=-(J T J+λI) -1 J T F(x k ); In the formula, J represents the Jacobian matrix, λ represents the adjustment factor, I represents the identity matrix, and k represents the parameter value of the current iteration step; S63. When ‖Δx‖<∈, the convergence condition is considered to be met.
Citation Information
Cited By
Calibration precision compensation device and method for five-axis machine table
CN120445125A
Image acquisition and analysis method based on five-axis dispensing machine
CN121921380A
An Image Acquisition and Analysis Method Based on a Five-Axis Dispensing Machine
CN121921380B
Dispensing positioning method and system thereof
CN122530317A