Galvanometer calibration method and system based on scanner

By obtaining the scan error set of the scanner and iterating the initial calibration coordinates of the calibration galvanometer, combined with dynamic weight allocation, the problems of low error calibration efficiency and difficulty in adjusting the error weight in the prior art are solved, and higher calibration accuracy and stability are achieved.

CN120028020AActive Publication Date: 2025-05-23GUANGZHOU JINYUANMING TECH CO LTD

Patent Information

Application Number
CN202510186838.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-20
Publication Date
2025-05-23
Estimated Expiration
2045-02-20

AI Technical Summary

Technical Problem

The prior art is difficult to effectively calibrate galvanomic errors, and the error weight is difficult to dynamically adjust, resulting in a significant impact on the overall accuracy in high-speed or large-format operations.

Method used

By obtaining the scan error set of the scanner, the original coordinate system of the scanner is calibrated, the calibration coordinate system is generated, and the initial calibration coordinate of the laser dot matrix is ​​extracted using the coordinate system, and the calibration is iteratively corrected until the optimal error coordinate of the galvanometer is generated. At the same time, the calibration weights of each axes are dynamically calculated and the weights are allocated according to the error standard deviation.

Benefits of technology

Adaptive compensation from scanning error to galvanometer error is realized, the calibration accuracy and stability of the galvanometer system are improved, and the problem of difficulty in dynamic adjustment of error weights is solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120028020A_ABST
    Figure CN120028020A_ABST
Patent Text Reader

Abstract

The invention discloses a galvanometer calibration method and system based on a scanner. The method comprises the following steps: acquiring a scanning error set of the scanner; according to the scanning error set, calibrating an original coordinate system of the scanner, and generating a calibrated coordinate system of the scanner; acquiring a laser dot matrix printed by the galvanometer based on the initial vector diagram; extracting an initial calibration coordinate of the laser dot matrix in the calibrated coordinate system; wherein the initial calibration coordinate represents the scanning coordinate of the residual galvanometer error after the calibration scanning error; iteratively calibrating the initial calibration coordinate by using the scanning error set until the optimal error coordinate of the galvanometer is generated; according to the invention, the self-adaptive compensation from the scanning error to the galvanometer error is realized, the calibration precision of the galvanometer system is improved, the error can be optimized in a targeted manner, and the overall calibration precision of the galvanometer is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of galvanometer calibration, and in particular to a galvanometer calibration method and system based on a scanner. Background Art

[0002] In high-precision scanning and laser marking equipment, the calibration accuracy of the scanner and galvanometer system is the core factor affecting the output quality. Existing high-precision scanners rely on advanced optical, mechanical and signal processing technologies to make their scanning errors small and stable, and the errors are kept within a controllable range in multiple scans. However, due to the complexity of mechanical movement, the instability of reflector adjustment and environmental changes, the galvanometer system often produces large errors. Especially in high-speed or large-format operations, the impact of galvanometer errors on overall accuracy is particularly significant.

[0003] Although existing technologies have attempted to calibrate the scanner and galvanometer separately, most methods only use a static single calibration, which makes it difficult to continuously optimize errors in practical applications. More importantly, existing calibration methods usually fail to adjust the weights according to the error differences of different axes, and often simply correct the X-axis and Y-axis errors with the same weight, resulting in limited calibration effects when the errors are unevenly distributed. Especially under the conditions where the galvanometer error is large and the scanning error is small, how to reasonably use the scanning error for iterative calibration and dynamically adjust the error weights of each axis is still a difficulty in current technology. Summary of the invention

[0004] This embodiment provides a scanner-based galvanometer calibration method and system, and explores how to solve the problem of calibrating the galvanometer error and the difficulty in dynamically adjusting the error weight.

[0005] In a first aspect, the present invention provides a galvanometer calibration method based on a scanner, the method comprising:

[0006] S1. Obtaining a scanning error set of the scanner;

[0007] S2. Calibrate the original coordinate system of the scanner according to the scanning error set to generate a calibrated coordinate system of the scanner;

[0008] S3, obtaining the laser dot matrix printed by the galvanometer based on the initial vector diagram;

[0009] S4, extracting the initial calibration coordinates of the laser dot array in the calibrated coordinate system; wherein the initial calibration coordinates represent the scanning coordinates of the residual galvanometer error after calibrating the scanning error;

[0010] S5. Using the scanning error set, iteratively calibrate the initial calibration coordinates until the optimal error coordinates of the galvanometer are generated.

[0011] In some embodiments, obtaining a scanning error set of the scanner includes:

[0012] S1-1, establish the original coordinate system of the scanner;

[0013] S1-2, based on the design parameters of the chessboard calibration plate, defining the theoretical coordinates of the chessboard calibration plate in the original coordinate system; wherein the chessboard calibration plate has a plurality of black and white squares distributed in a square grid, and the black and white squares share an inner angle intersection at each intersection;

[0014] S1-3, obtaining a chessboard scan image after scanning the chessboard calibration plate;

[0015] S1-4, using the OpenCV image processing library to identify the scanning coordinates of several inner corner intersections in the chessboard scanning image;

[0016] S1-5, calculating the scanning coordinate errors of the plurality of interior angle intersection points according to the scanning coordinates and theoretical coordinates of the plurality of interior angle intersection points;

[0017] The scanning coordinate error is a four-element calibration coefficient, which is: X-axis error direction, X-axis error value, Y-axis error direction, Y-axis error value;

[0018] S1-6, repeatedly scan the chessboard calibration plate to obtain the scanning coordinate errors of all inner corner intersections within the rated scanning range of the scanner;

[0019] S1-7. Define the scanning coordinate errors of all inner angle intersections within the rated scanning range and the set of scanning coordinates as the scanning error set.

[0020] In some embodiments, the scanning coordinate errors and the set of scanning coordinates of all inner angle intersections within the rated scanning range are defined as the scanning error set; including:

[0021] S1-7-1, obtain the quaternion calibration coefficient and scanning coordinates of any inner angle intersection point;

[0022] S1-7-2. Generate an X-axis calibration amount and a Y-axis calibration amount of the interior angle intersection according to the quaternion calibration coefficients;

[0023] S1-7-3, defining a combination of an X-axis calibration amount, a Y-axis calibration amount, and a scanning coordinate of the inner angle intersection as a ternary calibration pair of the inner angle intersection;

[0024] S1-7-4. Collect the ternary calibration pairs of all inner angle intersections within the rated scanning range to obtain the scanning error set.

[0025] In some embodiments, calibrating an original coordinate system of the scanner according to the scanning error set to generate a calibrated coordinate system of the scanner includes:

[0026] S2-1, selecting any initial coordinate to be calibrated from the original coordinate system;

[0027] S2-2, using the OpenCV image processing library to identify the anchored scan coordinates corresponding to the initial calibration coordinates;

[0028] S2-3, matching the three-element calibration pair corresponding to the scan coordinates after anchoring from the scan error set;

[0029] S2-4, selecting an X-axis calibration amount and a Y-axis calibration amount of the initial coordinates to be calibrated according to the ternary calibration pair, and calibrating the initial coordinates to be calibrated using the X-axis calibration amount and the Y-axis calibration amount;

[0030] S2-5, selecting adjacent coordinates of the initial coordinates to be calibrated, performing the calibration, and generating calibrated coordinates, until the scanning coordinates of all inner angle intersections within the rated scanning range are calibrated;

[0031] S2-6. Define a calibrated coordinate system of the scanner according to the calibrated coordinates.

[0032] In some embodiments, extracting the initial calibration coordinates of the laser dot array in the calibrated coordinate system includes:

[0033] S4-1, scanning the laser dot matrix using a scanner having a calibrated coordinate system to generate a laser dot matrix scanning image; wherein the laser dot matrix scanning image has a plurality of cross intersections of the laser dot matrix;

[0034] S4-2. Use the OpenCV image processing library to extract the initial calibration coordinates of several cross intersections in the laser dot matrix scanning image.

[0035] In some embodiments, the initial calibration coordinates are iteratively calibrated using the scanning error set until an optimal error coordinate of the galvanometer is generated, including:

[0036] S5-1, matching ternary calibration pairs of a plurality of cross intersections from the scanning error set according to the scanning coordinates of the plurality of cross intersections;

[0037] S5-2, extracting X-axis calibration values ​​and Y-axis calibration values ​​of a plurality of cross intersections according to the matched ternary calibration pairs;

[0038] S5-3, calculating the galvanometer calibration coordinates of several cross intersections in the laser dot matrix scanning image according to the X-axis calibration amount, the Y-axis calibration amount and the corresponding scanning coordinates of the several cross intersections;

[0039] S5-4, determining the average deviation loss between the galvanometer calibration coordinates and the galvanometer standard coordinates of a number of cross intersections in the laser dot matrix scanning image;

[0040] S5-5. If the average deviation loss is less than a preset loss threshold, the current galvanometer calibration coordinates are output and defined as the optimal error coordinates of the galvanometer; otherwise, the galvanometer calibration coordinates of several cross intersections in the laser dot matrix scanning image are iteratively calculated.

[0041] In some of the embodiments, determining the deviation loss between the galvanometer calibration coordinates and the galvanometer standard coordinates of a plurality of cross intersections in the laser dot matrix scanning image includes:

[0042] S5-4-1, extracting the galvanometer calibration coordinates and the galvanometer standard coordinates of several cross intersections;

[0043] S5-4-2, calculating the deviation between the galvanometer calibration coordinates and the galvanometer standard coordinates on the X-axis and Y-axis at each cross intersection;

[0044] S5-4-3, obtaining the X-axis weight of the X-axis deviation difference and the Y-axis weight of the Y-axis deviation difference;

[0045] S5-4-4, substitute the X-axis deviation difference, X-axis weight, Y-axis deviation difference and Y-axis weight into the weighted Manhattan distance formula to calculate the deviation loss of each cross intersection;

[0046] The calculation expression of the deviation loss is:

[0047] D=w x ×|X c -X s |+w y ×|Y c -Y s |;

[0048] Where D represents the deviation loss of each cross intersection, X c , Y c Indicates the galvanometer calibration coordinates, X s , Y s represents the standard coordinates of the galvanometer, |X c -X s | represents the X-axis deviation, |Y c -Y s | represents the Y-axis deviation, w x represents the X-axis weight, w y Indicates the Y-axis weight.

[0049] S5-4-5. The average of the sum of the deviation losses of all cross intersections is defined as the average deviation loss;

[0050] In some embodiments, obtaining an X-axis weight of the X-axis deviation difference and a Y-axis weight of the Y-axis deviation difference includes:

[0051] S5-4-3-1. Extracting the X-axis error value and the Y-axis error value of each inner angle intersection from the scanning error set;

[0052] S5-4-3-2, calculating the standard deviation of all X-axis error values ​​and the standard deviation of all Y-axis error values ​​in the scanning error set;

[0053] The expression of the standard deviation of the X-axis error value is:

[0054]

[0055] The expression of the standard deviation of the Y-axis error value is:

[0056]

[0057] Among them, σ x and σ y They represent the standard deviation of all X-axis error values ​​and the standard deviation of all Y-axis error values ​​in the scanning error set respectively; n represents the number of all interior angle intersections within the rated scanning range; and Respectively represent the deviation difference of the i-th interior angle intersection point on the X-axis and the Y-axis, and They represent the mean of the X-axis deviation and the mean of the Y-axis deviation respectively;

[0058] S5-4-3-3, calculating the X-axis weight and the Y-axis weight according to the standard deviation of all X-axis error values ​​and the standard deviation of all Y-axis error values;

[0059] The calculation expression of the X-axis weight is:

[0060]

[0061] The calculation expression of the Y-axis weight is:

[0062]

[0063] Compared with the prior art, the scanner-based galvanometer calibration method of the present invention establishes a scanning error set covering the entire scanning range by taking advantage of the small and controllable scanning error, and uses this as a calibration benchmark to iteratively correct the problem of large galvanometer errors. Compared with the traditional method, this solution can dynamically optimize the calibration parameters in each iteration, realize adaptive compensation from scanning error to galvanometer error, and improve the calibration accuracy of the galvanometer system.

[0064] Furthermore, the present invention extracts the standard deviation of the error of the X-axis and the Y-axis and dynamically calculates the calibration weight of each axis, so that the axis with larger error obtains a higher correction priority. This solves the problem of equal weight of the error of each axis in the prior art, ensures that the error can be optimized in a targeted manner when the error distribution is uneven, and improves the overall calibration accuracy of the galvanometer.

[0065] In a second aspect, the present invention provides a galvanometer calibration system based on a scanner, comprising:

[0066] A scanning error acquisition module, used to acquire a scanning error set of the scanner;

[0067] An initial calibration module, used to calibrate the original coordinate system of the scanner according to the scanning error set, and generate a calibrated coordinate system of the scanner;

[0068] A laser dot matrix acquisition module is used to acquire the laser dot matrix printed by the galvanometer based on the initial vector graph;

[0069] An extraction module, used to extract the initial calibration coordinates of the laser dot array in the calibrated coordinate system; wherein the initial calibration coordinates represent the scanning coordinates of the residual galvanometer error after the scanning error is calibrated;

[0070] The iterative calibration module is used to iteratively calibrate the initial calibration coordinates using the scanning error set until an optimal error coordinate of the galvanometer is generated.

[0071] Compared with the prior art, the beneficial effects of the scanner-based galvanometer calibration system of the present invention are the same as the beneficial effects of the scanner-based galvanometer calibration method described above, so they are not described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] Figure 1 It is a schematic diagram of the steps of the galvanometer calibration method based on the scanner of the present invention;

[0073] Figure 2 A schematic diagram of the steps of iteratively calibrating the initial calibration coordinates of the present invention;

[0074] Figure 3 It is a structural block diagram of the galvanometer calibration system of the scanner of the present invention. DETAILED DESCRIPTION

[0075] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.

[0076] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the", "these" and the like in this application do not represent quantitative restrictions, and they can be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether directly or indirectly. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, "A and / or B" can mean: A exists alone, A and B exist at the same time, and B exists alone. Usually, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.

[0077] refer to Figures 1 to 3 In an embodiment of the present invention, a galvanometer calibration method based on a scanner is provided. Figure 1 : is a flow chart of a galvanometer calibration method based on a scanner of the present invention, the process comprising:

[0078] S1. Obtaining a scanning error set of the scanner;

[0079] S2. Calibrate the original coordinate system of the scanner according to the scanning error set to generate a calibrated coordinate system of the scanner;

[0080] S3, obtaining the laser dot matrix printed by the galvanometer based on the initial vector diagram;

[0081] In this solution, the initial vector diagram is a regular dot matrix pattern. For example, the initial vector diagram is a standard cross intersection grid, and each intersection has a clear theoretical coordinate; ideally, the laser dot matrix should completely overlap with the initial vector diagram. In practice, due to the galvanometer error, the laser dot matrix will deviate from the theoretical coordinates of the initial vector diagram in some areas. In this embodiment, the galvanometer prints out a series of cross intersections according to the initial vector diagram. These intersections should coincide with the theoretical coordinates on the X-axis and Y-axis, but the deviation caused by the error forms a laser dot matrix scanning diagram that needs to be calibrated.

[0082] S4, extracting the initial calibration coordinates of the laser dot array in the calibrated coordinate system; wherein the initial calibration coordinates represent the scanning coordinates of the residual galvanometer error after calibrating the scanning error;

[0083] S5. Using the scanning error set, iteratively calibrate the initial calibration coordinates until the optimal error coordinates of the galvanometer are generated.

[0084] In this embodiment, the original coordinate system of the scanner is calibrated by introducing a scanning error set, thereby generating a calibrated coordinate system to ensure that the scanning error is eliminated in the subsequent scanning process. Furthermore, the initial calibration coordinates of the laser dot matrix printed by the galvanometer are obtained through the calibrated coordinate system, which realizes the accurate extraction of the galvanometer error without the interference of the scanning error. Finally, through iterative calibration, the calibration accuracy is continuously optimized using the scanning error set until the optimal error coordinates of the galvanometer are obtained, thereby improving the accuracy and stability of the galvanometer calibration.

[0085] In this embodiment, step S1 includes:

[0086] S1-1, establish the original coordinate system of the scanner;

[0087] In this embodiment, the forward direction of the scanner stepper motor can be set to the Y-axis direction (vertical), which means that the stepper motor moves vertically along the Y-axis during the scanning process, corresponding to the up and down movement of the scanner. The CCD pixel arrangement direction is set to the X-axis direction (horizontal), which means that the arrangement of the scanner's photosensitive element (CCD) is along the horizontal direction. The scanned image is scanned line by line, and the X-axis represents the order of scanning each line. Set the upper left corner as the origin. In image processing and computer vision, the origin of the image coordinate system is usually assumed to be in the upper left corner. That is:

[0088] The X coordinate increases from left to right;

[0089] The Y coordinate increases from top to bottom.

[0090] S1-2, based on the design parameters of the chessboard calibration plate, defining the theoretical coordinates of the chessboard calibration plate in the original coordinate system; wherein the chessboard calibration plate has a plurality of black and white squares distributed in a square grid, and the black and white squares share an inner angle intersection at each intersection;

[0091] Specifically, the theoretical coordinates are the coordinates of the inner angle intersection points. The theoretical coordinates of each inner angle intersection point can be defined by the design parameters of the chessboard calibration plate, such as the position of the upper left corner origin, the grid side length, the number of grids, etc.

[0092] S1-3, obtaining a chessboard scan image after scanning the chessboard calibration plate;

[0093] In this embodiment, when obtaining the chessboard scan image, a scanner is used to scan the calibration plate to obtain its image data. Specifically, the scanner uses a high-resolution imaging device (eg, a CCD camera or a laser scanner) to capture the image of the chessboard calibration plate.

[0094] S1-4, using the OpenCV image processing library to identify the scanning coordinates of several inner corner intersections in the chessboard scanning image;

[0095] Specifically, the scanning coordinates are the pixel coordinates of the inner corner intersections identified from the chessboard scan image by the corner detection algorithm in the OpenCV image processing library. Exemplarily, the corner detection algorithm can use cv2.findChessboardCorners in the OpenCV image processing library. The scanning coordinates are based on the original coordinate system, which has preset the arrangement of coordinates, with the upper left corner as the origin, the X axis along the horizontal direction, and the Y axis along the vertical direction. Due to the scanning errors in the scanning process, the scanning coordinates will contain deviations caused by the scanning errors. Therefore, it is necessary to perform image registration with the theoretical coordinates (known geometric coordinates) in the chessboard calibration plate design so that each identified scanning coordinate corresponds one-to-one to the theoretical coordinates.

[0096] Furthermore, image registration uses known theoretical coordinates and scanned coordinates extracted by OpenCV (coordinates obtained by corner detection algorithm) to establish coordinate correspondence. Image registration algorithms are often used to correspond points in an image to theoretical points. These algorithms usually include least squares method, homography matrix, etc. Exemplarily, the image registration process of homography matrix is ​​as follows:

[0097] ① Select matching point pairs: Select the intersection points in the image as matching point pairs. The matching point pairs include each scan coordinate and its corresponding theoretical coordinate.

[0098] ② Calculate the homography matrix: Based on the matching point pairs, the homography matrix is ​​calculated by the cv2.findHomography() function in OpenCV. That is, a transformation matrix is ​​calculated based on the relationship between the theoretical coordinates and the scanned coordinates.

[0099] ③ Apply transformation matrix: Use the calculated transformation matrix to transform the scanned coordinates into the theoretical coordinate system to achieve image registration.

[0100] S1-5, calculating the scanning coordinate errors of the plurality of interior angle intersection points according to the scanning coordinates and theoretical coordinates of the plurality of interior angle intersection points;

[0101] The scanning coordinate error is a four-element calibration coefficient, which is: X-axis error direction, X-axis error value, Y-axis error direction, Y-axis error value;

[0102] S1-6, repeatedly scan the chessboard calibration plate to obtain the scanning coordinate errors of all inner corner intersections within the rated scanning range of the scanner;

[0103] The rated scanning range refers to the effective scanning area that the scanner can cover under normal working conditions. Specifically, the rated scanning range is limited by the hardware performance, optical system and motion range of the stepper motor of the scanner, including the maximum size of the image that the scanner can accurately capture in the X-axis direction and the Y-axis direction.

[0104] S1-7. Define the scanning coordinate errors of all inner angle intersections within the rated scanning range and the set of scanning coordinates as the scanning error set.

[0105] Wherein, the step S1-7 further comprises:

[0106] S1-7-1, obtain the quaternion calibration coefficient and scanning coordinates of any inner angle intersection point;

[0107] S1-7-2. Generate an X-axis calibration amount and a Y-axis calibration amount of the interior angle intersection according to the quaternion calibration coefficients;

[0108] Specifically, the X-axis calibration amount is the X-axis error value of the scanning coordinate in the X-axis error direction, and the Y-axis calibration amount is the Y-axis error value of the scanning coordinate in the Y-axis error direction.

[0109] S1-7-3, defining a combination of an X-axis calibration amount, a Y-axis calibration amount, and a scanning coordinate of the inner angle intersection as a ternary calibration pair of the inner angle intersection;

[0110] S1-7-4. Collect the ternary calibration pairs of all inner angle intersections within the rated scanning range to obtain the scanning error set.

[0111] In this embodiment, the four-element calibration coefficients and scanning coordinates of each inner angle intersection are obtained, the calibration amounts of the X-axis and Y-axis are calculated and generated, and they are combined with the scanning coordinates to form a three-element calibration pair. Finally, all the three-element calibration pairs within the entire rated scanning range are collected to ensure that the errors in different scanning positions and directions are quantified, and the scanning error set is obtained completely and accurately.

[0112] In this embodiment, step S2 includes:

[0113] S2-1, selecting any initial coordinate to be calibrated from the original coordinate system;

[0114] S2-2, using the OpenCV image processing library to identify the anchored scan coordinates corresponding to the initial calibration coordinates;

[0115] S2-3, matching the three-element calibration pair corresponding to the scan coordinates after anchoring from the scan error set;

[0116] S2-4, selecting an X-axis calibration amount and a Y-axis calibration amount of the initial coordinates to be calibrated according to the ternary calibration pair, and calibrating the initial coordinates to be calibrated using the X-axis calibration amount and the Y-axis calibration amount;

[0117] S2-5, selecting adjacent coordinates of the initial coordinates to be calibrated, performing the calibration, and generating calibrated coordinates, until the scanning coordinates of all inner angle intersections within the rated scanning range are calibrated;

[0118] S2-6, defining a calibrated coordinate system of the scanner according to the calibrated coordinates. Specifically, based on a predefined scanning range, all calibrated calibrated coordinates are integrated into a unified coordinate system to form a new calibrated coordinate system. The coordinate system is used to represent the precise coordinate range of the scanner after calibration.

[0119] In this embodiment, the coordinates to be calibrated are selected from the original coordinate system, and the scanned coordinates after anchoring are identified using the OpenCV image processing library, so as to achieve the matching between the coordinates to be calibrated and the actual scanned data. Subsequently, the calibration values ​​of the X-axis and Y-axis are accurately obtained by scanning the matched three-element calibration pairs in the error set, and each coordinate to be calibrated is calibrated step by step, and finally all the scanned coordinates within the rated scanning range are covered. This process ensures that the original coordinate system of the scanner is fully calibrated, and the generated calibrated coordinate system improves the consistency of the scanner in the entire scanning area.

[0120] In this embodiment, step S4 includes:

[0121] S4-1, using a scanner with a calibrated coordinate system to scan the laser dot matrix to generate a laser dot matrix scanning image; wherein the laser dot matrix scanning image has a plurality of cross intersections of the laser dot matrix;

[0122] S4-2. Use the OpenCV image processing library to extract the initial calibration coordinates of several cross intersections in the laser dot matrix scanning image.

[0123] In this embodiment, by extracting the initial calibration coordinates of the laser dot array in the calibrated coordinate system, it is ensured that the acquired coordinate data has eliminated the influence of the scanning error, and only the error generated by the galvanometer during the printing process is retained.

[0124] See also Figure 2 , the step S5 comprises:

[0125] S5-1, matching ternary calibration pairs of a plurality of cross intersections from the scanning error set according to the scanning coordinates of the plurality of cross intersections;

[0126] S5-2, extracting X-axis calibration values ​​and Y-axis calibration values ​​of a plurality of cross intersections according to the matched ternary calibration pairs;

[0127] S5-3, calculating the galvanometer calibration coordinates of several cross intersections in the laser dot matrix scanning image according to the X-axis calibration amount, the Y-axis calibration amount and the corresponding scanning coordinates of the several cross intersections;

[0128] S5-4, determining the average deviation loss between the galvanometer calibration coordinates and the galvanometer standard coordinates of a number of cross intersections in the laser dot matrix scanning image;

[0129] S5-5. If the average deviation loss is less than a preset loss threshold, the current galvanometer calibration coordinates are output and defined as the optimal error coordinates of the galvanometer; otherwise, the galvanometer calibration coordinates of several cross intersections in the laser dot matrix scanning image are iteratively calculated.

[0130] In this embodiment, the initial calibration coordinates of the laser dot matrix are iteratively calibrated using the scanning error set, thereby achieving continuous correction of the galvanometer error. In each iteration, the calibration values ​​of the X-axis and Y-axis are dynamically adjusted by matching the three-element calibration pair, so that the galvanometer calibration coordinates of the laser dot matrix are continuously close to the galvanometer standard coordinates.

[0131] Furthermore, the step S5-4 specifically includes:

[0132] S5-4-1, extracting the galvanometer calibration coordinates and the galvanometer standard coordinates of several cross intersections;

[0133] S5-4-2, calculating the deviation between the galvanometer calibration coordinates and the galvanometer standard coordinates on the X-axis and Y-axis at each cross intersection;

[0134] S5-4-3, obtaining the X-axis weight of the X-axis deviation difference and the Y-axis weight of the Y-axis deviation difference;

[0135] S5-4-4, substitute the X-axis deviation difference, X-axis weight, Y-axis deviation difference and Y-axis weight into the weighted Manhattan distance formula to calculate the deviation loss of each cross intersection;

[0136] The calculation expression of the deviation loss is:

[0137] D=w x ×|X c -X s |+w y ×|Y c -Y s |;

[0138] Where D represents the deviation loss of each cross intersection, X c , Y c Indicates the galvanometer calibration coordinates, X s, Y s represents the standard coordinates of the galvanometer, |X c -X s | represents the X-axis deviation, |Y c -Y s | represents the Y-axis deviation, w x represents the X-axis weight, w y Indicates the Y-axis weight;

[0139] Specifically, the deviation loss of the weighted Manhattan distance represents the weighted total deviation of each cross point from the standard coordinates of the galvanometer in the X-axis and Y-axis directions during the galvanometer calibration process. By assigning corresponding weights to the deviation differences of the X-axis and Y-axis, the weighted Manhattan distance can accurately reflect the relative importance of errors in different directions, thereby more reasonably evaluating the accuracy of the galvanometer calibration.

[0140] S5-4-5. The average of the sum of the deviation losses of all cross intersections is defined as the average deviation loss;

[0141] In this embodiment, the deviation loss between the galvanometer calibration coordinates and the standard coordinates is calculated based on the weighted Manhattan distance, which ensures the differential processing of errors on the X-axis and Y-axis. The method first extracts the deviation difference of each cross intersection, and assigns a more reasonable weight distribution to the error based on the X-axis and Y-axis weights calculated from the scanning error set. By substituting the weighted Manhattan distance formula, the deviation loss of all cross intersections is quantitatively analyzed, and the mean of the deviation loss is used as the criterion for judging the calibration effect.

[0142] In this embodiment, the steps of obtaining the X-axis weight and the Y-axis weight include:

[0143] S5-4-3-1. Extracting the X-axis error value and the Y-axis error value of each inner angle intersection from the scanning error set;

[0144] S5-4-3-2, calculating the standard deviation of all X-axis error values ​​and the standard deviation of all Y-axis error values ​​in the scanning error set;

[0145] The expression of the standard deviation of the X-axis error value is:

[0146]

[0147] The expression of the standard deviation of the Y-axis error value is:

[0148]

[0149] Among them, σ x and σ yrespectively represent the standard deviation of all X-axis error values and the standard deviation of all Y-axis error values in the scanning error set; n represents the number of all inner angle intersection points within the rated scanning range; and respectively represent the deviation differences of the i-th inner angle intersection point on the X-axis and Y-axis, and respectively represent the mean value of the X-axis deviation difference and the mean value of the Y-axis deviation difference;

[0150] S5-4-3-3. Calculate the X-axis weight and Y-axis weight according to the standard deviation of all X-axis error values and the standard deviation of all Y-axis error values;

[0151] The calculation expression of the X-axis weight is:

[0152]

[0153] The calculation expression of the Y-axis weight is:

[0154]

[0155] Specifically, the calculation expressions of the X-axis weight and Y-axis weight are obtained by calculating the ratio of the standard deviations of the X-axis and Y-axis error values in the scanning error set, ensuring that the direction with larger errors is assigned a higher weight during the calibration process to optimize the overall calibration accuracy.

[0156] In this embodiment, by extracting the X-axis and Y-axis error values of all inner angle intersection points in the scanning error set and calculating their standard deviations, the accurate quantification of error fluctuations is ensured. Further, by calculating the standard deviations of the X-axis and Y-axis error values to determine their respective weights, a dynamic weighting mechanism based on the degree of error fluctuation is introduced, enabling the direction with larger errors to obtain a higher correction priority during the calibration process. This dynamic weighting mechanism assigns a higher calibration weight to the axis with larger errors, ensuring that the calibration process not only focuses on the overall error but also adaptively strengthens the correction of the direction with larger errors. This differential weight allocation strategy effectively improves the robustness of the calibration process and breaks through the limitation of the balance in the treatment of error weights on each axis in traditional calibration methods.

[0157] The embodiment of the present invention also provides a galvanometer calibration system based on a scanner. This system is used to implement the above method embodiment, and the parts that have been described will not be repeated here. The following terms such as "module", "unit", "sub-unit", etc. can be a combination of software and / or hardware that can achieve a predetermined function. Although the system described in the following embodiments is preferably implemented in software, the implementation in hardware, or a combination of software and hardware, is also possible and contemplated.

[0158] As Figure 3 shown, Figure 3: is a structural block diagram of a galvanometer calibration system based on a scanner of the present invention, the system comprising:

[0159] A scanning error acquisition module, used to acquire a scanning error set of the scanner;

[0160] An initial calibration module, used to calibrate the original coordinate system of the scanner according to the scanning error set, and generate a calibrated coordinate system of the scanner;

[0161] A laser dot matrix acquisition module is used to acquire the laser dot matrix printed by the galvanometer based on the initial vector graph;

[0162] An extraction module, used to extract the initial calibration coordinates of the laser dot array in the calibrated coordinate system; wherein the initial calibration coordinates represent the scanning coordinates of the residual galvanometer error after the scanning error is calibrated;

[0163] The iterative calibration module is used to iteratively calibrate the initial calibration coordinates using the scanning error set until an optimal error coordinate of the galvanometer is generated.

[0164] In the above system, a scanning error set is acquired through a scanning error acquisition module; a calibrated coordinate system of the scanner is generated through an initial calibration module; a laser dot matrix is ​​obtained based on an initial vector diagram print through a laser dot matrix acquisition module; an initial calibration coordinate is extracted through an extraction module; and the initial calibration coordinate is iteratively calibrated through an iterative calibration module, and finally the optimal error coordinate of the galvanometer is generated, thereby solving the problem that it is difficult to calibrate the galvanometer error and the error weight is difficult to adjust dynamically.

[0165] The system embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.

[0166] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0167] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A galvanometer calibration method based on a scanner, characterized in that: The method comprises: S1. Obtaining a scanning error set of the scanner; S2. Calibrate the original coordinate system of the scanner according to the scanning error set to generate a calibrated coordinate system of the scanner; S3, obtaining the laser dot matrix printed by the galvanometer based on the initial vector diagram; S4, extracting the initial calibration coordinates of the laser dot array in the calibrated coordinate system; wherein the initial calibration coordinates represent the scanning coordinates of the residual galvanometer error after calibrating the scanning error; S5. Using the scanning error set, iteratively calibrate the initial calibration coordinates until the optimal error coordinates of the galvanometer are generated.

2. The galvanometer calibration method based on a scanner according to claim 1, characterized in that: Obtaining a scanning error set of the scanner, including: S1-1, establish the original coordinate system of the scanner; S1-2, based on the design parameters of the chessboard calibration plate, defining the theoretical coordinates of the chessboard calibration plate in the original coordinate system; wherein the chessboard calibration plate has a plurality of black and white squares distributed in a square grid, and the black and white squares share an inner angle intersection at each intersection; S1-3, obtaining a chessboard scan image after scanning the chessboard calibration plate; S1-4, using the OpenCV image processing library to identify the scanning coordinates of several inner corner intersections in the chessboard scanning image; S1-5, calculating the scanning coordinate errors of the plurality of interior angle intersection points according to the scanning coordinates and theoretical coordinates of the plurality of interior angle intersection points; The scanning coordinate error is a four-element calibration coefficient, which is: X-axis error direction, X-axis error value, Y-axis error direction, Y-axis error value; S1-6, repeatedly scan the chessboard calibration plate to obtain the scanning coordinate errors of all inner corner intersections within the rated scanning range of the scanner; S1-7. Define the scanning coordinate errors of all inner angle intersections within the rated scanning range and the set of scanning coordinates as the scanning error set.

3. The galvanometer calibration method based on a scanner according to claim 2, characterized in that: The scanning coordinate errors and the set of scanning coordinates of all inner angle intersections within the rated scanning range are defined as the scanning error set; including: S1-7-1, obtain the quaternion calibration coefficient and scanning coordinates of any inner angle intersection point; S1-7-2. Generate an X-axis calibration amount and a Y-axis calibration amount of the interior angle intersection according to the quaternion calibration coefficients; S1-7-3, defining a combination of an X-axis calibration amount, a Y-axis calibration amount, and a scanning coordinate of the inner angle intersection as a ternary calibration pair of the inner angle intersection; S1-7-4. Collect the ternary calibration pairs of all inner angle intersections within the rated scanning range to obtain the scanning error set.

4. The scanner-based galvanometer calibration method according to claim 1, characterized in that: According to the scanning error set, the original coordinate system of the scanner is calibrated to generate a calibrated coordinate system of the scanner, including: S2-1, selecting any initial coordinate to be calibrated from the original coordinate system; S2-2, using the OpenCV image processing library to identify the anchored scan coordinates corresponding to the initial calibration coordinates; S2-3, matching the three-element calibration pair corresponding to the scan coordinates after anchoring from the scan error set; S2-4, selecting an X-axis calibration amount and a Y-axis calibration amount of the initial coordinates to be calibrated according to the ternary calibration pair, and calibrating the initial coordinates to be calibrated using the X-axis calibration amount and the Y-axis calibration amount; S2-5, selecting adjacent coordinates of the initial coordinates to be calibrated, performing the calibration, and generating calibrated coordinates, until the scanning coordinates of all inner angle intersections within the rated scanning range are calibrated; S2-6. Define a calibrated coordinate system of the scanner according to the calibrated coordinates.

5. The scanner-based galvanometer calibration method according to claim 1, characterized in that: Extracting the initial calibration coordinates of the laser dot array in the calibrated coordinate system includes: S4-1, scanning the laser dot matrix using a scanner having a calibrated coordinate system to generate a laser dot matrix scanning image; wherein the laser dot matrix scanning image has a plurality of cross intersections of the laser dot matrix; S4-2. Use the OpenCV image processing library to extract the initial calibration coordinates of several cross intersections in the laser dot matrix scanning image.

6. The galvanometer calibration method based on a scanner according to claim 1, characterized in that: Using the scanning error set, iteratively calibrating the initial calibration coordinate until an optimal error coordinate of the galvanometer is generated, comprising: S5-1, matching ternary calibration pairs of a plurality of cross intersections from the scanning error set according to the scanning coordinates of the plurality of cross intersections; S5-2, extracting X-axis calibration values ​​and Y-axis calibration values ​​of a plurality of cross intersections according to the matched ternary calibration pairs; S5-3, calculating the galvanometer calibration coordinates of several cross intersections in the laser dot matrix scanning image according to the X-axis calibration amount, the Y-axis calibration amount and the corresponding scanning coordinates of the several cross intersections; S5-4, determining the average deviation loss between the galvanometer calibration coordinates and the galvanometer standard coordinates of a number of cross intersections in the laser dot matrix scanning image; S5-5. If the average deviation loss is less than a preset loss threshold, the current galvanometer calibration coordinates are output and defined as the optimal error coordinates of the galvanometer; otherwise, the galvanometer calibration coordinates of several cross intersections in the laser dot matrix scanning image are iteratively calculated.

7. The galvanometer calibration method based on a scanner according to claim 6, characterized in that: Determine the deviation loss between the galvanometer calibration coordinates and the galvanometer standard coordinates of several cross intersections in the laser dot matrix scanning image, including: S5-4-1, extracting the galvanometer calibration coordinates and the galvanometer standard coordinates of several cross intersections; S5-4-2, calculating the deviation between the galvanometer calibration coordinates and the galvanometer standard coordinates on the X-axis and Y-axis at each cross intersection; S5-4-3, obtaining the X-axis weight of the X-axis deviation difference and the Y-axis weight of the Y-axis deviation difference; S5-4-4, substitute the X-axis deviation difference, X-axis weight, Y-axis deviation difference and Y-axis weight into the weighted Manhattan distance formula to calculate the deviation loss of each cross intersection; The calculation expression of the deviation loss is: D=w x ×|X c -X s |+wx×|Y c -Y s |; Where D represents the deviation loss of each cross intersection, X c , Y c Indicates the galvanometer calibration coordinates, X s , X s represents the standard coordinates of the galvanometer, |X c -X s | represents the X-axis deviation, |Y c -Y s | represents the Y-axis deviation, w x represents the X-axis weight, w y Indicates the Y-axis weight; S5-4-5. The average of the sum of the deviation losses of all cross intersections is defined as the average deviation loss.

8. The scanner-based galvanometer calibration method according to claim 7, characterized in that: Get the X-axis weight of the X-axis deviation difference and the Y-axis weight of the Y-axis deviation difference, including: S5-4-3-1. Extracting the X-axis error value and the Y-axis error value of each inner angle intersection from the scanning error set; S5-4-3-2, calculating the standard deviation of all X-axis error values ​​and the standard deviation of all Y-axis error values ​​in the scanning error set; The expression of the standard deviation of the X-axis error value is: The expression of the standard deviation of the Y-axis error value is: Among them, σ x and σ y They represent the standard deviation of all X-axis error values ​​and the standard deviation of all Y-axis error values ​​in the scanning error set respectively; n represents the number of all interior angle intersections within the rated scanning range; and Respectively represent the deviation difference of the i-th interior angle intersection point on the X-axis and the Y-axis, and They represent the mean of the X-axis deviation and the mean of the Y-axis deviation respectively; S5-4-3-3, calculating the X-axis weight and the Y-axis weight according to the standard deviation of all X-axis error values ​​and the standard deviation of all Y-axis error values; The calculation expression of the X-axis weight is: The calculation expression of the Y-axis weight is:

9. Scanner galvanometer calibration system, characterized in that, include: A scanning error acquisition module, used to acquire a scanning error set of the scanner; An initial calibration module, used to calibrate the original coordinate system of the scanner according to the scanning error set, and generate a calibrated coordinate system of the scanner; A laser dot matrix acquisition module is used to acquire the laser dot matrix printed by the galvanometer based on the initial vector graph; An extraction module, used to extract the initial calibration coordinates of the laser dot array in the calibrated coordinate system; wherein the initial calibration coordinates represent the scanning coordinates of the residual galvanometer error after the scanning error is calibrated; The iterative calibration module is used to iteratively calibrate the initial calibration coordinates using the scanning error set until an optimal error coordinate of the galvanometer is generated.

Citation Information

Patent Citations

  • Laser vibrating mirror device comprising correction system and laser vibrating mirror correction method

    CN108072973A

  • Galvanometer correction system and correction method thereof

    CN110681990A

  • Galvanometer laser processing distortion correction method and system

    CN114022370A

  • Method for quickly and accurately correcting laser scanning galvanometer through calibration plate

    CN116297181A

Cited By

  • Calibration method of full-automatic circuit board cutting machine

    CN120947717A

  • Method and device for online original point and proportion correction of galvanometer

    CN121578625A

  • A method and device for online origin and scale correction of a galvanometer

    CN121578625B

  • Galvanometer scanning error correction method and system

    CN122129988A