Scanner-based galvanometer calibration method and system

By obtaining the scanner error set, establishing the coordinate system after calibration, iteratively calibrating the initial calibration coordinates, and dynamically adjusting the calibration weights of the X-axis and Y-axis, the problem of difficult adjustment of the galvanometer error weights is solved, and the calibration accuracy and stability of the galvanometer system are improved.

CN120028020BActive Publication Date: 2025-08-29GUANGZHOU JINYUANMING TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The prior art is difficult to dynamically adjust the weight of the galvanomic error in high-precision scanning and laser marking equipment, resulting in uneven error distribution and affecting the overall calibration accuracy.

Method used

By obtaining the scanner error set, establishing a coordinate system after calibration, iteratively calibrate the initial calibration coordinates, dynamically adjusting the calibration weights of the X-axis and Y-axis, and optimizing the galvanometer error.

Benefits of technology

The calibration accuracy and stability of the galvanometer system are improved, targeted optimization is ensured in the case of uneven error distribution, and the overall calibration effect is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120028020B_ABST
    Figure CN120028020B_ABST
Patent Text Reader

Abstract

The present invention discloses a galvanometer calibration method and system based on a scanner, comprising: obtaining a scanning error set of the scanner; calibrating the original coordinate system of the scanner according to the scanning error set to generate a calibrated coordinate system of the scanner; obtaining a laser dot matrix printed by the galvanometer based on an initial vector diagram; extracting the initial calibration coordinates of the laser dot matrix in the calibrated coordinate system; wherein the initial calibration coordinates represent the scanning coordinates of the remaining galvanometer errors after calibrating the scanning errors; using the scanning error set, iteratively calibrating the initial calibration coordinates until the optimal error coordinates of the galvanometer are generated; the present invention realizes adaptive compensation from scanning errors to galvanometer errors, thereby improving the calibration accuracy of the galvanometer system, and can optimize errors in a targeted manner, thereby improving the overall calibration accuracy of the galvanometer.
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 scanner-based galvanometer calibration method and system. Background Art

[0002] In high-precision scanning and laser marking equipment, the calibration accuracy of the scanner and galvanometer system is a key factor affecting output quality. Existing high-precision scanners rely on advanced optical, mechanical, and signal processing technologies to ensure low and stable scanning errors, maintaining them within a controllable range over multiple scans. However, galvanometer systems often incur significant errors due to factors such as the complexity of mechanical motion, the instability of mirror adjustment, and environmental variations. This error is particularly pronounced in high-speed or large-format operations, where it significantly impacts overall accuracy.

[0003] Although existing technologies have attempted to calibrate the scanner and galvanometer separately, most methods only use a static single calibration, making it difficult to continuously optimize errors in practical applications. More importantly, existing calibration methods generally fail to adjust the weights based on the error differences between different axes, often simply correcting the X-axis and Y-axis errors with the same weight. This results in limited calibration effectiveness when the errors are unevenly distributed. Especially when the galvanometer error is large and the scanning error is small, how to rationally use the scanning error for iterative calibration and dynamically adjust the error weights of each axis remains a difficult problem in current technology. Summary of the Invention

[0004] This embodiment provides a scanner-based galvanometer calibration method and system, exploring 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 the scanning error is calibrated;

[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 set of scanning errors of the scanner includes:

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

[0013] S1-2. Based on design parameters of the chessboard calibration plate, define 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 corner 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 scan image;

[0016] S1-5. Calculate the scanning coordinate errors of the plurality of interior angle intersection points based on 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 scanning 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 set of scanning coordinate errors and scanning coordinates of all inner angle intersections within the rated scanning range as the scanning error set.

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

[0021] S1-7-1. Obtain the quaternion calibration coefficients and scanning coordinates of any inner corner 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. Define the combination of the X-axis calibration amount, the Y-axis calibration amount, and the scanning coordinates 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 set of scanning errors 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, use the OpenCV image processing library to identify the anchored scan coordinates corresponding to the initial calibration coordinates;

[0028] S2-3. Matching a ternary calibration pair corresponding to the anchored scan coordinates from the set of scan errors;

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

[0030] S2-5. Select adjacent coordinates of the initial coordinate to be calibrated, perform the calibration, and generate calibrated coordinates until the scanning coordinates of all inner corner 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 scan image; wherein the laser dot matrix scan 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 set of scanning errors until an optimal error coordinate of the galvanometer is generated, comprising:

[0036] S5-1, matching ternary calibration pairs of the 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 the plurality of cross intersections in the laser dot matrix scanning image based on the X-axis calibration values, the Y-axis calibration values, and the corresponding scanning coordinates of the plurality of cross intersections;

[0039] S5-4, determining the average 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;

[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 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. Extract the galvanometer calibration coordinates and galvanometer standard coordinates of several cross intersections;

[0043] S5-4-2. Calculate 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. Obtain 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 intersection point.

[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 coordinate, X s , Y s Indicates 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 Indicates 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 the X-axis weight of the X-axis deviation difference and the Y-axis weight of the Y-axis deviation difference includes:

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

[0052] S5-4-3-2. Calculate 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 for the standard deviation of the X-axis error value is:

[0054]

[0055] The expression for 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 on the X axis and the Y axis, and They represent the mean of the X-axis deviation difference and the mean of the Y-axis deviation difference respectively;

[0058] S5-4-3-3. Calculate 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 to existing technologies, the scanner-based galvanometer calibration method of this invention leverages the characteristics of small and controllable scanning errors to establish a set of scanning errors covering the entire scanning range. This set of scanning errors serves as a calibration benchmark, and iteratively corrects for large galvanometer errors. Compared to traditional methods, this solution dynamically optimizes calibration parameters with each iteration, achieving adaptive compensation from scanning errors to galvanometer errors, thereby improving the calibration accuracy of the galvanometer system.

[0064] Furthermore, the present invention extracts the standard deviation of the X- and Y-axis errors and dynamically calculates the calibration weight of each axis, giving axes with larger errors a higher correction priority. This solves the problem of equal weighting of errors across axes in the prior art, ensuring targeted error optimization even when the error distribution is uneven, and improving the overall calibration accuracy of the galvanometer.

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

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

[0067] an initial calibration module, configured to calibrate an original coordinate system of the scanner according to the scanning error set to 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 is 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 coordinate 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, and therefore will not be described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] Figure 1 Schematic diagram of the steps of the scanner-based galvanometer calibration method 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 This 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 this application, this 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 should have the general meaning understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "an", "a", "the", "these" and the like in this application do not indicate 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 direct or indirect. The "plurality" involved in this application refers to two or more. "And / or" describes the relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, and B exists alone. Generally, the character " / " indicates that the related objects are in an "or" relationship. The terms "first," "second," "third," etc. used 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 Flowchart of the scanner-based galvanometer calibration method of the present invention, the process includes:

[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. For example, the initial vector diagram is a standard cross-intersection grid, with each intersection having a clear theoretical coordinate. Ideally, the laser dot matrix should completely overlap with the initial vector diagram. In practice, due to galvanometer errors, the laser dot matrix may deviate from the theoretical coordinates of the initial vector diagram in some areas. In this embodiment, the galvanometer prints a series of cross-intersections according to the initial vector diagram. These intersections should coincide with the theoretical coordinates on the X and Y axes. However, the deviation caused by the errors results in a laser dot matrix scan that requires calibration.

[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 the scanning error is calibrated;

[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 scanner's original coordinate system is calibrated by introducing a scanning error set, thereby generating a calibrated coordinate system. This ensures that scanning errors are eliminated during subsequent scanning processes. Furthermore, the initial calibration coordinates of the laser dot array printed by the galvanometer are obtained using this calibrated coordinate system, enabling accurate extraction of the galvanometer error without interference from scanning errors. Ultimately, through iterative calibration, the scanning error set is utilized to continuously optimize calibration accuracy 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 elements (CCD) is along the horizontal direction. The scanned image is scanned line by line, and the X-axis represents the order in which each line is scanned. The upper left corner is set 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 design parameters of the chessboard calibration plate, define 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 corner intersection at each intersection;

[0091] Specifically, the theoretical coordinates are the coordinates of the inner corner intersections. The theoretical coordinates of each inner corner intersection can be defined by the design parameters of the chessboard calibration board, 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 (e.g., 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 scan 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 commonly used to correspond points in an image to theoretical points. These algorithms typically include least squares method, homography matrix, etc. Exemplarily, the image registration process of the 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, use the cv2.findHomography() function in OpenCV to calculate the homography matrix. 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 scan coordinates into the theoretical coordinate system to achieve image registration.

[0100] S1-5. Calculate the scanning coordinate errors of the plurality of interior angle intersection points based on 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 scanning 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 represents the effective scanning area that a scanner can cover under normal operating conditions. Specifically, the rated scanning range is determined by the scanner's hardware performance, optical system, and the range of motion of the stepper motor. It includes the maximum size of the image that the scanner can accurately capture in the X-axis and Y-axis directions.

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

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

[0106] S1-7-1. Obtain the quaternion calibration coefficients and scanning coordinates of any inner corner 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. Define the combination of the X-axis calibration amount, the Y-axis calibration amount, and the scanning coordinates 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 corner intersection are obtained to calculate the calibration values ​​of the X-axis and Y-axis, which are then combined with the scanning coordinates to form a three-element calibration pair. Finally, all 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 a complete and accurate set of scanning errors is obtained.

[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, use the OpenCV image processing library to identify the anchored scan coordinates corresponding to the initial calibration coordinates;

[0115] S2-3. Matching a ternary calibration pair corresponding to the anchored scan coordinates from the set of scan errors;

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

[0117] S2-5. Select adjacent coordinates of the initial coordinate to be calibrated, perform the calibration, and generate calibrated coordinates until the scanning coordinates of all inner corner intersections within the rated scanning range are calibrated;

[0118] S2-6. Define a calibrated coordinate system for the scanner based on the calibrated coordinates. Specifically, based on a predefined scanning range, all calibrated coordinates are integrated into a unified coordinate system to form a new calibrated coordinate system. This 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 matched to the actual scan data by selecting initial coordinates to be calibrated from the original coordinate system and identifying their anchored scan coordinates using the OpenCV image processing library. Subsequently, by scanning the matching three-way calibration pairs in the error set, the X- and Y-axis calibration values ​​are accurately obtained. Calibration is then performed incrementally for each coordinate to be calibrated, ultimately covering all scan coordinates within the rated scanning range. This process ensures that the scanner's original coordinate system is fully calibrated, and the resulting calibrated coordinate system improves the scanner's consistency across the entire scanning area.

[0120] In this embodiment, step S4 includes:

[0121] S4-1. Scanning the laser dot matrix using a scanner having a calibrated coordinate system to generate a laser dot matrix scan image; wherein the laser dot matrix scan 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 Figure 2 , the step S5 comprises:

[0125] S5-1, matching ternary calibration pairs of the 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 the plurality of cross intersections in the laser dot matrix scanning image based on the X-axis calibration values, the Y-axis calibration values, and the corresponding scanning coordinates of the plurality of cross intersections;

[0128] S5-4, determining the average 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;

[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, continuous correction of galvanometer errors is achieved by iteratively calibrating the initial calibration coordinates of the laser array using a set of scanning errors. Each iteration dynamically adjusts the X- and Y-axis calibration values ​​by matching the three-way calibration pair, bringing the galvanometer calibration coordinates of the laser array closer to the standard galvanometer coordinates.

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

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

[0133] S5-4-2. Calculate 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. Obtain 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 intersection point.

[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 coordinate, X s, Y s Indicates 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 Indicates 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 intersection point from the galvanometer's standard coordinates in the X and Y directions during the galvanometer calibration process. By assigning corresponding weights to the deviation differences in the X and Y axes, the weighted Manhattan distance accurately reflects 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, ensuring differentiated treatment of errors on the X and Y axes. This method first extracts the deviation difference of each cross intersection and assigns a more reasonable weight to the errors based on the X 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 quantified and 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. Extract the X-axis error value and the Y-axis error value of each interior angle intersection from the scanning error set;

[0144] S5-4-3-2. Calculate 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 for the standard deviation of the X-axis error value is:

[0146]

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

[0148]

[0149] Among them, σ x and σ yThey 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 on the X axis and the Y axis, and They represent the mean of the X-axis deviation difference and the mean of the Y-axis deviation difference respectively;

[0150] S5-4-3-3. Calculate 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;

[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 for the X-axis weight and the Y-axis weight are calculated 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 directions with larger errors are given higher weights 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 intersections in the scanning error set and calculating their standard deviations, accurate quantification of error fluctuations is ensured. Furthermore, 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, so that directions with larger errors receive a higher correction priority during the calibration process. This dynamic weighting mechanism gives axes with larger errors higher calibration weights, thereby ensuring that the calibration process not only focuses on the overall error, but also adaptively strengthens the correction of directions with larger errors. This differentiated weight allocation strategy effectively improves the robustness of the calibration process and breaks through the limitations of the traditional calibration method in the balance of error weight processing on each axis.

[0157] The embodiments of the present invention further provide a scanner-based galvanometer calibration system, which is used to implement the above-mentioned method embodiments, and will not be repeated hereafter. The terms "module," "unit," "subunit," etc. used below may refer to a combination of software and / or hardware that implements a predetermined function. Although the systems described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.

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

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

[0160] an initial calibration module, configured to calibrate an original coordinate system of the scanner according to the scanning error set to 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 is 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 coordinate 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 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. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units. That is, they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0166] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling 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 certain 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 various embodiments of the present invention.

Claims

1. A scanner-based galvanometer calibration method, 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 the scanning error is calibrated; S5. Using the scanning error set, iteratively calibrate the initial calibration coordinates until an optimal error coordinate of the galvanometer is generated; The step of iteratively calibrating the initial calibration coordinates using the scanning error set until an optimal error coordinate of the galvanometer is generated includes: S5-1. Matching a ternary calibration pair of the plurality of cross intersections from the scanning error set according to the scanning coordinates of the plurality of cross intersections; the ternary calibration pair comprising: an X-axis calibration amount, a Y-axis calibration amount, and the scanning coordinates of the interior angle intersection; 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 the plurality of cross intersections in the laser dot matrix scanning image based on the X-axis calibration values, the Y-axis calibration values, and the corresponding scanning coordinates of the plurality of cross intersections; S5-4, determining the average 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; S5-5. If the average deviation loss is less than a preset loss threshold, output the current galvanometer calibration coordinates and define them as the optimal error coordinates of the galvanometer; otherwise, iteratively calculate the galvanometer calibration coordinates of several cross intersections in the laser dot matrix scanning image; The determination of the average 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 comprises: S5-4-1. Extract the galvanometer calibration coordinates and galvanometer standard coordinates of several cross intersections; S5-4-2. Calculate 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. Obtain 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 intersection point. The calculation expression of the deviation loss is: ; Where D represents the deviation loss of each cross intersection, , Indicates the galvanometer calibration coordinates, , Indicates the standard coordinates of the galvanometer. Indicates the X-axis deviation, Indicates the Y-axis deviation, represents the X-axis weight, Indicates the Y-axis weight; S5-4-5. Define the average of the sum of the deviation losses of all cross intersections as the average deviation loss.

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 design parameters of the chessboard calibration plate, define 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 corner 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 scan image; S1-5. Calculate the scanning coordinate errors of the plurality of interior angle intersection points based on 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 scanning 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 set of scanning coordinate errors and scanning coordinates of all inner angle intersections within the rated scanning range as the scanning error set.

3. The scanner-based galvanometer calibration method according to claim 2, characterized in that: The scanning coordinate errors and the set of scanning coordinates of all inner corner intersections within the rated scanning range are defined as the scanning error set; including: S1-7-1. Obtain the quaternion calibration coefficients and scanning coordinates of any inner corner 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. Define the combination of the X-axis calibration amount, the Y-axis calibration amount, and the scanning coordinates 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: Calibrating the original coordinate system of the scanner according to the scanning error set to generate a calibrated coordinate system of the scanner includes: S2-1, selecting initial coordinates 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 coordinates to be calibrated; S2-3. Matching a ternary calibration pair corresponding to the anchored scan coordinates from the set of scan errors; S2-4. Selecting an X-axis calibration amount and a Y-axis calibration amount of the initial coordinate to be calibrated according to the ternary calibration pair, and calibrating the initial coordinate to be calibrated using the X-axis calibration amount and the Y-axis calibration amount; S2-5. Select adjacent coordinates of the initial coordinate to be calibrated, perform the calibration, and generate calibrated coordinates until the scanning coordinates of all inner corner 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 scan image; wherein the laser dot matrix scan 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 scanner-based galvanometer calibration method according to claim 1, 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. Extract the X-axis error value and the Y-axis error value of each interior angle intersection from the scanning error set; S5-4-3-2. Calculate 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 for the standard deviation of the X-axis error value is: ; The expression for the standard deviation of the Y-axis error value is: ; in, and 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 on the X axis and the Y axis, and They represent the mean of the X-axis deviation difference and the mean of the Y-axis deviation difference respectively; S5-4-3-3. Calculate 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: 。 7. Scanner galvanometer calibration system, characterized in that, include: A scanning error acquisition module, configured to acquire a scanning error set of the scanner; an initial calibration module, configured to calibrate an original coordinate system of the scanner according to the scanning error set to 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 is 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; an iterative calibration module, configured to iteratively calibrate the initial calibration coordinates using the scanning error set until an optimal error coordinate of the galvanometer is generated; The step of iteratively calibrating the initial calibration coordinates using the scanning error set until an optimal error coordinate of the galvanometer is generated includes: S5-1. Matching a ternary calibration pair of the plurality of cross intersections from the scanning error set according to the scanning coordinates of the plurality of cross intersections; the ternary calibration pair comprising: an X-axis calibration amount, a Y-axis calibration amount, and the scanning coordinates of the interior angle intersection; 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 the plurality of cross intersections in the laser dot matrix scanning image based on the X-axis calibration values, the Y-axis calibration values, and the corresponding scanning coordinates of the plurality of cross intersections; S5-4, determining the average 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; S5-5. If the average deviation loss is less than a preset loss threshold, output the current galvanometer calibration coordinates and define them as the optimal error coordinates of the galvanometer; otherwise, iteratively calculate the galvanometer calibration coordinates of several cross intersections in the laser dot matrix scanning image; The determination of the average 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 comprises: S5-4-1. Extract the galvanometer calibration coordinates and galvanometer standard coordinates of several cross intersections; S5-4-2. Calculate 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. Obtain 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 intersection point. The calculation expression of the deviation loss is: ; Where D represents the deviation loss of each cross intersection, , Indicates the galvanometer calibration coordinates, , Indicates the standard coordinates of the galvanometer. Indicates the X-axis deviation, Indicates the Y-axis deviation, represents the X-axis weight, Indicates the Y-axis weight; S5-4-5. Define the average of the sum of the deviation losses of all cross intersections as the average deviation loss.

Citation Information

Patent Citations

  • Galvanometer correction system and correction method thereof

    CN110681990A

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

    CN116297181A