A laser correction method
By deploying a laser correction server in an SLM printer, using image processing and model building modules to correct the spot position and quickly locate the spot center, the problem of laser spot position deviation in the SLM printer is solved, and the processing speed and accuracy are improved.
Patent Information
- Application Number
- CN202210758280.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-29
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2042-06-29
AI Technical Summary
There are pincushion errors and mechanical errors during laser scanning, which leads to a deviation of the laser spot position and makes it difficult to quickly and accurately locate the center of the spot.
By deploying a laser correction server, the image processing module and model building module are used to correct the pincushion distortion of the spot position, calculate the galvanometer angle and send it to the SLM printer for laser correction, and use grid processing to quickly locate the spot center to reduce the calculation amount.
It realizes rapid positioning of the laser spot center, reduces the calculation amount, improves processing speed and accuracy, eliminates mechanical errors, and enhances processing accuracy.
Smart Images

Figure CN115082543B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of 3D printing, and particularly relates to a laser correction method. Background Art
[0002] The SLM printer is a high-precision 3D printing device based on laser scanning technology, and its printing precision can reach the um level. The galvanometer is an important laser vector scanning device in the SLM printer.
[0003] During the laser scanning process of the SLM printer, in fact, the two-dimensional graphic scanning in the plane is achieved by controlling the rotation angles of the X-axis lens and Y-axis lens of the galvanometer. There is a pincushion error in the galvanometer scanning during the plane scanning process. The reason is that the focusing plane of the laser beam is actually a spherical surface centered on the galvanometer. Due to the certain focal depth of the laser beam focusing, when the scanning surface is large, the scanned rectangular graphic is actually a deformed graphic similar to a pincushion. And due to certain mechanical errors in the installation of the galvanometer of the SLM printer, there is still a certain error deviation between the actual laser projection point and the ideal projection point, which is difficult to eliminate. Summary of the Invention
[0004] The purpose of the present invention is to provide a laser correction method, which solves the technical problems of quickly positioning the center of the laser spot and performing pincushion correction and error correction on the position of the laser spot.
[0005] To achieve the above purpose, the present invention adopts the following technical solutions:
[0006] A laser correction method specifically includes the following steps:
[0007] Step 1: Deploy a laser correction server. The laser correction server communicates with the SLM printer through a network cable, obtains the real-time image of the processing plane of the SLM printer captured by the high-speed CCD camera of the SLM printer, and simultaneously obtains the diameter φ of the preset laser spot of the SLM printer.
[0008] Step 2: Establish an image processing module in the laser correction server. The image processing module is used to perform image preprocessing on the real-time image, and then label the coordinates of the pixels in the preprocessed image to generate a coordinate positioning map of the processing plane.
[0009] Step 3: Establish a model construction module in the laser correction server. The model construction module establishes an actual processing plane model of the processing plane according to the coordinate positioning map, and performs dimension labeling on the actual processing plane model according to the coordinate labeling of the pixels and establishes a world coordinate system.
[0010] The model construction module performs meshing on the actual machining plane model, sets the interval size of the grid according to a preset value, takes all grid nodes as theoretical positioning points, and establishes a set of theoretical positioning points.
[0011] Step 4: Establish a correction module in the laser correction server. The correction module calculates the rotation angle of the galvanometer corresponding to each theoretical positioning point according to the laser pincushion distortion correction method, and establishes a set of galvanometer rotation angles.
[0012] Step 5: The laser correction server sends the set of galvanometer rotation angles to the SLM printer. The SLM printer projects test lasers onto the actual machining plane in sequence according to the galvanometer rotation angles in the set of galvanometer rotation angles. The high-speed CCD camera captures the spot images of the projected test lasers. The laser correction server obtains the spot images in real time, generates a set of spot images, and the image processing module preprocesses all the images in the set of spot images and calculates the position of the center of the spot in the world coordinate system:
[0013] Step 6: Process all the images in the set of spot images according to the method of Step 5 to obtain the dot matrix data of the spot hitting the target on the actual machining plane. The model construction module obtains the dot matrix data and establishes a mathematical dot matrix model of the center of the spot. Compare the actual coordinates of the center of the spot in the mathematical dot matrix model with the coordinates of the corresponding theoretical positioning points in sequence, and use the deviation value as the laser error correction parameter to obtain the corresponding laser correction points.
[0014] Step 7: The laser correction server recalculates the laser pincushion distortion correction for the laser correction points to obtain the corrected rotation angles of the galvanometer, establishes a set of corrected rotation angles of the galvanometer, and sends it to the SLM printer. The SLM printer corrects the laser according to the set of corrected rotation angles of the galvanometer T’.
[0015] Preferably, the 3D printing machining plane is the printing machining plane of the SLM printer.
[0016] Preferably, the origin of the world coordinate system is the pixel point at the bottom left corner of the coordinate positioning map.
[0017] Preferably, when performing Step S5-2, the value of n is determined by whether the square box can completely enclose all the pixels representing the spot.
[0018] Preferably, when performing Step S5-2, when moving the square box, the horizontal axis of the relative coordinate system is always parallel to the horizontal axis of the world coordinate system, and the vertical axis of the relative coordinate system is always parallel to the vertical axis of the world coordinate system.
[0019] Preferably, when performing Step 5, it specifically includes the following steps:
[0020] Step S5-1: Obtain any one of the spot images in the set of spot images. After performing binarization processing on the spot image and then noise reduction processing, a spot grayscale image is obtained, and the pixels representing the spot, i.e., spot pixels, are identified.
[0021] Step S5-2: Set a square box, and calculate the side length L of the square box according to the following formula:
[0022] where φ is the diameter of the laser spot preset by the SLM printer, and n is a positive integer; that is, after dividing the diameter of the laser spot into n parts, the side length of the square box is the diameter φ plus
[0023] Taking the lower left corner vertex of the square box as the center, establish the relative coordinate system where the square box is located.
[0024] Load the square box into the spot grayscale image, and move the square box so that the square box completely encloses all spot pixels.
[0025] Step S5-3: Taking as the interval distance, establish a grid GA, and number all the unit grids in the grid GA. Use the grid GA to perform grid processing on the square box, and establish a mapping list between the position coordinates of the centers of the unit grids in the relative coordinate system and the numbers, i.e., the relative coordinate mapping list.
[0026] Mark all the unit grids in the grid GA that contain spot pixels as spot unit grids.
[0027] In the horizontal axis direction of the relative coordinate system, determine whether the number of spot unit grids is even or odd: when it is even, take the midpoint of the line connecting the centers of the two middle spot unit grids in the horizontal axis direction as the abscissa x' of the center of the spot in the relative coordinate system; when it is odd, take the center of the middle spot unit grid in the horizontal axis direction as the abscissa x' of the center of the spot in the relative coordinate system.
[0028] Similarly, in the vertical axis direction of the relative coordinate system, determine whether the number of spot unit grids is even or odd: when it is even, take the midpoint of the line connecting the centers of the two middle spot unit grids in the vertical axis direction as the ordinate y′ of the center of the spot in the relative coordinate system; when it is odd, take the center of the middle spot unit grid in the vertical axis direction as the ordinate y′ of the center of the spot in the relative coordinate system.
[0029] According to the relative coordinate mapping list, obtain the coordinates of the center O'(x', y′) of the spot in the relative coordinate system.
[0030] Step S5-5: Compare the relative coordinate system with the world coordinate system to obtain the actual position of the center of each unit grid in the world coordinate system, and calculate the actual coordinates O(i, j) of the center of the circle O'(x', y') in the world coordinate system.
[0031] A laser correction method described in the present invention solves the technical problems of quickly positioning the center of a laser spot and performing pillow correction and error correction on the position of the laser spot. The present invention can quickly locate the center of the laser spot without using the three-cut method or circle fitting method, reducing the calculation amount and accelerating the processing speed. While performing pillow correction on the laser, the present invention also corrects the mechanical error of the laser, greatly increasing the processing accuracy. Description of the Drawings
[0032] Figure 1 is the flowchart of the present invention;
[0033] Figure 2 is the schematic diagram of the mathematical model for meshing the actual processing plane model of the present invention;
[0034] Figure 3 is the schematic diagram of the mathematical model when there is a mechanical error between the actual spot position and the theoretical positioning point of the present invention;
[0035] Figure 4 is the schematic diagram of the mathematical model of the position relative to the world coordinate system when correcting the mechanical error through the grid GA of the present invention;
[0036] Figure 5 is the mathematical model diagram for positioning the center of the circle when it is determined that the number of spot unit grids is even in the present invention;
[0037] Figure 6 is the mathematical model diagram for positioning the center of the circle when it is determined that the number of spot unit grids is odd in the present invention;
[0038] Figure 7 is the spot image after binarization processing of the present invention;
[0039] Figure 8 is the grayscale image of the spot image after denoising of the present invention;
[0040] Figure 9 is the image that completely contains the spot pixels after moving the grid GA of the present invention. Detailed Embodiments
[0041] Consisting of Figures 1-9 A laser correction method shown in the figure specifically includes the following steps:
[0042] Step 1: Deploy a laser correction server. The laser correction server communicates with the SLM printer via a network cable, obtains the real-time image of the processing plane of the SLM printer captured by the high-speed CCD camera of the SLM printer, and simultaneously obtains the diameter φ of the preset laser spot of the SLM printer.
[0043] Step 2: Establish an image processing module in the laser correction server. The image processing module is used to perform image preprocessing on the real-time image, and then label the coordinates of the pixels in the preprocessed image to generate a coordinate positioning map of the processing plane.
[0044] Step 3: Establish a model construction module in the laser correction server. The model construction module establishes an actual processing plane model of the processing plane according to the coordinate positioning map, and performs dimension annotation on the actual processing plane model according to the coordinate annotation of the pixels and establishes a world coordinate system.
[0045] The model construction module performs meshing on the actual processing plane model, sets the interval size of the grid according to a preset value, takes all grid nodes as theoretical positioning points, and establishes a set of theoretical positioning points Z = {P 0,0 , P 1,0 , P 0,1 , P 2,0 , P 0,2 ... P i,j}, where P i,j is a grid node, and i and j are the abscissa value and ordinate value of the node P in the world coordinate system respectively.
[0046] Step 4: Establish a correction module in the laser correction server, and input the distance d from the center of the X-axis lens to the center of the Y-axis lens of the galvanometer of the SLM printer and the height h from the center of the Y-axis lens of the galvanometer to the processing plane in the laser correction server. The correction module calculates the rotation angle α of the galvanometer corresponding to all the theoretical positioning points in the set of theoretical positioning points Z according to the laser pincushion distortion correction method, and establishes a set of galvanometer rotation angles where α is the rotation angle of the galvanometer, and the value of α is determined by θ x and θ y , θ x and θ y are the rotation angles of the X-axis lens and Y-axis lens of the galvanometer respectively, and P i,j is the grid node corresponding to α.
[0047] The calculation formula of the laser pincushion distortion correction method is as follows:
[0048]
[0049]
[0050] where i and j are the grid nodes Pi,j The abscissa and ordinate in the world coordinate system.
[0051] As Figure 3 shown, due to mechanical errors during installation, there is still a deviation in the laser spot after pillow correction, that is, the actual position of the spot is at P' i,j , rather than the ideal grid node P i,j .
[0052] Step 5: The laser correction server sends the galvanometer rotation angle set T to the SLM printer. The SLM printer projects test lasers onto the actual processing plane in sequence according to the galvanometer rotation angles in the galvanometer rotation angle set T. The high-speed CCD camera captures the spot images projected by the test lasers. The laser correction server obtains the spot images in real time, generates a set of spot images, and the image processing module preprocesses all the images in the set of spot images and calculates the position of the center of the spot in the relative coordinate system and the position in the world coordinate system according to the following steps:
[0053] In actual applications, the spot projected by the laser is often not a perfect circle but an elliptical shape. When measuring the center of the laser spot, the three-tangent method or the principle of circle fitting is often used for measurement. However, in the pixel map of the spot, the boundary of the spot is not clear, and it is difficult to obtain suitable tangent points. When using circle fitting, the refionprops function needs to be loaded for calculations such as the major axis, minor axis, and eccentricity, which will increase the calculation amount significantly and slow down the processing speed.
[0054] In this embodiment, a method of setting a square box and performing grid processing is used to determine the center of the circle, which speeds up the determination of the center of the circle within the allowable error range and reduces the calculation amount.
[0055] Step S5-1: Obtain any one of the spot images in the set of spot images. After binarizing the spot image and then performing noise reduction processing, a spot grayscale image is obtained, and the pixels representing the spot are identified, that is, spot pixels;
[0056] Step S5-2: Set a square box and calculate the side length L of the square box according to the following formula:
[0057] where φ is the diameter of the laser spot preset by the SLM printer, and n is a positive integer; that is, after dividing the diameter of the laser spot into n parts, the side length of the square box is the diameter φ plus
[0058] Establish a relative coordinate system where the square box is located with the lower left corner vertex of this square box as the center of the circle;
[0059] Load a square box in the spot grayscale image and move the square box so that the square box completely encloses all spot pixels; as Figure 9 shown, the image after adding the square box and meshing.
[0060] In the actual operation process, the value of n is determined by whether the square box can completely enclose all pixels representing the spot. When the value of n is too large, the square box may not be able to completely enclose all pixels representing the spot due to the too small difference between L and φ. At this time, reduce the value of n and re-set the size of the square box until it can completely enclose all pixels representing the spot.
[0061] The value of n is determined by the error range of the machined workpiece. In this embodiment, n = 5 is adopted, and the side length of its square box is Its actual number of grids is a 6×6 grid, which can reduce a large amount of calculations.
[0062] When moving the square box, the horizontal axis of the relative coordinate system is always parallel to the horizontal axis of the world coordinate system, and the vertical axis of the relative coordinate system is always parallel to the vertical axis of the world coordinate system.
[0063] Step S5-3: Using as the interval distance, establish a grid GA, number all the unit grids in the grid GA, and use the grid GA to mesh the square box, establishing a mapping list between the position coordinates of the centers of the unit grids in the relative coordinate system and the numbers, that is, the relative coordinate mapping list;
[0064] Mark all the unit grids in the grid GA that contain spot pixels as spot unit grids;
[0065] As Figure 5 and Figure 6 shown, the numbers of the unit grids in the grid GA are denoted as G (i′,j′) , where i' and j' respectively represent the row number and column number of the unit grid, and the values of i' and j' are both less than or equal to n. The number of the unit grid at the bottom left corner of the grid GA is denoted as G (0,0) , and the bottom left vertex of the unit grid G (0,0) is the origin O" of the relative coordinate system.
[0066] Step S5-4: In the horizontal axis direction of the relative coordinate system, determine whether the number of spot unit grids is even or odd: when it is even, take the midpoint of the connection line of the centers of the two middle spot unit grids in the horizontal axis direction as the abscissa x' of the center of the spot in the relative coordinate system; when it is odd, take the center of the middle spot unit grid in the horizontal axis direction as the abscissa x' of the center of the spot in the relative coordinate system;
[0067] As shown Figure 5 in the case where the number of spot unit grids is even, at this time, take the two central unit grids G (i′,j′) and G (i′+1,j′) , obtain the center D1 of G (i′,j′) and the center D2 of G (i′+1,j′) . After connecting the two centers and finding the midpoint of the line segment D1 - D2, use this midpoint as the center O of the light spot.
[0068] Another example is Figure 6 shown in the case where the number of spot unit grids is odd. At this time, take the central unit grid G (i′,j′) , and obtain the midpoint of the unit grid G (i′,j′) as the center O of the light spot.
[0069] Similarly, in the direction of the vertical axis of the relative coordinate system, determine whether the number of spot unit grids is even or odd: when it is even, take the midpoint of the line connecting the centers of the two central spot unit grids in the direction of the vertical axis as the ordinate y' of the center of the light spot in the relative coordinate system; when it is odd, take the center of the central spot unit grid in the direction of the vertical axis as the ordinate y' of the center of the light spot in the relative coordinate system;
[0070] According to the relative coordinate mapping list, obtain the coordinates of the center O'(x', y') of the light spot in the relative coordinate system.
[0071] In this embodiment, the deviation between the actual position of the center of the light spot and the obtained center O'(x', y') of the light spot is within the distance. Generally, the accuracy of the SLM printer can be based on the diameter of the laser spot. The present invention can meet the accuracy requirements of most machined workpieces.
[0072] Step S5 - 5: Compare the relative coordinate system with the world coordinate system to obtain the actual position of the center of each unit grid in the world coordinate system, and calculate the actual coordinates O(i, j) of the center O'(x', y') in the world coordinate system;
[0073] Step 6: According to the method of step 5, process all the images in the light spot image set to obtain the dot matrix pattern of the light spot hitting the target on the actual processing plane. The model construction module obtains the dot matrix pattern and establishes a mathematical dot matrix model of the center of the light spot. Compare the coordinate deviation between the actual coordinates O(i, j) of the center of the light spot in the mathematical dot matrix model and the theoretical positioning point as the laser error correction parameter to obtain a laser correction point P' i,j ;
[0074] Step 7: The laser correction server recalculates the laser pincushion distortion correction according to the laser error correction parameters, obtains the corrected rotation angle α' of the galvanometer, and establishes a set of corrected rotation angles of the galvanometer. P′ i,j is the grid node corresponding to α', and is sent to the SLM printer. The SLM printer corrects the laser according to the set of corrected rotation angles T' of the galvanometer.
[0075] The 3D printing processing plane is the printing processing plane of the SLM printer.
[0076] The origin of the world coordinate system is the pixel point at the bottom left corner of the coordinate positioning map.
[0077] A laser correction method of the present invention solves the technical problems of quickly positioning the center of the laser spot and performing pincushion correction and error correction on the position of the laser spot. The present invention can quickly position the center of the laser spot without using the three-cut method or the circle fitting method, reduces the calculation amount, and speeds up the processing speed. While performing pincushion correction on the laser, the present invention also corrects the mechanical error of the laser, greatly increasing the processing accuracy.
Claims
1. A laser correction method, characterized in that: Specifically, it includes the following steps: Step 1: Deploy a laser correction server. The laser correction server communicates with the SLM printer via a network cable, obtains the real-time image of the processing plane of the SLM printer captured by the high-speed CCD camera of the SLM printer, and simultaneously obtains the diameter of the laser spot preset by the SLM printer ; Step 2: Establish an image processing module in the laser correction server. The image processing module is used to perform image preprocessing on the real-time image, and then label the coordinates of the pixels in the preprocessed image to generate a coordinate positioning map of the processing plane; Step 3: Establish a model construction module in the laser correction server. The model construction module establishes an actual processing plane model of the processing plane according to the coordinate positioning map, and performs dimension labeling on the actual processing plane model according to the coordinate labeling of the pixels and establishes a world coordinate system; The model construction module performs meshing on the actual processing plane model, sets the interval size of the grid according to a preset value, takes all grid nodes as theoretical positioning points, and establishes a set of theoretical positioning points; Step 4: Establish a correction module in the laser correction server. The correction module calculates the rotation angle of the galvanometer corresponding to each theoretical positioning point according to the laser pincushion distortion correction method, and establishes a set of galvanometer rotation angles; Step 5: The laser correction server sends the set of galvanometer rotation angles to the SLM printer. The SLM printer projects test lasers onto the actual processing plane in sequence according to the galvanometer rotation angles in the set of galvanometer rotation angles. The high-speed CCD camera captures the spot images projected by the test lasers. The laser correction server obtains the spot images in real time to generate a set of spot images. The image processing module preprocesses all the images in the set of spot images and calculates the position of the center of the spot in the world coordinate system: Step 6: According to the method in Step 5, process all the images in the set of spot images to obtain the dot matrix data of the spot shooting on the actual processing plane. The model construction module obtains the dot matrix data and establishes a mathematical dot matrix model of the center of the spot. Compare the coordinate deviation between the actual coordinates of the center of the spot in the mathematical dot matrix model and the corresponding theoretical positioning points in sequence, take the deviation value as the laser error correction parameter, and obtain the corresponding laser correction points; Step 7: The laser correction server recalculates the laser pincushion distortion correction for the laser correction points to obtain the corrected rotation angles of the galvanometer, establishes a set of corrected rotation angles of the galvanometer, and sends them to the SLM printer. The SLM printer corrects the laser according to the set of corrected rotation angles T' of the galvanometer.
2. The laser correction method according to claim 1, characterized in that: The 3D printing processing plane is the printing processing plane of the SLM printer.
3. The laser correction method according to claim 1, characterized in that: The origin of the world coordinate system is the pixel point at the lower left corner of the coordinate positioning map.
4. A laser correction method according to claim 1, characterized in that: When performing Step S5-2, the value of n is determined by whether the square box can completely enclose all the pixels representing the spot.
5. The laser correction method according to claim 1, characterized in that: When performing Step S5-2, when moving the square box, the horizontal axis of the relative coordinate system is always parallel to the horizontal axis of the world coordinate system, and the vertical axis of the relative coordinate system is always parallel to the vertical axis of the world coordinate system.
6. A laser correction method as claimed in claim 1, characterized in that: When performing Step 5, it specifically includes the following steps: Step S5-1: Obtain any one of the spot images in the set of spot images, perform binary processing on the spot image, and then perform noise reduction processing to obtain a spot grayscale image, and identify the pixels representing the spot, that is, spot pixels; Step S5-2: Set a square box and calculate the side length L of the square box according to the following formula: Among them, is the diameter of the laser spot preset by the SLM printer, and n is a positive integer; that is, after dividing the diameter of the laser spot into n parts, the side length of the square frame is the diameter plus Taking the lower left corner vertex of the square box as the center, establish the relative coordinate system where the square box is located; Load the square box into the spot grayscale image, and move the square box so that the square box completely encloses all spot pixels; Step S5-3: Using as the interval distance, a grid GA is established, and all the unit grids in the grid GA are numbered. The square box is meshed using the grid GA, and a mapping list between the position coordinates of the center of the unit grid in the relative coordinate system and the number is established, that is, the relative coordinate mapping list; Mark all the unit grids in the grid GA that contain spot pixels, which are the spot unit grids; Step S5-4: In the direction of the horizontal axis of the relative coordinate system, determine whether the number of spot unit grids is even or odd: When it is even, take the midpoint of the line connecting the centers of the two middle spot unit grids in the horizontal axis direction as the abscissa x' of the center of the spot in the relative coordinate system; When it is odd, take the center of the middle spot unit grid in the horizontal axis direction as the abscissa x' of the center of the spot in the relative coordinate system; Similarly, in the direction of the vertical axis of the relative coordinate system, determine whether the number of spot unit grids is even or odd: When it is even, take the midpoint of the line connecting the centers of the two middle spot unit grids in the vertical axis direction as the ordinate y' of the center of the spot in the relative coordinate system; When it is odd, take the center of the middle spot unit grid in the vertical axis direction as the ordinate y' of the center of the spot in the relative coordinate system; According to the relative coordinate mapping list, obtain the coordinates of the center O'(x', y') of the spot in the relative coordinate system; Step S5-5: Compare the relative coordinate system with the world coordinate system, obtain the actual positions of the centers of each unit grid in the world coordinate system, and calculate the actual coordinates O(i, j) of the center O'(x', y') in the world coordinate system.
Citation Information
Patent Citations
Measuring and machining integrated laser three-dimensional marking method and device
CN101497279A
Locating method of central precise grid of vacuum laser facula
CN102072724A