Laser system correction method and device, electronic equipment and storage medium
By identifying the image of the calibration object and calculating the attitude difference of the galvanometer, attitude correction parameters are generated, which solves the problem of inaccuracy of manual eye calibration and realizes automated calibration and efficient production of laser systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2026-03-31
AI Technical Summary
In existing technologies, manual visual calibration is insufficient to meet the actual production requirements of laser systems, resulting in inaccurate mapping between motor deflection angle and laser coordinate position.
By acquiring an image of the calibration object, identifying the actual position of the calibration point, controlling the galvanometer to guide the laser to the calibration point, recording the actual attitude of the galvanometer, calculating the difference between the theoretical and actual attitude, generating attitude correction parameters, and correcting the deflection angle of the galvanometer.
Automated calibration has been achieved, avoiding errors caused by human factors, improving calibration efficiency, and meeting the production needs of laser systems.
Smart Images

Figure CN121754814A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of laser control technology, and in particular to a laser system calibration method, apparatus, electronic device and storage medium. Background Technology
[0002] Fractional laser is a common treatment mode in skin laser therapy devices. It uses a galvanometer to deflect the laser beam according to the preset software logic, so that the laser is directed to a designated location within the treatment area for treatment.
[0003] Galvanometers are typically driven by a motor. An input control voltage causes the galvanometer to deflect by a specific angle, and the mapping between this deflection angle and the coordinates of the laser beam within the treatment area is calculated using a relevant mathematical model. However, in practical applications, differences in the hardware parameters of the motor drive circuit, as well as installation errors in the galvanometer and focusing field lens, can lead to inaccurate mappings between the motor deflection angle and the laser coordinates. Currently, the conventional approach to address this inaccuracy is manual visual calibration, but this method is insufficient to meet the demands of actual product manufacturing.
[0004] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention
[0005] The main objective of this application is to provide a laser system calibration method, device, electronic equipment, and storage medium, aiming to solve the technical problem that current manual visual calibration methods are insufficient to meet the actual product manufacturing needs.
[0006] To achieve the above objectives, this application proposes a calibration method for a laser system, the laser system including a scanning area, a galvanometer, and a laser source, the calibration method for the laser system including:
[0007] When the scanning area corresponds to a calibrator, an image of the calibrator is obtained to obtain a first calibration image, and the actual position of the calibration point on the calibrator in the first calibration image is determined;
[0008] Based on the actual position, the galvanometer is controlled to guide the laser emitted by the laser source to illuminate the calibration point, and the actual galvanometer posture when the laser illuminates the calibration point is recorded.
[0009] The attitude correction parameters of the galvanometer are determined based on the theoretical galvanometer attitude corresponding to the calibration point and the actual galvanometer attitude. The theoretical galvanometer attitude is the galvanometer attitude of the guiding laser irradiating the calibration point, which is calculated by a preset theoretical geometric model. The attitude correction parameters are used to correct the result calculated by the preset theoretical geometric model.
[0010] Optionally, when the type of the galvanometer is a two-dimensional galvanometer, the galvanometer includes a first galvanometer and a second galvanometer, the first galvanometer is used to guide the laser to move in a first direction, the second galvanometer is used to guide the laser to move in a second direction, the first direction is perpendicular to the second direction, and the calibration object includes a plurality of calibration points;
[0011] The step of determining the attitude correction parameters of the galvanometer based on the theoretical galvanometer attitude corresponding to the calibration point and the actual galvanometer attitude includes:
[0012] The attitude correction parameters of the first galvanometer are determined by the theoretical galvanometer attitude and the actual galvanometer attitude at calibration points with positional differences in the first direction.
[0013] The attitude correction parameters of the second galvanometer are determined by the theoretical galvanometer attitude and the actual galvanometer attitude at calibration points with positional differences in the second direction.
[0014] Optionally, the plurality of calibration points include a first calibration point and a second calibration point that have positional differences in the first direction, the theoretical galvanometer attitude includes a first theoretical attitude of the first calibration point and a second theoretical attitude of the second calibration point, the actual galvanometer attitude includes a first actual attitude of the first calibration point and a second actual attitude of the second calibration point, and the attitude correction parameters of the first galvanometer include a first correction ratio and a first correction offset.
[0015] The step of determining the attitude correction parameters of the first galvanometer by using the theoretical galvanometer attitude and the actual galvanometer attitude at calibration points with positional differences in the first direction includes:
[0016] The first correction ratio is calculated based on the rotation angle of the first galvanometer in the first actual posture, the rotation angle of the first galvanometer in the second actual posture, the rotation angle of the first galvanometer in the first theoretical posture, and the rotation angle of the first galvanometer in the second theoretical posture.
[0017] The first correction offset is calculated based on the rotation angle of the first galvanometer in the first actual posture, the rotation angle of the first galvanometer in the second actual posture, and the first correction ratio.
[0018] Optionally, the plurality of calibration points further includes a third calibration point that has a positional difference from the first calibration point in the second direction, the theoretical galvanometer attitude further includes the third theoretical attitude of the third calibration point, the actual galvanometer attitude further includes the third actual attitude of the third calibration point, and the attitude correction parameters of the second galvanometer include a second correction ratio and a second correction offset.
[0019] The step of determining the attitude correction parameters of the second galvanometer by using the theoretical galvanometer attitude and the actual galvanometer attitude at calibration points with positional differences in the second direction includes:
[0020] The second correction ratio is calculated based on the rotation angle of the second galvanometer in the first actual posture, the rotation angle of the second galvanometer in the third actual posture, the rotation angle of the second galvanometer in the first theoretical posture, and the rotation angle of the second galvanometer in the third theoretical posture.
[0021] The second correction offset is calculated based on the rotation angle of the second galvanometer in the first actual posture, the rotation angle of the second galvanometer in the third actual posture, and the second correction ratio.
[0022] Optionally, the calibration method for the laser system further includes:
[0023] When the scanning area corresponds to the working area, target coordinate data of the target position in the working area is received, wherein the target coordinate data is the coordinate data of the target position in the scanning coordinate system corresponding to the scanning area;
[0024] Based on the target coordinate data and the preset theoretical geometric model, the theoretical deflection angle by which the galvanometer guides the laser emitted by the laser source to the target position is calculated, wherein the theoretical deflection angle includes the first theoretical deflection angle of the first galvanometer and the second theoretical deflection angle of the second galvanometer.
[0025] The first theoretical deflection angle is corrected by the first correction ratio and the first correction offset to obtain the first actual deflection angle of the first galvanometer. The second theoretical deflection angle is corrected by the second correction ratio and the second correction offset to obtain the second actual deflection angle of the second galvanometer.
[0026] The first galvanometer is deflected based on the first actual deflection angle, and the second galvanometer is deflected based on the second actual deflection angle, so that the first galvanometer and the second galvanometer guide the laser emitted by the laser source to irradiate the target position.
[0027] Optionally, the step of determining the actual location of the calibration point on the calibration object in the first calibration image includes:
[0028] The first contour graphic of the calibration points in the first calibration image is extracted based on the edge detection algorithm;
[0029] The geometric center point of the first contour graphic is determined, and its pixel coordinates in the first calibration image are used to obtain the actual position of the calibration point.
[0030] Optionally, the step of controlling the galvanometer to guide the laser emitted by the laser source to illuminate the calibration point based on the actual position includes:
[0031] The laser source is controlled to emit a laser beam that illuminates the calibration object and forms a light spot on the calibration object, and an image of the calibration object is acquired to obtain a second calibration image;
[0032] The second contour pattern of the light spot in the second calibration image is obtained based on the edge detection algorithm;
[0033] The geometric center of the second contour graphic is determined, and its pixel coordinates in the second calibration image are used to obtain the real-time position of the light spot.
[0034] When the real-time position differs from the actual position, the adjustment angle of the galvanometer is obtained based on the pixel coordinate difference between the real-time position and the actual position.
[0035] The galvanometer is deflected based on the adjusted angle, and after the galvanometer is deflected, the step of acquiring the image of the calibration object to obtain the second calibration image is performed until the real-time position of the light spot is the same as the actual position of the calibration point.
[0036] Optionally, the galvanometer changes its posture via a drive mechanism to guide the laser beam to different positions; the type of galvanometer includes a one-dimensional galvanometer and a two-dimensional galvanometer, and the two-dimensional galvanometer includes two laser guiding directions.
[0037] Furthermore, to achieve the above objectives, this application also provides a calibration device for a laser system, the laser system including a galvanometer and a laser source, wherein the laser source emits laser light which is reflected by the galvanometer and then onto the scanning area, and the calibration device for the laser system includes:
[0038] The acquisition module is used to acquire an image of the calibrator to obtain a first calibration image when the calibrator is scanning the area, and to determine the actual position of the calibration point on the calibrator in the first calibration image;
[0039] The guidance module is used to control the galvanometer based on the actual position to guide the laser emitted by the laser source to illuminate the calibration point, and to record the actual galvanometer posture when the laser illuminates the calibration point;
[0040] The correction module is used to determine the attitude correction parameters of the galvanometer based on the theoretical galvanometer attitude corresponding to the calibration point and the actual galvanometer attitude. The theoretical galvanometer attitude is the galvanometer attitude of the guiding laser irradiating the calibration point calculated by a preset theoretical geometric model. The attitude correction parameters are used to correct the result calculated by the preset theoretical geometric model.
[0041] In addition, to achieve the above objectives, this application also proposes an electronic device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the correction method for the laser system as described above.
[0042] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the laser system calibration method as described above.
[0043] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the laser system correction method described above.
[0044] One or more technical solutions proposed in this application have at least the following technical effects:
[0045] In this embodiment, the laser system includes a scanning area, a galvanometer, and a laser source. The calibration method of the laser system includes: acquiring an image of the calibrator to obtain a first calibration image when the scanning area corresponds to a calibration object; determining the actual position of a calibration point on the calibrator in the first calibration image; controlling the galvanometer based on the actual position to guide the laser emitted by the laser source to irradiate the calibration point, and recording the actual galvanometer posture when the laser irradiates the calibration point; determining the posture correction parameters of the galvanometer according to the theoretical galvanometer posture corresponding to the calibration point and the actual galvanometer posture, wherein the theoretical galvanometer posture is the galvanometer posture for guiding the laser to irradiate the calibration point calculated by a preset theoretical geometric model. That is, in this embodiment, the laser system first identifies the actual position of the calibration point through the image of the calibration object, and controls the galvanometer through the actual position so that the galvanometer can guide the laser to irradiate the calibration point, recording the deflection angle of the galvanometer at this time, i.e., the actual galvanometer posture of the galvanometer. Then, the theoretical galvanometer posture for guiding the laser to irradiate the calibration point calculated by the preset theoretical geometric model is calculated. It is understood that the theoretical galvanometer attitude is the galvanometer attitude that theoretically guides the laser to illuminate the calibration point, while the actual galvanometer attitude is the galvanometer attitude that can actually guide the laser to illuminate the calibration point. Therefore, by analyzing the difference between the theoretical and actual galvanometer attitudes, attitude correction parameters used to correct the calculated theoretical results can be determined. Thus, in this embodiment, the laser system can automatically generate attitude calibration parameters for correcting the galvanometer attitude using the calibration points on the calibration object, replacing manual visual calibration. On the one hand, this avoids calibration errors caused by human factors; on the other hand, the automatic implementation by the laser system improves calibration efficiency, thereby meeting the production needs of actual laser system products. Attached Figure Description
[0046] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0047] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0048] Figure 1 This is a schematic diagram of the laser system structure in the laser system calibration method of this application;
[0049] Figure 2 This is a flowchart illustrating the first embodiment of the laser system calibration method of this application;
[0050] Figure 3 This is a flowchart illustrating the second embodiment of the laser system calibration method of this application;
[0051] Figure 4 This is a schematic diagram of the calibration material used in the calibration method of the laser system in this application;
[0052] Figure 5 This is a flowchart illustrating the third embodiment of the laser system calibration method in this application;
[0053] Figure 6 This is a schematic diagram of the structure of the laser system calibration device in the laser system calibration method of this application;
[0054] Figure 7 This is a schematic diagram of the hardware operating environment involved in the laser system calibration method in this application embodiment.
[0055] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0056] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0057] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0058] The main solution of this application embodiment is as follows: when the scanning area corresponds to a calibration object, an image of the calibration object is acquired to obtain a first calibration image, and the actual position of the calibration point on the calibration object in the first calibration image is determined; based on the actual position, the galvanometer is controlled to guide the laser emitted by the laser source to irradiate the calibration point, and the actual galvanometer posture of the galvanometer when the laser irradiates the calibration point is recorded; the posture correction parameters of the galvanometer are determined according to the theoretical galvanometer posture corresponding to the calibration point and the actual galvanometer posture, wherein the theoretical galvanometer posture is the galvanometer posture for guiding the laser to irradiate the calibration point calculated by a preset theoretical geometric model.
[0059] This application provides a solution whereby the laser system first identifies the actual position of the calibration point using an image of the calibration object, and then controls the galvanometer based on this actual position, enabling the galvanometer to guide the laser beam onto the calibration point. The deflection angle of the galvanometer at this point is recorded, which is the actual galvanometer attitude. Next, the theoretical galvanometer attitude for guiding the laser beam onto the calibration point, calculated using a preset theoretical geometric model, is calculated. It is understood that the theoretical galvanometer attitude is the galvanometer attitude that theoretically guides the laser beam onto the calibration point, while the actual galvanometer attitude is the galvanometer attitude that can actually guide the laser beam onto the calibration point. Therefore, by analyzing the difference between the theoretical and actual galvanometer attitudes, attitude correction parameters can be determined to correct the calculated theoretical results. Thus, in this embodiment, the laser system can automatically generate attitude calibration parameters for correcting the galvanometer attitude using the calibration point on the calibration object, replacing manual visual calibration. This avoids calibration errors caused by human factors and improves calibration efficiency through automation by the laser system, thereby meeting the production needs of actual laser system products.
[0060] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication and program execution functions, such as a laser therapy device, a computer, or an electronic device capable of performing the above functions.
[0061] Based on this, embodiments of this application provide a calibration method for a laser system, referring to... Figure 1 , Figure 1This is a schematic diagram of the laser system structure in the laser system calibration method of this application. The laser system 10 includes a galvanometer 12 and a laser source 13. It should be noted that the laser system 10 can be the aforementioned skin laser treatment device, a laser engraving machine for carving, or a laser marking machine for marking, etc. In practical applications, the laser source 13 can be a laser generator for emitting laser light, or a lens for receiving and focusing laser light. There are usually two galvanometers 12, each guiding the laser light in different directions. Specifically, the galvanometer 12 is used to reflect the laser light. When the laser light irradiates the galvanometer 12, the galvanometer 12 reflects the laser light to change the laser's optical path. The scanning area 11 refers to the area of effect of the laser light emitted by the laser source 13. As the angle of the galvanometer 12 changes, the corresponding laser irradiation position also changes. The scanning area 11 refers to the set of positions that the laser light can irradiate at the movable angle of the galvanometer 12. For example, in the case of a skin laser treatment device, the scanning area 11 is aligned with the skin to be treated; that is, the scanning area 11 corresponds to the working area. During the determination of calibration parameters, a calibration object can be placed under the scanning area 11, meaning the scanning area 11 corresponds to the calibration object. Furthermore, in this embodiment, a camera 14 is also provided in the laser system 10 to acquire images of the calibration object. The aforementioned galvanometer 12 is equivalent to a lens that can reflect laser light. The laser system can change the orientation of the galvanometer through a driving mechanism, thereby guiding the laser to illuminate different positions. The driving mechanism can be a motor or an electromagnetic drive mechanism connected to the galvanometer. For an electromagnetic drive mechanism, a magnetic material (such as a permanent magnet) is fixed on the galvanometer or its mounting structure. The electromagnetic drive mechanism changes the orientation of the galvanometer by changing the magnetic field of its environment. Additionally, the type of galvanometer can include one-dimensional and two-dimensional galvanometers. A one-dimensional galvanometer allows the guided laser to move along a single direction, such as the X-axis or Y-axis; while a two-dimensional galvanometer allows the laser to move along multiple directions, such as the X-axis and Y-axis. Therefore, a two-dimensional galvanometer allows the laser to illuminate any position within the scanning area. In practical applications, a two-dimensional galvanometer may include one galvanometer or multiple galvanometers (such as the first galvanometer and the second galvanometer in this application). In the case of a single galvanometer, the first galvanometer and the second galvanometer in this application can be considered as fused into the same galvanometer, which can deflect at two different angles, such as by being driven by the aforementioned electromagnetic drive mechanism. In the case of multiple galvanometers, different galvanometers can deflect at different angles, for example, different galvanometers can be driven to deflect by motors with different rotation directions.
[0062] In addition, it should be noted that the above Figure 1 This does not impose limitations on the structure of the laser system. In practical applications, the laser system 10 can include more than Figure 1 The additional components shown are used to implement other functions.
[0063] Reference Figure 2 This is a flowchart illustrating the first embodiment of the laser system correction method in this application.
[0064] The laser system calibration method includes steps S10 to S30:
[0065] Step S10: When the calibrator is in the scanning area, acquire an image of the calibrator to obtain a first calibration image, and determine the actual position of the calibration point on the calibrator in the first calibration image;
[0066] It should be noted that the aforementioned calibration object can be a circular target with pre-set calibration points for calibration. During the laser system calibration phase, the calibration object can be placed under the scanning area, or the laser system's scanning area can be aligned with the calibration object, i.e., the situation described above where the calibration object corresponds to the scanning area. It is worth noting that automated calibration of the laser system can be performed during the laser system manufacturing phase, or periodically after the product is sold.
[0067] For example, when the scanning area corresponds to a calibration object, the laser system can obtain a first calibration image by acquiring an image of the calibration object through its internal camera. It should be noted that during the acquisition of the first calibration image, the laser source can be turned off to avoid the light spot formed by the laser source affecting the determination of the actual position of the calibration point on the calibration object in the first calibration image. Then, the actual position of the calibration point on the calibration object in the first calibration image is determined. Since the calibration points are pre-set, their shape or color can be freely set. Therefore, an image recognition algorithm can be used to identify the calibration points from the first calibration image based on their shape, color, and other features, thereby obtaining the actual position of the calibration point in the first calibration image. An embodiment of this solution can be a controller of the laser system, which is connected to the camera to acquire the first calibration image captured by the camera. Simultaneously, the controller establishes a three-dimensional coordinate system with the camera or other reference objects or virtual points as the origin based on the first calibration image, the camera's position, and the camera's intrinsic parameters. Then, the parameter coordinates of each calibration point in this three-dimensional coordinate system are determined, obtaining the aforementioned actual position.
[0068] Step S20: Based on the actual position, control the galvanometer to guide the laser emitted by the laser source to illuminate the calibration point, and record the actual galvanometer posture when the laser illuminates the calibration point;
[0069] For example, the actual position of the calibration point is used as the control basis to control the deflection angle of the galvanometer, so that the galvanometer can guide the laser emitted by the laser source to illuminate the calibration point. For instance, the laser emitted by the laser source can form a spot on the calibration object. Similarly, image recognition technology can be used to identify the real-time position of the spot in the corresponding image of the calibration object. The deflection angle of the galvanometer is controlled based on the difference between the real-time position and the actual position, so that the real-time position matches the actual position, thus ensuring that the galvanometer guides the laser to illuminate the calibration point. When the laser illuminates the calibration point, the attitude of the galvanometer at this moment can be recorded to obtain the actual galvanometer attitude.
[0070] Step S30: Determine the attitude correction parameters of the galvanometer based on the theoretical galvanometer attitude corresponding to the calibration point and the actual galvanometer attitude. The theoretical galvanometer attitude is the galvanometer attitude of the guiding laser irradiating the calibration point calculated by a preset theoretical geometric model. The attitude correction parameters are used to correct the result calculated by the preset theoretical geometric model.
[0071] It should be noted that the theoretical galvanometer attitude of the calibration point mentioned above refers to the galvanometer attitude when the guiding laser illuminates the calibration point, calculated using a preset theoretical geometric model. In one embodiment, the galvanometer is a two-dimensional galvanometer, and the calculation formula for the galvanometer geometric model corresponding to the preset theoretical geometric model is as follows:
[0072]
[0073] In the formula, (x, y) are the coordinates in the plane corresponding to the scanning area, and (θ) are the coordinates in the plane corresponding to the scanning area. xref ,θ yref ) is the theoretical deflection angle (i.e., the theoretical galvanometer attitude mentioned above) calculated based on the geometric model when the laser spot moves to the position (x,y), e is the vertical distance between the two galvanometers, and d is the vertical distance between the galvanometer closest to the scanning plane and the scanning plane.
[0074] In practical applications, the coordinate data of the calibration point in the coordinate system of the plane corresponding to the scanning area can be substituted into the above calculation formula of the galvanometer geometric model, and the obtained (θ) xref ,θ yref The theoretical galvanometer orientation can be used as the standard point.
[0075] For example, after obtaining the theoretical galvanometer attitude, the attitude correction parameters of the galvanometer are obtained based on the difference between the theoretical and actual galvanometer attitudes. For instance, the attitude correction parameters can be a proportional correction coefficient obtained by comparing the theoretical and actual galvanometer attitudes, or a compensation offset obtained by the deviation between the theoretical and actual galvanometer attitudes. The form of the attitude correction parameters can be set by technicians according to actual needs, ensuring that the actual galvanometer attitude is obtained after correcting the theoretical galvanometer attitude; therefore, it will not be elaborated further here. It is understood that the determined attitude correction parameters can be used to correct the theoretical results calculated by the laser system. In subsequent applications of this laser system, the theoretical attitude of the irradiated target position can be calculated first using the aforementioned preset theoretical geometric model, and then the actual attitude obtained after correcting the theoretical attitude using the attitude correction parameters can be used to control the galvanometer in the laser system, thereby achieving the purpose of calibration.
[0076] It is understood that in this embodiment, the laser system includes a scanning area, a galvanometer, and a laser source. The calibration method of the laser system includes: acquiring an image of the calibrator to obtain a first calibration image when the scanning area corresponds to a calibration object, and determining the actual position of the calibration point on the calibrator in the first calibration image; controlling the galvanometer based on the actual position to guide the laser emitted by the laser source to irradiate the calibration point, and recording the actual galvanometer posture when the laser irradiates the calibration point; determining the posture correction parameters of the galvanometer according to the theoretical galvanometer posture corresponding to the calibration point and the actual galvanometer posture, wherein the theoretical galvanometer posture is the galvanometer posture for guiding the laser to irradiate the calibration point calculated by a preset theoretical geometric model. That is, in this embodiment, the laser system first identifies the actual position of the calibration point through the image of the calibration object, and controls the galvanometer through the actual position so that the galvanometer can guide the laser to irradiate the calibration point, and records the deflection angle of the galvanometer at this time, that is, the actual galvanometer posture of the galvanometer. Then, the theoretical galvanometer posture for guiding the laser to irradiate the calibration point calculated by the preset theoretical geometric model is calculated. It is understood that the theoretical galvanometer attitude is the galvanometer attitude that theoretically guides the laser to illuminate the calibration point, while the actual galvanometer attitude is the galvanometer attitude that can actually guide the laser to illuminate the calibration point. Therefore, by analyzing the difference between the theoretical and actual galvanometer attitudes, attitude correction parameters used to correct the calculated theoretical results can be determined. Thus, in this embodiment, the laser system can automatically generate attitude calibration parameters for correcting the galvanometer attitude using the calibration points on the calibration object, replacing manual visual calibration. On the one hand, this avoids calibration errors caused by human factors; on the other hand, the automatic implementation by the laser system improves calibration efficiency, thereby meeting the production needs of actual laser system products.
[0077] In one feasible implementation, the galvanometer changes its orientation via a drive mechanism to guide laser irradiation to different positions; the type of galvanometer includes one-dimensional galvanometers and two-dimensional galvanometers, and the two-dimensional galvanometer includes two laser guiding directions.
[0078] In one feasible implementation, the step of determining the actual position of the calibration point on the calibration object in the first calibration image includes steps S11 to S12:
[0079] Step S11: Extract the first contour graphic of the calibration points in the first calibration image based on the edge detection algorithm;
[0080] Step S12: Determine the geometric center point of the first contour graphic and its pixel coordinates in the first calibration image to obtain the actual position of the calibration point.
[0081] It should be noted that in practical applications, in order to ensure the accuracy of the determined attitude correction parameters, multiple calibration points may be set on the calibration object. The process of determining the actual position of each calibration point is basically similar. Therefore, in this embodiment, one of them will be used as an example for the description.
[0082] For example, for any one of the plurality of calibration points, the first contour graphic of that calibration point in the first calibration image is extracted using an edge detection algorithm. For instance, the calibration point can be set as a circle; correspondingly, when performing contour recognition on the first calibration image using the edge detection algorithm, the recognized circular contour can be used as the first contour graphic of the calibration point. It is worth noting that in practical applications, the calibration object is usually circular, and the camera acquiring the image of the calibration object typically has a large field of view, meaning the image captured by the camera will include the entire scanning area. Therefore, to prevent the circle corresponding to the calibration object from affecting the extraction of the circular contour of the calibration point, the contour of the circular calibration object can be removed first. That is, the contour boundary in the first calibration image is cropped, retaining only the cropped image containing the calibration point. The cropped image is then subjected to grayscale conversion, median filtering, and binarization. Finally, the image edges are detected using the Candy operator, and the closed circular contour of the calibration point is obtained through the contour extraction algorithm, i.e., the aforementioned first contour graphic. Alternatively, without cropping, the size of the closed contour area can also determine whether the circular contour is the circular contour of the calibration point or the circular contour of the calibration object. For example, the circular contour of the calibration object is usually larger than the circular contour of the calibration point. After obtaining the first contour image, it can be fitted into a circle. The center of the circle is then used as the geometric center point of the first contour image. Correspondingly, the pixel coordinates of the pixel corresponding to the geometric center point in the first calibration image are the actual positions of the calibration points. The actual positions of each calibration point can be obtained by referring to the above process, so they will not be repeated here.
[0083] In one feasible implementation, the step of controlling the galvanometer to guide the laser emitted by the laser source to illuminate the calibration point based on the actual position includes steps S21 to S25:
[0084] Step S21: Control the laser source to emit laser light to irradiate the calibration object and form a light spot on the calibration object, and acquire an image of the calibration object to obtain a second calibration image;
[0085] Step S22: Obtain the second contour pattern of the light spot in the second calibration image based on the edge detection algorithm;
[0086] Step S23: Determine the geometric center of the second contour graphic and the pixel coordinates in the second calibration image to obtain the real-time position of the light spot;
[0087] Step S24: If the real-time position is different from the actual position, the adjustment angle of the galvanometer is obtained based on the pixel coordinate difference between the real-time position and the actual position.
[0088] Step S25: Control the deflection of the galvanometer based on the adjustment angle, and after the galvanometer deflection, execute the step of acquiring the image of the calibration object to obtain the second calibration image, until the real-time position of the light spot is the same as the actual position of the calibration point.
[0089] For example, after determining the actual location of the calibration point, it is necessary to guide the laser to illuminate the calibration point based on the actual location. The laser source is controlled to emit laser light to illuminate the calibration object, forming a light spot on it (it should be noted that in practical applications, laser light is usually invisible and not easily captured by a camera; therefore, the light emitted by the laser source during the calibration and debugging phase can consist of both laser light and visible light). The initial orientation of the galvanometer can be randomly set. After emitting the laser, an image of the calibration object can be acquired again through a camera to obtain a second calibration image. Similarly, the second contour pattern of the light spot in the second calibration image can be obtained through an edge detection algorithm. The size of the light spot can be preset; therefore, the first and second contour patterns can be distinguished by comparing their sizes. Accordingly, the geometric center of the second contour image is determined, along with its pixel coordinates in the second calibration image, to obtain the real-time position of the light spot. It should be noted that the step of determining the real-time position of the light spot in the second calibration image can refer to the process of determining the calibration point in the first calibration image described above, and therefore will not be repeated here.
[0090] Additionally, it should be noted that in practical applications, there can be multiple calibration points, and the laser will be guided to illuminate each calibration point. The process of guiding the laser to illuminate each calibration point is essentially the same; therefore, in this embodiment, the example of illuminating only one calibration point will be used for explanation.
[0091] For any one of the multiple calibration points to be irradiated (where a calibration point is one that has been irradiated by the laser), it is determined whether the actual position of the calibration point to be irradiated is the same as the real-time position of the laser spot. If the real-time position of the laser spot is different from the actual position of the calibration point to be irradiated, the adjustment angle of the galvanometer is obtained based on the pixel coordinate difference between the real-time position and the actual position. The pixel coordinate difference can include the coordinate difference in the X-axis direction and the coordinate difference in the Y-axis direction. It should be noted that in practical applications, there are two galvanometers in the laser system, used to control the movement of the laser spot in different directions, such as in the X-axis direction or the Y-axis direction. The mapping relationship between the distance the laser spot moves in different directions and the deflection angle of the galvanometer can be preset. That is, after the position of the galvanometer is fixed, the distance the laser moves in the scanning area caused by the galvanometer deflection can be calculated using geometric formulas. The distance the laser moves in the scanning area can be used to deduce the angle that the galvanometer needs to deflect. The adjustment angle of the galvanometer is then obtained based on the pixel coordinate difference. Then, based on the angle adjustment control of the galvanometer deflection, an attempt is made to move the light spot to the position of the calibration point to be irradiated. After the galvanometer is deflected, the step of acquiring the image of the calibration object to obtain the second calibration image is executed again, thereby determining the new real-time position of the light spot. If the new real-time position is the same as the actual position of the calibration point (i.e., the real-time position of the light spot is the same as the actual position of the calibration point), it means that the light spot has moved to the calibration point to be irradiated, that is, the laser has irradiated the calibration point to be irradiated. Conversely, if the new real-time position is not the same as the actual position of the calibration point, the deflection angle of the galvanometer is adjusted again until the real-time position of the light spot is the same as the actual position of the calibration point to be irradiated.
[0092] Understandably, the process of guiding the laser to illuminate each calibration point can refer to the above process, and correspondingly, the actual galvanometer posture of the galvanometer when the laser illuminates each calibration point can be recorded.
[0093] Furthermore, in another feasible implementation, the color of the calibration point is a first color, and the color of the light spot is a second color, wherein the first color and the second color are different, and the step of obtaining the second contour graphic of the light spot in the second calibration image based on the edge detection algorithm includes steps S221 to S222:
[0094] Step S221: Preprocess the second calibration image to obtain a preprocessing result. The preprocessing includes grayscale processing, which includes weighted summation of pixel values in the second calibration image to obtain the grayscale value of the pixel. During the weighted summation process, the weight of the first color is reduced and / or the weight of the second color is increased.
[0095] Step S222: Obtain the second contour image of the light spot from the preprocessing result based on the edge detection algorithm.
[0096] It should be noted that in practical applications, the second calibration image actually contains calibration points and light spots formed by laser irradiation. In order to avoid the calibration points affecting the extraction of the second contour pattern of the light spots, this embodiment will adjust the grayscale weight according to the color of the light spots or calibration points during the preprocessing of the second calibration image, so as to shield the influence of the calibration points.
[0097] For example, the second calibration image is preprocessed to obtain a preprocessed result. Similarly, the preprocessing may include grayscale conversion, median filtering, and binarization. It is worth noting that grayscale conversion includes weighted summation of pixel values in the second calibration image to obtain the grayscale value of each pixel. It should be noted that each pixel may include R (red), G (green), and B (blue). The formula for weighted summation of grayscale values is as follows:
[0098] Y = a1R + a2G + a3B
[0099] In the formula, R, G, and B are the components of the three primary colors of a pixel, while a1, a2, and a3 are the weights of the three primary color components of the pixel, and Y is the grayscale value. If the color of the calibration point (i.e., the first color) is blue, the weight of B, a3, can be reduced. Conversely, if the color of the spot is red, the weight of R, a1, can be increased, thereby achieving the shielding of the calibration point. The specific degree of increase or decrease can be set by technicians according to actual needs.
[0100] Reference Figure 3 This is a flowchart illustrating a second embodiment based on the first embodiment of this application. Contents identical or similar to those in the above embodiments can be referred to the above description and will not be repeated hereafter. When the galvanometer is a two-dimensional galvanometer, the galvanometer includes a first galvanometer and a second galvanometer. The first galvanometer is used to guide the laser to move in a first direction, and the second galvanometer is used to guide the laser to move in a second direction. The first direction is perpendicular to the second direction, and the calibration object includes multiple calibration points.
[0101] It should be noted that in practical applications, there are usually two galvanometers, namely the first galvanometer and the second galvanometer mentioned above. The first galvanometer guides the laser beam in a first direction, such as the X-axis of the coordinate system corresponding to the laser's movement area. The second galvanometer guides the laser beam in a second direction, such as the Y-axis of the coordinate system corresponding to the laser's movement area, with the X-axis perpendicular to the Y-axis; that is, the first direction and the second direction are perpendicular. Furthermore, the calibration object can include multiple calibration points, such as three, four, or five. Figure 4 The diagram shown is a schematic representation of the calibrator used in this application, and includes four calibration points from P1 to P4. It should be understood that... Figure 4 This is for illustrative purposes only and does not limit the number of calibration points on the calibrator. In practical applications, it may include more than [a certain number of calibration points]. Figure 4 Fewer or more calibration points.
[0102] In some embodiments, the galvanometer may consist of a reflector and two drive mechanisms, which move the reflector in a first direction and a second direction, respectively.
[0103] The step of determining the attitude correction parameters of the galvanometer based on the theoretical galvanometer attitude corresponding to the calibration point and the actual galvanometer attitude includes steps S310 to S320:
[0104] Step S310: Determine the attitude correction parameters of the first galvanometer by using the theoretical galvanometer attitude and the actual galvanometer attitude of the calibration points with positional differences in the first direction.
[0105] Step S320: Determine the attitude correction parameters of the second galvanometer by using the theoretical galvanometer attitude and the actual galvanometer attitude of the calibration point with positional differences in the second direction.
[0106] For example, a first galvanometer controls the laser to move in a first direction. Based on the difference between the theoretical and actual galvanometer attitudes of calibration points with positional differences in the first direction, attitude correction parameters for the first galvanometer are generated. These parameters can be expressed as scaling factors and / or offsets. Similarly, a second galvanometer controls the laser to move in a second direction. Based on the difference between the theoretical and actual galvanometer attitudes of calibration points with positional differences in the second direction, attitude correction parameters for the second galvanometer are generated. These parameters can also be expressed as scaling factors and / or offsets. Figure 4As shown, if the first direction corresponds to the X-axis, then P1 and P2, P3 and P4 can be considered to have positional differences in the first direction (i.e., their coordinate values differ in the first direction). If the second direction corresponds to the Y-axis, then P1 and P3, P2 and P4 can be considered to have positional differences in the second direction (i.e., their coordinate values differ in the second direction).
[0107] Accordingly, in practical applications, the attitude correction parameters of the first galvanometer can be used for attitude correction of the first galvanometer, and the attitude correction parameters of the second galvanometer can be used for attitude correction of the second galvanometer.
[0108] In one feasible implementation, the plurality of calibration points include a first calibration point and a second calibration point that have positional differences in the first direction, the theoretical galvanometer attitude includes a first theoretical attitude of the first calibration point and a second theoretical attitude of the second calibration point, the actual galvanometer attitude includes a first actual attitude of the first calibration point and a second actual attitude of the second calibration point, and the attitude correction parameters of the first galvanometer include a first correction ratio and a first correction offset.
[0109] The step of determining the attitude correction parameters of the first galvanometer by using the theoretical galvanometer attitude and the actual galvanometer attitude at calibration points with positional differences in the first direction includes steps S311 to S312:
[0110] Step S311: Calculate the first correction ratio based on the rotation angle of the first galvanometer in the first actual posture, the rotation angle of the first galvanometer in the second actual posture, the rotation angle of the first galvanometer in the first theoretical posture, and the rotation angle of the first galvanometer in the second theoretical posture.
[0111] Step S312: Calculate the first correction offset based on the rotation angle of the first galvanometer in the first actual posture, the rotation angle of the first galvanometer in the second actual posture, and the first correction ratio.
[0112] It should be noted that the first actual attitude includes the actual deflection (or rotation) angle of the first and second galvanometers when the laser shines on the first calibration point. The first theoretical attitude includes the theoretically calculated deflection (or rotation) angle of the first and second galvanometers when the laser shines on the first calibration point. The second actual attitude includes the actual deflection (or rotation) angle of the first and second galvanometers when the laser shines on the second calibration point, and the second theoretical attitude includes the theoretically calculated deflection (or rotation) angle of the first and second galvanometers when the laser shines on the second calibration point.
[0113] Understandably, the first correction ratio and the first correction offset are the coefficient and compensation amount for correcting the attitude of the first galvanometer, respectively. Therefore, the first correction ratio and the first correction offset can be calculated based on the difference between the rotation angle of the first galvanometer in the first theoretical attitude and the rotation angle of the first galvanometer in the first actual attitude and the second theoretical attitude, so that the first correction ratio and the first correction offset can correct the theoretical attitude of the first galvanometer and obtain the actual attitude of the first galvanometer.
[0114] Furthermore, it should be noted that, to simplify and facilitate the calculation of attitude correction parameters, the distribution of calibration points is restricted in this embodiment. Specifically, the line connecting the first calibration point and the second calibration point on the calibration object is parallel to the first direction. For example... Figure 4 As shown, the first direction is the X-axis direction. Let the first calibration point be P1 and the second calibration point be P2. The line connecting P1 and P2 is parallel to the X-axis.
[0115] Accordingly, the step of calculating the first correction ratio based on the rotation angle of the first galvanometer in the first actual posture, the rotation angle of the first galvanometer in the second actual posture, the rotation angle of the first galvanometer in the first theoretical posture, and the rotation angle of the first galvanometer in the second theoretical posture includes: determining a first angle difference between the rotation angle of the first galvanometer in the first actual posture and the rotation angle of the first galvanometer in the second actual posture; determining a second angle difference between the rotation angle of the first galvanometer in the first theoretical posture and the rotation angle of the first galvanometer in the second theoretical posture; and using the ratio of the first angle difference to the second angle difference as the first correction ratio. The step of calculating the first correction offset based on the rotation angle of the first galvanometer in the first actual posture, the rotation angle of the first galvanometer in the second actual posture, and the first correction ratio includes: determining a first angle sum between the rotation angle of the first galvanometer in the first actual posture and the rotation angle of the first galvanometer in the second actual posture; and determining the first correction offset by the ratio of the first angle sum to the first correction ratio.
[0116] For example, the difference between the rotation angle of the first galvanometer in the first actual posture and the rotation angle of the first galvanometer in the second actual posture is calculated to obtain the first angle difference. The difference between the rotation angle of the first galvanometer in the first theoretical posture and the rotation angle of the first galvanometer in the second theoretical posture is calculated to obtain the second angle difference. The ratio of the first angle difference to the second angle difference is used as the first correction ratio. The formula for calculating the first correction ratio is as follows:
[0117]
[0118] In the formula, scal eX is the first correction ratio, and θ x1 The rotation angle θ of the first galvanometer in the first actual attitude. x2 Let θ be the rotation angle of the first galvanometer in the second actual posture. xref1 The rotation angle θ of the first galvanometer in the first theoretical attitude. xref2 The rotation angle of the first galvanometer in the second theoretical orientation.
[0119] After obtaining the first correction ratio, the sum of the rotation angles of the first galvanometer in the first actual posture and the first galvanometer in the second actual posture is calculated to obtain the first angle sum. The first correction offset is then determined by the ratio of the first angle sum to the first correction ratio. For example, multiplying the ratio of the first angle sum to the first correction ratio by a preset coefficient yields the first angle sum. The formula for calculating the first correction offset is as follows:
[0120]
[0121] In the formula, scal eX is the first correction ratio, and θ x1 The rotation angle θ of the first galvanometer in the first actual attitude. x2 denoted as the rotation angle of the first galvanometer in the second actual posture, and offsetX as the first correction offset.
[0122] The first correction ratio and the first correction offset can be used to correct the deflection angle of the first galvanometer obtained from the calculation.
[0123] In one feasible implementation, the plurality of calibration points further includes a third calibration point that has a positional difference from the first calibration point in the second direction, the theoretical galvanometer attitude further includes the third theoretical attitude of the third calibration point, the actual galvanometer attitude further includes the third actual attitude of the third calibration point, and the attitude correction parameters of the second galvanometer include a second correction ratio and a second correction offset.
[0124] It should be noted that the multiple calibration points also include a third calibration point that differs in position from the first calibration point in the second direction. Correspondingly, the line connecting the first calibration point and the third calibration point is parallel on the calibrator.
[0125] The step of determining the attitude correction parameters of the second galvanometer by using the theoretical galvanometer attitude and the actual galvanometer attitude at calibration points with positional differences in the second direction includes steps S321 to S322:
[0126] Step S321: Calculate the second correction ratio based on the rotation angle of the second galvanometer in the first actual posture, the rotation angle of the second galvanometer in the third actual posture, the rotation angle of the second galvanometer in the first theoretical posture, and the rotation angle of the second galvanometer in the third theoretical posture.
[0127] Step S322: Calculate the second correction offset based on the rotation angle of the second galvanometer in the first actual posture, the rotation angle of the second galvanometer in the third actual posture, and the second correction ratio.
[0128] It should be noted that the third actual attitude includes the actual deflection (or rotation) angle of the first and second galvanometers when the laser irradiates the third calibration point, while the third theoretical attitude includes the theoretical deflection (or rotation) angle of the first and second galvanometers when the laser irradiates the third calibration point, obtained through theoretical calculation.
[0129] Similarly, it can be understood that the second correction ratio and the second correction offset are the coefficients and compensation amounts for correcting the attitude of the second galvanometer, respectively. Therefore, the second correction ratio and the second correction offset can be calculated based on the difference between the rotation angle of the second galvanometer in the first theoretical attitude and the third theoretical attitude and the rotation angle of the second galvanometer in the first actual attitude and the third theoretical attitude. This allows the second correction ratio and the second correction offset to correct the theoretical attitude of the second galvanometer, thus obtaining the actual attitude of the second galvanometer.
[0130] Similarly, to simplify and facilitate the calculation of attitude correction parameters, the distribution of calibration points is restricted in this embodiment. That is, the line connecting the first calibration point and the third calibration point on the calibration object is parallel to the second direction, such as... Figure 4 As shown, the second direction is the Y-axis direction. Let the first calibration point be P1 and the third calibration point be P3. The line connecting P1 and P3 is parallel to the Y-axis. The theoretical galvanometer attitude at the third calibration point is the third theoretical attitude, and the actual galvanometer attitude at the third calibration point is the third actual attitude. Furthermore, the attitude correction parameters for the second galvanometer include a second correction ratio and a second correction offset.
[0131] Accordingly, the step of calculating the second correction ratio based on the rotation angle of the second galvanometer in the first actual posture, the rotation angle of the second galvanometer in the third actual posture, the rotation angle of the second galvanometer in the first theoretical posture, and the rotation angle of the second galvanometer in the third theoretical posture includes: determining a third angle difference between the rotation angle of the second galvanometer in the first actual posture and the rotation angle of the second galvanometer in the third actual posture; determining a fourth angle difference between the rotation angle of the second galvanometer in the first theoretical posture and the rotation angle of the second galvanometer in the third theoretical posture; and using the ratio of the third angle difference to the fourth angle difference as the second correction ratio. The step of calculating the second correction offset based on the rotation angle of the second galvanometer in the first actual posture, the rotation angle of the second galvanometer in the third actual posture, and the second correction ratio includes: determining a second angle sum between the rotation angle of the second galvanometer in the first actual posture and the rotation angle of the second galvanometer in the second actual posture; and determining the second correction offset by the ratio of the second sum to the second correction ratio.
[0132] For example, the difference between the rotation angle of the second galvanometer in the first actual posture and the rotation angle of the second galvanometer in the second actual posture is calculated to obtain the third angle difference. The difference between the rotation angle of the second galvanometer in the first theoretical posture and the rotation angle of the second galvanometer in the second theoretical posture is calculated to obtain the fourth angle difference. The ratio of the third angle difference to the fourth angle difference is used as the second correction ratio. The formula for calculating the second correction ratio is as follows:
[0133]
[0134] In the formula, scaleY is the second correction ratio, and θ y1 The rotation angle θ of the second galvanometer in the first actual attitude. y2 Let θ be the rotation angle of the second galvanometer in the second actual posture. yref1 The rotation angle θ of the second galvanometer in the first theoretical orientation. yref2 The rotation angle of the second galvanometer in the second theoretical orientation.
[0135] After obtaining the first correction ratio, the sum of the rotation angles of the first galvanometer in the first actual posture and the first galvanometer in the second actual posture is calculated to obtain the first angle sum. The first correction offset is then determined by the ratio of the first angle sum to the first correction ratio. For example, multiplying the ratio of the first angle sum to the first correction ratio by a preset coefficient yields the first angle sum. The formula for calculating the first correction offset is as follows:
[0136]
[0137] In the formula, scaleY is the second correction ratio, and θ y1 The rotation angle θ of the second galvanometer in the first actual attitude. y2 denoted as the rotation angle of the second galvanometer in the second actual posture, and offsetY as the second correction offset.
[0138] The second correction ratio and the second correction offset can be used to correct the calculated offset angle of the second galvanometer.
[0139] Reference Figure 5 This is a flowchart illustrating a third embodiment based on the first and second embodiments of this application. Contents identical or similar to those in the above embodiments can be referred to the above description and will not be repeated hereafter. The laser system calibration method further includes steps A10 to A40:
[0140] Step A10: In the case that the scanning area corresponds to the working area, receive the target coordinate data of the target position in the working area, wherein the target coordinate data is the coordinate data of the target position in the scanning coordinate system corresponding to the scanning area;
[0141] Step A20: Based on the target coordinate data and the preset theoretical geometric model, calculate the theoretical deflection angle by which the galvanometer guides the laser emitted by the laser source to the target position, wherein the theoretical deflection angle includes the first theoretical deflection angle of the first galvanometer and the second theoretical deflection angle of the second galvanometer.
[0142] Step A30: Correct the first theoretical deflection angle using the first correction ratio and the first correction offset to obtain the first actual deflection angle of the first galvanometer; and correct the second theoretical deflection angle using the second correction ratio and the second correction offset to obtain the second actual deflection angle of the second galvanometer.
[0143] Step A40: Control the first galvanometer to deflect based on the first actual deflection angle, and control the second galvanometer to deflect based on the second actual deflection angle, so that the first galvanometer and the second galvanometer guide the laser emitted by the laser source to irradiate the target position.
[0144] It should be noted that once the galvanometer's attitude correction parameters are obtained, these parameters can be used to correct the galvanometer's attitude during the actual operation of the laser system. The aforementioned working area can be the area where the laser actually exerts its effect. For example, in the case of a skin laser treatment device, the working area can be the skin area that needs to be treated.
[0145] For example, when the scanning area of the laser system corresponds to the working area, it indicates that the laser system is in actual working state. In this state, the user can input the target coordinate data of the target position to be irradiated by the laser into the laser system. The target coordinate data refers to the coordinate data of the target position in the scanning coordinate system corresponding to the scanning area. The target coordinate data can be input into the calculation formula corresponding to the preset theoretical geometric model to obtain the theoretical deflection angle of the laser emitted by the laser source by the two galvanometers to guide the laser to the target position. The specific process can refer to the process of calculating the theoretical attitude of the galvanometers at the irradiation standard point (and the theoretical deflection angle calculation process can also refer to existing solutions), so it will not be repeated here. Accordingly, the theoretical deflection angle of the first galvanometer is the first theoretical deflection angle, and the theoretical deflection angle of the second galvanometer is the second theoretical deflection angle.
[0146] The first theoretical deflection angle is corrected using a first correction ratio and a first correction offset to obtain the first actual deflection angle of the first galvanometer. The correction formula for the first theoretical deflection angle is as follows:
[0147] θ x =scaleX·θ xref +offsetX
[0148] In the formula, θ x θ is the first actual deflection angle, scal eX is the first correction ratio, and θ is the first actual deflection angle. xref The first theoretical deflection angle is denoted by , and offsetX is the first correction offset.
[0149] The second theoretical deflection angle is corrected using the second correction ratio and the second correction offset to obtain the second actual deflection angle of the second galvanometer. The correction formula for the second theoretical deflection angle is as follows:
[0150] θ y =scaleY·θ yref +offsetY
[0151] In the formula, θ y θ is the second actual deflection angle, scaleY is the second correction ratio, and θ is the second actual deflection angle. yref The second theoretical deflection angle is denoted by , and offsetY is the second correction offset.
[0152] After obtaining the first and second actual deflection angles, the first galvanometer is deflected using the first actual deflection angle, and the second galvanometer is deflected using the second actual deflection angle. For example, the first actual deflection angle generates a control signal for the drive motor corresponding to the first galvanometer. This control signal controls the drive motor to rotate, which in turn drives the first galvanometer to deflect. Similarly, the drive motor corresponding to the second galvanometer is controlled in the same way to drive the second galvanometer to deflect. After deflection, the first and second galvanometers can guide the laser emitted by the laser source to accurately illuminate the target position.
[0153] This application also provides a calibration device for a laser system, with reference to... Figure 6 The laser system includes a scanning area, a galvanometer, and a laser source. The calibration device for the laser system includes:
[0154] The acquisition module 10 is used to acquire an image of the calibrator to obtain a first calibration image when the scanning area corresponds to the calibrator, and to determine the actual position of the calibration point on the calibrator in the first calibration image;
[0155] The guidance module 20 is used to control the galvanometer based on the actual position to guide the laser emitted by the laser source to illuminate the calibration point, and to record the actual galvanometer posture when the laser illuminates the calibration point;
[0156] The correction module 30 is used to determine the attitude correction parameters of the galvanometer based on the theoretical galvanometer attitude corresponding to the calibration point and the actual galvanometer attitude. The theoretical galvanometer attitude is the galvanometer attitude of the guide laser irradiating the calibration point calculated by a preset theoretical geometric model. The attitude correction parameters are used to correct the result calculated by the preset theoretical geometric model.
[0157] Optionally, when the type of the galvanometer is a two-dimensional galvanometer, the galvanometer includes a first galvanometer and a second galvanometer, the first galvanometer is used to guide the laser to move in a first direction, the second galvanometer is used to guide the laser to move in a second direction, the first direction is perpendicular to the second direction, and the calibration object includes a plurality of calibration points;
[0158] The correction module 30 is also used for:
[0159] The attitude correction parameters of the first galvanometer are determined by the theoretical galvanometer attitude and the actual galvanometer attitude at calibration points with positional differences in the first direction.
[0160] The attitude correction parameters of the second galvanometer are determined by the theoretical galvanometer attitude and the actual galvanometer attitude at calibration points with positional differences in the second direction.
[0161] Optionally, the plurality of calibration points includes a first calibration point and a second calibration point that have positional differences in the first direction; the theoretical galvanometer attitude includes a first theoretical attitude of the first calibration point and a second theoretical attitude of the second calibration point; the actual galvanometer attitude includes a first actual attitude of the first calibration point and a second actual attitude of the second calibration point; the attitude correction parameters of the first galvanometer include a first correction ratio and a first correction offset; the correction module 30 is further configured to:
[0162] The first correction ratio is calculated based on the rotation angle of the first galvanometer in the first actual posture, the rotation angle of the first galvanometer in the second actual posture, the rotation angle of the first galvanometer in the first theoretical posture, and the rotation angle of the first galvanometer in the second theoretical posture.
[0163] The first correction offset is calculated based on the rotation angle of the first galvanometer in the first actual posture, the rotation angle of the first galvanometer in the second actual posture, and the first correction ratio.
[0164] Optionally, the plurality of calibration points further includes a third calibration point that differs in position from the first calibration point in the second direction; the theoretical galvanometer attitude further includes the third theoretical attitude of the third calibration point; the actual galvanometer attitude further includes the third actual attitude of the third calibration point; and the attitude correction parameters of the second galvanometer include a second correction ratio and a second correction offset. The correction module 30 is further configured to:
[0165] The second correction ratio is calculated based on the rotation angle of the second galvanometer in the first actual posture, the rotation angle of the second galvanometer in the third actual posture, the rotation angle of the second galvanometer in the first theoretical posture, and the rotation angle of the second galvanometer in the third theoretical posture.
[0166] The second correction offset is calculated based on the rotation angle of the second galvanometer in the first actual posture, the rotation angle of the second galvanometer in the third actual posture, and the second correction ratio.
[0167] Optionally, the correction module 30 is further configured to:
[0168] When the scanning area corresponds to the working area, target coordinate data of the target position in the working area is received, wherein the target coordinate data is the coordinate data of the target position in the scanning coordinate system corresponding to the scanning area;
[0169] Based on the target coordinate data and the preset theoretical geometric model, the theoretical deflection angle by which the galvanometer guides the laser emitted by the laser source to the target position is calculated, wherein the theoretical deflection angle includes the first theoretical deflection angle of the first galvanometer and the second theoretical deflection angle of the second galvanometer.
[0170] The first theoretical deflection angle is corrected by the first correction ratio and the first correction offset to obtain the first actual deflection angle of the first galvanometer. The second theoretical deflection angle is corrected by the second correction ratio and the second correction offset to obtain the second actual deflection angle of the second galvanometer.
[0171] The first galvanometer is deflected based on the first actual deflection angle, and the second galvanometer is deflected based on the second actual deflection angle, so that the first galvanometer and the second galvanometer guide the laser emitted by the laser source to irradiate the target position.
[0172] Optionally, the acquisition module 10 is further configured to:
[0173] The first contour graphic of the calibration points in the first calibration image is extracted based on the edge detection algorithm;
[0174] The geometric center point of the first contour graphic is determined, and its pixel coordinates in the first calibration image are used to obtain the actual position of the calibration point.
[0175] Optionally, the guiding module 20 is further configured to:
[0176] The laser source is controlled to emit a laser beam that illuminates the calibration object and forms a light spot on the calibration object, and an image of the calibration object is acquired to obtain a second calibration image;
[0177] The second contour pattern of the light spot in the second calibration image is obtained based on the edge detection algorithm;
[0178] The geometric center of the second contour graphic is determined, and its pixel coordinates in the second calibration image are used to obtain the real-time position of the light spot.
[0179] When the real-time position differs from the actual position, the adjustment angle of the galvanometer is obtained based on the pixel coordinate difference between the real-time position and the actual position.
[0180] The galvanometer is deflected based on the adjusted angle, and after the galvanometer is deflected, the step of acquiring the image of the calibration object to obtain the second calibration image is performed until the real-time position of the light spot is the same as the actual position of the calibration point.
[0181] Optionally, the galvanometer changes its posture via a drive mechanism to guide the laser beam to different positions; the type of galvanometer includes a one-dimensional galvanometer and a two-dimensional galvanometer, and the two-dimensional galvanometer includes two laser guiding directions.
[0182] The laser system calibration device provided in this application employs the laser system calibration method described in the above embodiments, aiming to solve the technical problem that current manual visual calibration methods are insufficient to meet the actual product manufacturing requirements. Compared with the prior art, the beneficial effects of the laser system calibration device provided in this application are the same as those of the laser system calibration method described in the above embodiments, and other technical features of this laser system calibration device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0183] This application provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the laser system correction method of the above embodiment 1.
[0184] The following is for reference. Figure 7 The diagram illustrates a structural schematic of an electronic device suitable for implementing embodiments of this application. The electronic devices in these embodiments may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable App Displays), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 7 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0185] like Figure 7As shown, the electronic device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the electronic device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the electronic device to communicate wirelessly or wiredly with other devices to exchange data. Although electronic devices with various systems are shown in the figures, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems may be implemented alternatively.
[0186] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0187] The electronic device provided in this application, employing the laser system calibration method described in the above embodiments, can solve the technical problem that current manual visual calibration methods are insufficient to meet the actual product manufacturing requirements. Compared with the prior art, the beneficial effects of the electronic device provided in this application are the same as those of the laser system calibration method provided in the above embodiments, and other technical features of this electronic device are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0188] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0189] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0190] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to perform the correction method of the laser system in the above embodiments.
[0191] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0192] The aforementioned computer-readable storage medium may be included in an electronic device or may exist independently without being assembled into an electronic device.
[0193] The aforementioned computer-readable storage medium carries one or more programs that, when executed by an electronic device, cause the electronic device to: acquire an image of the calibrator to obtain a first calibration image when the scanned area corresponds to a calibrator, and determine the actual position of the calibration point on the calibrator in the first calibration image;
[0194] Based on the actual position, the galvanometer is controlled to guide the laser emitted by the laser source to illuminate the calibration point, and the actual galvanometer posture when the laser illuminates the calibration point is recorded.
[0195] The attitude correction parameters of the galvanometer are determined based on the theoretical galvanometer attitude corresponding to the calibration point and the actual galvanometer attitude. The theoretical galvanometer attitude is the galvanometer attitude of the guiding laser irradiating the calibration point, which is calculated by a preset theoretical geometric model. The attitude correction parameters are used to correct the result calculated by the preset theoretical geometric model.
[0196] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, SmallTalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0197] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0198] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0199] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the calibration method of the laser system described above. This solves the technical problem that current manual visual calibration methods are insufficient to meet the actual production needs of products. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the calibration method of the laser system provided in the above embodiments, and will not be elaborated upon here.
[0200] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the laser system calibration method described above.
[0201] The computer program product provided in this application can solve the technical problem of laser system calibration. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as the beneficial effects of the laser system calibration method provided in the above embodiments, and will not be repeated here.
[0202] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A method of correcting a laser system, characterized by, The laser system comprises a galvanometer and a laser source, the laser source emits laser light which is reflected by the galvanometer to a scanning area, and a correction method of the laser system comprises: When a calibration object is in the scanning area, a first calibration image of the calibration object is acquired, and actual positions of calibration points on the calibration object in the first calibration image are determined; Based on the actual positions, the galvanometer is controlled to guide the laser source to emit laser light to irradiate the calibration points, and actual galvanometer poses of the galvanometer when the laser light irradiates the calibration points are recorded; According to a theoretical galvanometer pose corresponding to the calibration points and the actual galvanometer poses, pose correction parameters of the galvanometer are determined, wherein the theoretical galvanometer pose is a pose of the galvanometer for guiding the laser light to irradiate the calibration points calculated by a preset theoretical geometric model, and the pose correction parameters are used to correct a result calculated by the preset theoretical geometric model.
2. The method of correcting a laser system of claim 1, wherein, In a case where the type of the galvanometer is a two-dimensional galvanometer, the galvanometer comprises a first galvanometer and a second galvanometer, the first galvanometer is used to guide the laser light to move in a first direction, the second galvanometer is used to guide the laser light to move in a second direction, the first direction is perpendicular to the second direction, and the calibration object comprises a plurality of calibration points; The step of determining the pose correction parameters of the galvanometer according to the theoretical galvanometer pose corresponding to the calibration points and the actual galvanometer poses comprises: The pose correction parameters of the first galvanometer are determined according to the theoretical galvanometer poses and the actual galvanometer poses of the calibration points which have a position difference in the first direction; The pose correction parameters of the second galvanometer are determined according to the theoretical galvanometer poses and the actual galvanometer poses of the calibration points which have a position difference in the second direction.
3. The method of correcting a laser system of claim 2, wherein, The plurality of calibration points comprise a first calibration point and a second calibration point which have a position difference in the first direction, the theoretical galvanometer poses comprise a first theoretical pose of the first calibration point and a second theoretical pose of the second calibration point, the actual galvanometer poses comprise a first actual pose of the first calibration point and a second actual pose of the second calibration point, and the pose correction parameters of the first galvanometer comprise a first correction proportion and a first correction offset; The step of determining the pose correction parameters of the first galvanometer according to the theoretical galvanometer poses and the actual galvanometer poses of the calibration points which have a position difference in the first direction comprises: The first correction proportion is calculated according to a rotation angle of the first galvanometer in the first actual pose, a rotation angle of the first galvanometer in the second actual pose, a rotation angle of the first galvanometer in the first theoretical pose, and a rotation angle of the first galvanometer in the second theoretical pose; The first correction offset is calculated according to the rotation angle of the first galvanometer in the first actual pose, the rotation angle of the first galvanometer in the second actual pose, and the first correction proportion.
4. The method of correcting a laser system of claim 3, wherein, The plurality of calibration points further include a third calibration point having a position difference from the first calibration point in the second direction, the theoretical mirror attitude further includes a third theoretical attitude of the third calibration point, the actual mirror attitude further includes a third actual attitude of the third calibration point, and the attitude correction parameter of the second mirror includes a second correction proportion and a second correction offset; The step of determining the attitude correction parameter of the second mirror by using the theoretical mirror attitude and the actual mirror attitude of the calibration point having the position difference in the second direction includes: The second correction proportion is calculated according to the rotation angle of the second mirror in the first actual attitude, the rotation angle of the second mirror in the third actual attitude, the rotation angle of the second mirror in the first theoretical attitude, and the rotation angle of the second mirror in the third theoretical attitude. The second correction offset is calculated according to the rotation angle of the second mirror in the first actual attitude, the rotation angle of the second mirror in the third actual attitude, and the second correction proportion.
5. The method of correcting a laser system of claim 4, wherein, The calibration method of the laser system further includes: In the case that the scanning area corresponds to a working area, target coordinate data of a target position in the working area is received, wherein the target coordinate data is coordinate data of the target position in a scanning coordinate system corresponding to the scanning area; Based on the target coordinate data and the preset theoretical geometric model, a theoretical deflection angle of the mirror for guiding the laser emitted by the laser source to the target position is calculated, wherein the theoretical deflection angle includes a first theoretical deflection angle of the first mirror and a second theoretical deflection angle of the second mirror; The first theoretical deflection angle is corrected by using the first correction proportion and the first correction offset to obtain a first actual deflection angle of the first mirror, and the second theoretical deflection angle is corrected by using the second correction proportion and the second correction offset to obtain a second actual deflection angle of the second mirror; The first mirror is controlled to deflect based on the first actual deflection angle, and the second mirror is controlled to deflect based on the second actual deflection angle, so that the first mirror and the second mirror guide the laser emitted by the laser source to irradiate to the target position.
6. The method of correcting a laser system of claim 1, wherein, The step of determining the actual position of the calibration point on the calibration object in the first calibration image includes: A first contour graph of the calibration point in the first calibration image is extracted based on an edge detection algorithm; A geometric center point of the first contour graph is determined, and a pixel coordinate of the first calibration image is obtained to determine the actual position of the calibration point.
7. The method of correcting a laser system of claim 1, wherein, The step of controlling the mirror to guide the laser emitted by the laser source to irradiate to the calibration point based on the actual position includes: The laser source is controlled to emit laser to irradiate to the calibration object and form a light spot on the calibration object, and a second calibration image is obtained by acquiring an image of the calibration object; A second contour graph of the light spot in the second calibration image is obtained based on an edge detection algorithm; determine a geometric center of the second contour figure, a pixel coordinate in the second calibration image, to obtain a real-time position of the light spot; in a case where the real-time position is different from the actual position, determine an adjustment angle of the galvanometer according to a pixel coordinate difference between the real-time position and the actual position; control deflection of the galvanometer based on the adjustment angle, and perform the step of obtaining the second calibration image after the galvanometer deflects until the real-time position of the light spot is the same as the actual position of the calibration point.
8. The method of claim 1, wherein the laser system is a laser system for a lithography apparatus. The galvanometer changes a posture through a driving mechanism to guide laser irradiation to different positions; the type of the galvanometer includes a one-dimensional galvanometer and a two-dimensional galvanometer, and the two-dimensional galvanometer includes two laser guiding directions.
9. A correction device for a laser system, characterized in that The laser system includes a galvanometer and a laser source, the laser source emits laser which is reflected to a scanning area after passing through the galvanometer, and a correction device of the laser system includes: an acquisition module configured to acquire an image of the calibration object to obtain a first calibration image when the calibration object is in the scanning area, and determine an actual position of an upper calibration point of the calibration object in the first calibration image; a guiding module configured to control the galvanometer to guide the laser emitted by the laser source to irradiate to the calibration point based on the actual position, and record an actual galvanometer posture of the galvanometer when the laser irradiates to the calibration point; a correction module configured to determine a posture correction parameter of the galvanometer according to a theoretical galvanometer posture corresponding to the calibration point and the actual galvanometer posture, wherein the theoretical galvanometer posture is a galvanometer posture for guiding laser irradiation to the calibration point calculated through a preset theoretical geometric model, and the posture correction parameter is used to correct a result calculated through the preset theoretical geometric model.
10. An electronic device, comprising: The device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the correction method of the laser system according to any one of claims 1 to 8.
11. A storage medium, characterized by The storage medium is a computer readable storage medium, and the storage medium stores a computer program, and the computer program is configured to implement the steps of the correction method of the laser system according to any one of claims 1 to 8.