Expansion compensation method, laser marking machine, expansion compensation device and storage medium
By employing a shrinkage compensation method in a laser marking machine, and using image acquisition and affine transformation matrix to correct cutting information, the problem of cutting offset caused by material deformation of FPC flexible circuit boards was solved, achieving high-precision laser cutting results.
Patent Information
- Application Number
- CN202511539050.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-27
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2045-10-27
AI Technical Summary
During the manufacturing process of FPC flexible circuit boards, the hygroscopicity and thermal sensitivity of flexible materials such as polyimide cause slight expansion or contraction deformation of the material before cutting, resulting in a mismatch between the processing path and the actual workpiece position, causing cutting offset and dimensional deviation, which affects product yield and reliability.
By employing a swelling and shrinkage compensation method in a laser marking machine, an image acquisition device is used to collect images of feature points, which are then binarized to determine the actual coordinate information. An affine transformation matrix is then constructed to correct the cutting information, adapting to the deformation of the material and achieving precise cutting.
It improves the precision and product yield of laser cutting, ensures that the cutting path matches the actual workpiece position, and enhances processing accuracy and efficiency.
Smart Images

Figure CN121010530B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of laser marking machines, and more specifically, to a method for compensating for expansion and contraction, a laser marking machine, an expansion and contraction compensation device, and a storage medium. Background Technology
[0002] In the manufacturing process of FPC flexible circuit boards, laser marking machines typically plan the path according to the pre-set drawing to be processed, and control the laser head to process according to the set trajectory through a high-precision motion platform.
[0003] However, in actual production, FPC substrates (i.e., the materials of FPC flexible circuit boards) are mostly made of flexible materials such as polyimide (PI). These materials have strong hygroscopicity and heat sensitivity. In the process before the workpiece to be processed on the workbench is cut according to the processing drawing (such as pressing, electroplating, etching, storage, etc.), it is very easy to undergo slight expansion or contraction deformation.
[0004] If cutting is performed directly based on the drawing file to be processed without considering the changes in the actual physical state of the material, it will lead to a mismatch between the processing path and the actual workpiece position, which will cause problems such as cutting offset and dimensional deviation, seriously affecting product yield and reliability. Summary of the Invention
[0005] In view of the above problems, this application proposes a method for compensating for expansion and contraction, a laser marking machine, a device for compensating for expansion and contraction, and a storage medium to solve the above problems.
[0006] In a first aspect, embodiments of this application provide a shrinkage compensation method applied to a laser marking machine. The laser marking machine includes a laser, a worktable, and an image acquisition device. The target workpiece on the worktable includes multiple feature points to be laser-etched according to a theoretical drawing. The image acquisition device is used to acquire images of each feature point. The multiple feature points divide the target workpiece into multiple feature regions. The method includes: performing binarization processing on the images to obtain a binarized image corresponding to each feature point; determining the actual coordinate information of each feature point in the coordinate system corresponding to the worktable in the binarized image according to a preset extraction algorithm; determining the affine transformation matrix corresponding to each feature region according to the transformation between the actual coordinate information of the feature points included in each feature region and their corresponding theoretical coordinate information in the theoretical drawing; and correcting the object to be laser-etched corresponding to each feature region according to the affine transformation matrix corresponding to each feature region to determine the cutting information of the object to be laser-etched corresponding to each feature region, so that the laser can cut according to the cutting information.
[0007] Secondly, embodiments of this application also provide a laser marking machine, which includes: a target workpiece on a worktable including multiple feature points to be laser-marked according to a theoretical drawing; an image acquisition unit for acquiring images of each feature point; multiple feature points dividing the target workpiece into multiple feature regions; a controller for binarizing the images to obtain a binarized image corresponding to each feature point; the controller for determining the actual coordinate information of each feature point in the coordinate system corresponding to the worktable in the binarized image according to a preset extraction algorithm; the controller for determining the affine transformation matrix corresponding to each feature region according to the conversion between the actual coordinate information of the feature points included in each feature region and their corresponding theoretical coordinate information in the theoretical drawing; and the controller for correcting the object to be laser-marked corresponding to each feature region according to the affine transformation matrix corresponding to each feature region, and determining the cutting information of the object to be laser-marked corresponding to each feature region, so that the laser can cut according to the cutting information.
[0008] Thirdly, this application also provides a shrinkage compensation device applied to a laser marking machine. The laser marking machine includes a laser, a worktable, and an image acquisition device. The target workpiece on the worktable includes multiple feature points to be laser-etched according to a theoretical drawing. The image acquisition device is used to acquire images of each feature point. The multiple feature points divide the target workpiece into multiple feature regions. The device includes: an image processing module for binarizing the images to obtain a binarized image corresponding to each feature point; an information determination module for determining the actual coordinate information of each feature point in the coordinate system corresponding to the worktable in the binarized image according to a preset extraction algorithm; a matrix determination module for determining the parameters in the affine transformation matrix corresponding to each feature region according to the conversion between the actual coordinate information of the feature points included in each feature region and their corresponding theoretical coordinate information in the theoretical drawing; and an execution module for correcting the laser-to-be-lased object corresponding to each feature region according to the affine transformation matrix corresponding to each feature region, and determining the cutting information of the laser-to-be-lased object corresponding to each feature region, so that the laser can cut according to the cutting information.
[0009] Fourthly, embodiments of this application also provide a laser marking machine, including a processor, a memory, and one or more application programs; the one or more application programs are stored in the memory and configured to be executed by the processor to implement the above-described expansion and contraction compensation method.
[0010] Fifthly, embodiments of this application also provide a computer-readable storage medium storing program code, wherein the above-described expansion / contraction compensation method is executed when the program code is run by a processor.
[0011] The technical solution provided in this application, a method, is applied to a laser marking machine. The laser marking machine includes a laser, a worktable, and an image acquisition device. The target workpiece on the worktable includes multiple feature points processed according to a theoretical drawing. The image acquisition device is used to acquire images of each feature point. The multiple feature points divide the target workpiece into multiple feature regions. The method includes: performing binarization processing on the images to obtain a binarized image corresponding to each feature point; determining the actual coordinate information of each feature point in the coordinate system corresponding to the worktable in the binarized image according to a preset extraction algorithm; determining the affine transformation matrix corresponding to each feature region according to the transformation between the actual coordinate information of the feature points included in each feature region and their corresponding theoretical coordinate information in the theoretical drawing; and correcting the object to be laser-marked corresponding to each feature region according to the affine transformation matrix corresponding to each feature region to determine the cutting information of the object to be laser-marked corresponding to each feature region, so that the laser can cut according to the cutting information. Therefore, by determining the affine transformation matrix corresponding to each feature region, the laser-to-be-lased object corresponding to each feature region can be corrected according to the affine transformation matrix corresponding to its corresponding feature region (for example, adaptively correcting the coordinates and dimensions of the original laser-to-be-lased object), generating high-precision cutting information to guide the laser to perform precise processing. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments and drawings obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0013] Figure 1 A schematic diagram of the structure of a laser marking machine according to an embodiment of this application is shown.
[0014] Figure 2 A schematic diagram of the structure of a theoretical drawing involved in an embodiment of this application is shown.
[0015] Figure 3 A schematic flowchart of an expansion and contraction compensation method provided in an embodiment of this application is shown.
[0016] Figure 4 This illustration shows a structural diagram of a drawing to be processed according to an embodiment of this application.
[0017] Figure 5 A schematic diagram of the structure of a workpiece to be processed is shown in an embodiment of this application.
[0018] Figure 6A schematic diagram of another laser marking machine provided in an embodiment of this application is shown.
[0019] Figure 7 A schematic diagram of the structure of an expansion and contraction compensation device provided in an embodiment of this application is shown.
[0020] Figure 8 This is a schematic diagram of the structure of another laser marking machine provided in the embodiments of this application.
[0021] Figure 9 This illustration shows a schematic diagram of the structure of a computer-readable storage medium provided in an embodiment of this application. Detailed Implementation
[0022] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
[0023] The following describes the application environment of the expansion and contraction compensation method provided in the embodiments of the present invention.
[0024] Please see Figure 1 , Figure 1 A schematic diagram of the structure of a laser marking machine according to an embodiment of this application is shown, as follows: Figure 1 As shown, the laser marking machine 100 includes a laser 110, a worktable 120, and an image acquisition unit 130. The target workpiece on the worktable 120 includes multiple feature points formed according to a theoretical drawing (i.e., processing is performed on the target workpiece according to the theoretical drawing to form a target workpiece including multiple feature points). The image acquisition unit 130 is used to acquire images including each feature point, which divides the target workpiece into multiple feature regions. For example, connecting three adjacent feature points in pairs defines a feature region. Similarly, connecting four adjacent feature points in pairs defines a feature region.
[0025] In some implementations, the image acquisition device 130 can be a camera.
[0026] In some embodiments, the target workpiece can be an FPC flexible circuit board. In some embodiments, the target workpiece can be ink-coated paper. This application will describe in detail using an FPC flexible circuit board as an example.
[0027] In some implementations, users can input a theoretical drawing containing multiple feature points into a processing device. The device then processes the target workpiece at the corresponding position based on the theoretical coordinates of each feature point (the theoretical coordinates of the feature point on the target workpiece) within the theoretical drawing (e.g., a CAD drawing). These multiple feature points divide the target workpiece into multiple feature regions. This process precedes the process corresponding to the expansion and contraction compensation method (i.e., the FPC laser cutting process). Because errors exist in the processes preceding the expansion and contraction compensation method (e.g., exposure machine processes, material expansion and contraction of FPC flexible circuit boards), the FPC laser cutting process requires calculation and compensation based on the feature points.
[0028] For example, please refer to Figure 2 , Figure 2 This application illustrates a schematic diagram of the structure of a theoretical drawing file according to an embodiment of the present application, such as... Figure 2 As shown, the theoretical drawing file includes 36 feature points: M1, M2, M3, M4, M5, M6, M7, M8, ..., M36. These 36 feature points divide the workpiece into 25 feature regions. That is, four adjacent feature points constitute one feature region. For example, feature points M1, M2, M7, and M8 constitute one feature region. The determination of other feature regions is similar and will not be elaborated further here.
[0029] Users can also input a drawing containing the object to be laser-etched into the laser marking machine 100, so that the laser 110 can cut the object to be laser-etched onto the workpiece (which is an FPC flexible circuit board). The object to be laser-etched can be the processing pattern in the drawing. It is understood that the drawing to be laser-etched and the theoretical drawing are located in the same coordinate system, and the origin position, drawing size, and other information are identical. The only difference is that the drawing to be laser-etched includes the object to be laser-etched, while the theoretical drawing includes multiple feature points. Feature points M1, M2, M7, and M8 on the theoretical drawing constitute a feature region, and their corresponding regions exist at the same positions on the drawing to be laser-etched. In other words, the multiple feature regions included in the theoretical drawing correspond one-to-one with the multiple feature regions on the drawing to be laser-etched. Therefore, when determining the affine transformation matrices corresponding to the multiple feature regions included in the theoretical drawing, the affine transformation matrices corresponding to the multiple feature regions included in the drawing to be laser-etched are also determined. Details can be found in the subsequent description.
[0030] After determining the theoretical drawing, the equipment with processing capabilities processes multiple feature points on the target workpiece based on the information included in the theoretical drawing. Then, the image acquisition device 130 acquires an image of each feature point among the multiple feature points on the target workpiece located on the worktable 120.
[0031] For example, multiple feature points include feature point M1 and feature point M2, with feature point M1 corresponding to position D1 and feature point M2 corresponding to position D2. The image acquisition device 130 moves to position D1 and acquires an image of feature point M1 to obtain an image. Image acquisition device 130 moves to position D2 and acquires an image of feature point M2. .
[0032] The laser marking machine 100 moves the image acquisition unit 130 to the corresponding position of each feature point, thereby acquiring an image corresponding to each feature point. Then, based on the image corresponding to each feature point, it determines the actual position information of each feature point on the target workpiece. Specifically:
[0033] Please see Figure 3 , Figure 3 A schematic flowchart of a shrinkage compensation method provided in an embodiment of this application is shown, which can be applied to the aforementioned laser marking machine. Figure 3 As shown, the method may include steps 210 to 240.
[0034] In step 210, the image is binarized to obtain a binarized image corresponding to each feature point.
[0035] Laser marking machines binarize the image corresponding to each of multiple feature points, separating each feature point from the background of the target workpiece. This makes each feature point more prominent and facilitates the subsequent determination of its actual coordinates. Specifically:
[0036] In some implementations, the step "binarizing the image to obtain a binary image corresponding to each feature point" may include the following steps:
[0037] (1) Update the pixel value of each pixel in the image that is less than or equal to a preset value to a first threshold; wherein the preset value is related to the color of the feature point, and the first threshold is the pixel value corresponding to the first color.
[0038] (2) Update the pixel values of pixels in each image that are greater than the preset value to the second threshold; the first threshold is the pixel value corresponding to the second color, and the first color is different from the second color.
[0039] (3) Determine the binarized image corresponding to each image based on the updated pixel values of each pixel in each image.
[0040] In some implementations, the first color can be black. The second color can be white, meaning the background of the target workpiece is white. Since the first color is black and the second color is white, the preset value can be set to a small value to distinguish the two colors. In one specific implementation, the preset value can be in the range [0, 128].
[0041] In one specific implementation, the first threshold can be 255. The second threshold can be 0.
[0042] For example, a binarized image can be represented as:
[0043]
[0044] in," " is the coordinate point ( Updated grayscale values; " is the coordinate point ( The grayscale value before the update; " is the default value.
[0045] By binarizing the image, feature points are separated from the background of the target workpiece, making the feature points more prominent and facilitating subsequent steps to determine the actual coordinates of each feature point in the coordinate system corresponding to the worktable. Specifically:
[0046] In step 220, according to the preset extraction algorithm, the actual coordinate information of each feature point in the coordinate system corresponding to the workbench is determined in the binarized image.
[0047] In some implementations, the feature points can be circular patterns. It is understood that this application does not limit the specific shape of the feature points.
[0048] As described above, theoretical coordinate information refers to the theoretical position coordinates of the feature point on the target workpiece, while actual coordinate information refers to the actual position coordinates of the feature point on the target workpiece.
[0049] In some implementations, the preset extraction algorithm can be the Canny edge detection algorithm. In some implementations, the preset extraction algorithm can be the Sobel operator. It is understood that this application does not limit the specific algorithm of the preset extraction algorithm. The laser marking machine extracts the coordinates on the edge of each feature point using the preset extraction algorithm, then forms a set based on these coordinates, and further determines the actual coordinate information corresponding to each feature point based on the set. Specifically:
[0050] In some implementations, the step "determining the actual coordinate information of each feature point in the binary image according to a preset extraction algorithm in the coordinate system corresponding to the workbench" may include the following steps:
[0051] (1) Extract the contour point set of each circular pattern in the binarized image according to the preset extraction algorithm.
[0052] (2) Determine the centroid coordinates and radius information of each circular pattern based on the contour point set.
[0053] (3) Determine the minimum circumcircle corresponding to each circular pattern based on the centroid coordinate information and radius information.
[0054] (4) Determine the actual coordinate information of each feature point based on the center of the smallest circumcircle.
[0055] In some implementations, the contour point set can be a set of coordinates of points on the contour of a feature point. For example, if the coordinates of the points on the contour of a feature point include a first coordinate point, a second coordinate point, a third coordinate point, ..., an nth coordinate point, then the contour point set of the feature point is (first coordinate point, second coordinate point, third coordinate point, ..., nth coordinate point).
[0056] After determining the set of contour points corresponding to each feature point, the laser marking machine determines the centroid coordinates of each feature point based on these contour point sets. The centroid coordinates of each feature point can be represented as follows:
[0057]
[0058]
[0059] After determining the set of contour points corresponding to each feature point, the laser marking machine determines the radius information corresponding to each feature point based on these contour point sets. The radius information corresponding to each feature point can be represented as:
[0060]
[0061] After determining the centroid coordinates and radius of each feature point, the laser marking machine constructs the minimum circumcircle corresponding to each feature point based on the centroid coordinates and radius of each feature point, and then uses the center of the minimum circumcircle as the actual coordinates of each feature point.
[0062] Therefore, it can be seen that the theoretical coordinate information of each feature point can be obtained through the theoretical drawing file. By processing the image corresponding to each feature point using the above-mentioned techniques, the actual position information of each feature point on the worktable can be obtained. Based on this, through the mapping relationship between theoretical coordinate information and actual position information, an expression for the transformation relationship between theoretical coordinate information and actual position information is constructed. Then, by solving the expression for the transformation relationship, the affine transformation matrix corresponding to each feature region is determined. Specifically:
[0063] In step 230, the affine transformation matrix corresponding to each feature region is determined based on the conversion between the actual coordinate information of the feature points included in each feature region and their corresponding theoretical coordinate information in the theoretical drawing file.
[0064] In some implementations, the laser marking machine can determine the affine transformation matrix corresponding to a feature region based on the theoretical and actual coordinate information corresponding to all feature points included in that region. For example, four adjacent feature points can define a feature region, and the laser marking machine can determine the affine transformation matrix corresponding to that feature region based on the theoretical and actual coordinate information corresponding to the four feature points.
[0065] For example, suppose a certain feature region is composed of a first feature point, a second feature point, a third feature point, and a fourth feature point, and the theoretical coordinate information corresponding to the first feature point is ( , The theoretical coordinate information corresponding to the second feature point is ( , The theoretical coordinate information corresponding to the third feature point is ( , The theoretical coordinate information corresponding to the fourth feature point is () , The actual coordinates of the first feature point are (). , The actual coordinate information corresponding to the second feature point is ( , The actual coordinate information corresponding to the third feature point is ( , The actual coordinate information corresponding to the fourth feature point is ( , ).
[0066] Laser marking machine passes through ( , )and( , ), ( , )and( , ), ( , )and( , ),as well as( , )and( , The conversion between ) determines ( , ), ( , ), ( , )and( , The characteristic region formed by ) and ( , ), ( , ), ( , )and( , The coefficient of expansion and contraction between the characteristic regions formed by the region.
[0067] Furthermore, based on the correspondence between actual position information, theoretical position information, and the actual position information and theoretical position information, the standard equations of affine transformation can be obtained. Affine transformation can describe various geometric deformations such as translation, scaling, rotation, and shearing, and its expression is:
[0068]
[0069] in,( , ( ) represents the actual coordinates of a certain feature point; , () represents the theoretical coordinate information corresponding to this feature point; "This is the affine transformation matrix from theoretical coordinate information to actual coordinate information;" " is the linear part matrix of the affine transformation.
[0070] The above expression can be transformed to obtain the following equation:
[0071]
[0072]
[0073] In other words, the theoretical coordinates of a feature point and its corresponding actual coordinates can be used to construct the following equation:
[0074]
[0075]
[0076] By substituting the theoretical and actual coordinate information of the feature points included in each feature region into the above equation, the laser marking machine can determine the specific values of the parameters within the affine transformation matrix corresponding to each feature region.
[0077] For example, suppose a feature region includes a first feature point, a second feature point, and a third feature point. The theoretical coordinates of the first feature point are (10, 20), the second feature point is (30, 40), and the third feature point is (50, 60). The actual coordinates of the first feature point are (100, 200), the second feature point is (300, 400), and the third feature point is (500, 600). Then, the following system of equations can be constructed:
[0078]
[0079] By solving the above system of equations, the specific values of the parameters a, b, c, d, e, and f within the affine transformation matrix can be determined, thereby identifying the affine transformation matrix corresponding to the feature region. The affine transformation matrices corresponding to other feature regions are determined in the same way, and will not be elaborated further here.
[0080] In step 240, the laser-to-be-lased object corresponding to each feature region is corrected according to the affine transformation matrix corresponding to each feature region, and the cutting information of the laser-to-be-lased object corresponding to each feature region is determined so that the laser can cut according to the cutting information.
[0081] In some implementations, the object to be laser-etched can be a processing pattern in a drawing file. The drawing file can be a CAD drawing. The drawing file includes regions that correspond one-to-one with multiple feature regions on the target workpiece (multiple feature regions on the target workpiece correspond one-to-one with multiple feature regions on the theoretical drawing file, and multiple feature regions on the theoretical drawing file correspond one-to-one with multiple feature regions on the drawing file, thus obtaining a one-to-one correspondence between multiple feature regions on the drawing file and multiple feature regions on the target workpiece).
[0082] For example, please refer to Figure 4 , Figure 4 This application provides a schematic diagram of the structure of a drawing file to be processed, as shown in the embodiment of the present application. Figure 4 As shown, the boxes within each feature region represent the processing pattern (i.e., the object to be laser-etched) for that feature region. It is understandable that not every feature region contains the object to be laser-etched; some feature regions may not contain the object to be laser-etched.
[0083] The laser marking machine uses an affine transformation matrix corresponding to each feature region to correct the object to be laser-marked for each feature region. This allows for processing based on the cutting information of the object in each feature region, making the processing effect on the workpiece more closely resemble the original drawing. The workpiece to be processed is the part that needs to be cut.
[0084] For example, suppose the first object to be laser-etched is located in the first feature region on the drawing to be processed, and the corresponding region on the target workpiece is the second feature region. The size of the first object to be laser-etched is corrected by the affine transformation matrix corresponding to the second feature region.
[0085] Specifically, in some implementations, the step "correcting the laser-to-be-lased object corresponding to each feature region based on the affine transformation matrix corresponding to each feature region, and determining the cutting information of the laser-to-be-lased object corresponding to each feature region" may include the following steps:
[0086] (1) Determine the position and size information of the object to be lasered corresponding to each feature region.
[0087] (2) Based on the affine transformation matrix corresponding to each feature region, the position information and size information of the object to be lasered corresponding to each feature region are corrected to determine the final position information and size information of the object to be lasered corresponding to each feature region.
[0088] Before the equipment cuts the object to be lasered on the workpiece according to the drawing, the material of the workpiece will shrink or expand. Therefore, it is necessary to correct the position and size information of the object to be lasered in the drawing according to the shrinkage or expansion of the workpiece, so that the object to be lasered cut on the workpiece will also be adjusted accordingly with the shrinkage or expansion of the workpiece material.
[0089] For example, according to the drawing to be processed, a 1cm straight line needs to be cut on the first feature area of the workpiece. Due to the expansion of the material in the first feature area of the workpiece, the original 1cm distance now physically becomes 1.1cm. If the material expansion is not considered, the laser's movement path starts from the beginning of the 1cm straight line and stops after moving 1cm. However, due to the material expansion (i.e., the material is stretched) in the first feature area of the workpiece, this 1cm laser path only covers the material from 0 to 0.909cm. Without correction, the cut will not be complete (i.e., the actual material cut is less than 1cm). To ensure the laser cuts the entire stretched 1.1cm physical distance, the laser should travel a 1.1cm path. This way, the laser cut will perfectly match the stretched line on the material.
[0090] For example, according to the drawing to be processed, a 1cm straight line needs to be cut on the first feature area of the workpiece. Due to the shrinkage of the material in the first feature area, the original 1cm distance is now physically reduced to 0.9cm. If we disregard material shrinkage, the laser's path would start from the beginning of the 1cm straight line and stop after moving 1cm. However, because of the material shrinkage in the first feature area (i.e., the material is reduced in size), this 1cm laser path would cover areas that shouldn't be cut. To ensure the laser precisely matches the compressed 0.9cm physical distance on the material, the laser should only travel a 0.9cm path.
[0091] In other words, by using the affine transformation matrix corresponding to each feature region, the position and size information of the object to be laser-cut corresponding to each feature region are corrected, so that the cutting effect on the workpiece is closer to the drawing to be processed. Further:
[0092] In some implementations, the step "correcting the laser-to-be-lased object corresponding to each feature region based on the affine transformation matrix corresponding to each feature region, and determining the cutting information of the laser-to-be-lased object corresponding to each feature region" may include the following steps:
[0093] (1) Determine the expansion / contraction coefficients corresponding to each feature region based on the absolute values of the parameters in the affine transformation matrix corresponding to each feature region.
[0094] (2) Based on the expansion and contraction coefficients corresponding to each feature region, the size information of the object to be lasered corresponding to each feature region is corrected to determine the final size information of the object to be lasered corresponding to each feature region.
[0095] The laser marking machine determines the expansion / contraction coefficient for each feature region based on the absolute values of the parameters within the affine transformation matrix corresponding to different feature regions. That is, the expansion / contraction coefficient for a given feature region can be expressed as:
[0096]
[0097] in," "" represents the expansion / contraction coefficient corresponding to a certain feature region. "Indicates the scaling factor for a specific feature region;" "", "", "as well as" " represents the parameters within the affine transformation matrix corresponding to this feature region.
[0098] The linear part matrix of an affine transformation The corresponding determinant is It represents the directional area scaling factor of the corresponding feature region under the transformation, and its absolute value is... This reflects whether the material in this characteristic region expands or contracts: A value greater than 1 indicates expansion. A value less than 1 indicates shrinkage. Since laser processing paths depend on length rather than area, it is necessary to... Converting to an equivalent linear scaling factor, and considering that the area is proportional to the square of the side length, we define an expansion / contraction coefficient. This is used to represent a uniform scaling of the laser-electrode object located within the feature region along the length direction. Therefore... The value can directly reflect the scaling of the corresponding feature area in the length direction, so as to effectively compensate for the dimensional deviation caused by the thermal expansion and contraction of the material.
[0099] The scaling factor reflects the scaling ratio of a feature region from the coordinate system corresponding to the drawing to the coordinate system corresponding to the worktable. When the scaling factor corresponding to a feature region is greater than 1, it means that the material of the workpiece being processed has expanded (i.e., been stretched) in that feature region. When the scaling factor corresponding to a feature region is less than 1, it means that the material of the workpiece being processed has contracted (i.e., shrunk) in that feature region.
[0100] The laser marking machine traverses all objects to be laser-marked in the drawing file, obtaining the dimensional information of each object and its corresponding feature area on the workpiece. Based on the expansion / contraction coefficient corresponding to its feature area, the machine compensates for the dimensional information of each object to determine its final dimensional information, ensuring accurate cutting on the workpiece. This process of determining a scaling factor that closely approximates the true value simplifies the calculation process, improves processing efficiency, and, according to actual test results, significantly enhances processing accuracy.
[0101] For example, please refer to Figure 5 , Figure 5 This application provides a schematic diagram of the structure of a workpiece to be processed, as shown in the embodiment of the present application. Figure 5 As shown, the workpiece to be processed is divided into 25 feature regions by 36 feature points, namely u1, u2, u3, ..., u25. Feature region u1 corresponds to the first expansion / contraction coefficient; feature region u2 corresponds to the second expansion / contraction coefficient; feature region u3 corresponds to the third expansion / contraction coefficient; ...; feature region u25 corresponds to the twenty-fifth expansion / contraction coefficient. Assuming the dimensions (w, h) of the first object to be laser-etched are determined based on the drawing, and the first object to be laser-etched is located in feature region u1, then the first object to be laser-etched is corrected according to the first expansion / contraction coefficient to obtain the final dimensions of the first object to be laser-etched. , The calculation process can be expressed as follows:
[0102] ;
[0103] ;
[0104] In other words, if the material in a certain feature area of the workpiece expands, the corresponding laser-electrode object in the drawing file will also expand proportionally; if the material in a certain feature area of the workpiece shrinks, the corresponding laser-electrode object in the drawing file will also shrink proportionally.
[0105] In some implementations, the step of modifying the laser-to-be-lased object corresponding to each feature region based on the affine transformation matrix corresponding to each feature region, and determining the cutting information of the laser-to-be-lased object corresponding to each feature region, may include the following steps:
[0106] (1) Determine the theoretical coordinate information of the object to be lasered corresponding to each feature region in the drawing file to be processed.
[0107] (2) Based on the parameters in the affine transformation matrix corresponding to each feature region, the theoretical coordinate information of the object to be lasered corresponding to each feature region is corrected to determine the final position information of the object to be lasered corresponding to each feature region.
[0108] The laser marking machine traverses all objects to be laser-marked in the drawing file and obtains the theoretical coordinate information (x, y) of each object. As described above, the conversion equation between the theoretical coordinate information of each object and its actual coordinate information on the workpiece is:
[0109] ;
[0110] ;
[0111] Therefore, after determining the theoretical coordinates (x, y) of each object to be laser-etched, and the specific values of the parameters in the affine transformation matrix corresponding to each feature region, the laser marking machine can substitute these values into the above equation to determine the final position information of the object to be laser-etched corresponding to each feature region.
[0112] After determining the final position and size information of the object to be laser-marked corresponding to each feature area, the laser marking machine cuts each object to be laser-marked on the workpiece according to the final position and size information, so that each object to be laser-marked on the workpiece is closer to the drawing to be processed, thereby improving the workpiece yield.
[0113] Please see Figure 6 , Figure 6 This application provides a schematic diagram of the structure of another laser marking machine, as shown in the embodiment of the present application. Figure 6 As shown, the laser marking machine includes a laser 110, an image acquisition unit 130, and a controller 310, wherein:
[0114] The target workpiece on the worktable 120 includes multiple feature points that are machined according to the theoretical drawings.
[0115] Image acquisition unit 130 is used to acquire images of each feature point separately; multiple feature points divide the target workpiece into multiple feature regions.
[0116] The controller 310 is used to perform binarization processing on the image to obtain a binarized image corresponding to each feature point.
[0117] The controller 310 is used to determine the actual coordinate information of each feature point in the binary image in the coordinate system corresponding to the workbench according to a preset extraction algorithm.
[0118] The controller 310 is used to determine the affine transformation matrix corresponding to each feature region based on the conversion between the actual coordinate information of the feature points included in each feature region and their corresponding theoretical coordinate information in the theoretical drawing file.
[0119] The controller 310 is used to correct the laser-to-be-lased object corresponding to each feature region according to the affine transformation matrix corresponding to each feature region, and determine the cutting information of the laser-to-be-lased object corresponding to each feature region, so that the laser 110 can cut according to the cutting information.
[0120] Please see Figure 7 , Figure 7 This illustration shows a structural schematic diagram of a shrinkage compensation device provided in an embodiment of this application, applied to a laser marking machine. The laser marking machine includes a laser, a worktable, and an image acquisition unit. The target workpiece on the worktable includes multiple feature points processed according to a theoretical drawing. The image acquisition unit is used to acquire images of each feature point. The multiple feature points divide the target workpiece into multiple feature regions. The shrinkage compensation device 400 includes: an image processing module 410, an information determination module 420, a matrix determination module 430, and an execution module 440. Specifically:
[0121] The image processing module 410 is used to perform binarization processing on the image to obtain a binarized image corresponding to each feature point.
[0122] The information determination module 420 is used to determine the actual coordinate information of each feature point in the binary image in the coordinate system corresponding to the workbench according to the preset extraction algorithm.
[0123] The matrix determination module 430 is used to determine the parameters in the affine transformation matrix corresponding to each feature region based on the conversion between the actual coordinate information of the feature points included in each feature region and their corresponding theoretical coordinate information in the theoretical drawing file.
[0124] The execution module 440 is used to correct the laser-to-be-lased object corresponding to each feature region according to the affine transformation matrix corresponding to each feature region, and determine the cutting information of the laser-to-be-lased object corresponding to each feature region, so that the laser can cut according to the cutting information.
[0125] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described device and module can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0126] In the several embodiments provided in this application, the coupling or direct coupling or communication connection between the modules shown or discussed may be an indirect coupling or communication connection through some interface, device or module, and may be electrical, mechanical or other forms.
[0127] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.
[0128] Please see Figure 8 , Figure 8 This is a schematic diagram of the structure of another laser marking machine provided in the embodiments of this application. The laser marking machine in this application may include one or more of the following components: processor 510, memory 520 and one or more application programs, wherein the one or more application programs may be stored in memory 520 and configured to be executed by one or more processors 510, and the one or more programs are configured to perform the expansion and contraction compensation method as described in the foregoing method embodiments.
[0129] The processor 510 may include one or more processing cores. The processor 510 connects to various parts of the laser marking machine using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 520, and by calling data stored in the memory 520. Optionally, the processor 510 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 510 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 510 and may be implemented separately through a communication chip.
[0130] The memory 520 may include random access memory (RAM) or read-only memory (ROM). The memory 520 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 520 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing at least one function, instructions for implementing the various method embodiments described below, etc. The data storage area may also store data created during the use of the laser marking machine.
[0131] Please see Figure 9 , Figure 9 The diagram shows a computer-readable storage medium 600 provided in an embodiment of this application. The computer-readable storage medium 600 stores program code, which can be called by a processor to execute the expansion and contraction compensation method described in the above method embodiment.
[0132] The computer-readable storage medium 600 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 600 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 600 has storage space for program code 610 that performs any of the method steps described above. This program code can be read from or written to one or more computer program devices. The program code 610 may, for example, be compressed in a suitable form.
[0133] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. An expansion and contraction compensation method characterized by, The application is applied to a laser marking machine, the laser marking machine comprises a laser, a workbench and an image collector; a target workpiece on the workbench comprises a plurality of feature points processed according to a theoretical drawing, the image collector is used for collecting images of each feature point respectively, the plurality of feature points divide the target workpiece into a plurality of feature regions, and the method comprises: The images are binarized to obtain a binarized image corresponding to each feature point; According to a preset extraction algorithm, actual coordinate information of each feature point in a coordinate system corresponding to the workbench is determined in the binarized image; According to conversion between the actual coordinate information of the feature points included in each feature region respectively and corresponding theoretical coordinate information in the theoretical drawing, an affine transformation matrix corresponding to each feature region is determined respectively; According to the affine transformation matrix corresponding to each feature region respectively, a to-be-radiation object corresponding to each feature region is corrected to determine cutting information of the to-be-radiation object corresponding to each feature region, so that the laser cuts according to the cutting information.
2. The expansion and contraction compensation method according to claim 1, characterized by, The binarization of the images to obtain the binarized image corresponding to each feature point comprises: The pixel value of a pixel point with a pixel value less than or equal to a preset value in each image is updated to a first threshold value; wherein the preset value is related to the color of the feature point, and the first threshold value is a pixel value corresponding to a first color; The pixel value of a pixel point with a pixel value greater than the preset value in each image is updated to a second threshold value; the first threshold value is a pixel value corresponding to a second color, and the first color is different from the second color; According to the updated pixel value of the pixel point in each image, the binarized image corresponding to each image is determined.
3. The expansion and contraction compensation method according to claim 1, characterized by, The feature point is a circular pattern, and the actual coordinate information of each feature point in the coordinate system corresponding to the workbench is determined in the binarized image according to the preset extraction algorithm, comprising: According to the preset extraction algorithm, an outline point set of each circular pattern is extracted in the binarized image; According to the outline point set, the centroid coordinate information and the radius information of each circular pattern are determined; According to the centroid coordinate information and the radius information, a minimum circumscribed circle corresponding to each circular pattern is determined; According to the center of the minimum circumscribed circle, the actual coordinate information corresponding to each feature point is determined.
4. The expansion and contraction compensation method according to claim 1, characterized by, The to-be-radiation object corresponding to each feature region is corrected according to the affine transformation matrix corresponding to each feature region to determine the cutting information of the to-be-radiation object corresponding to each feature region, comprising: The position information and the size information of the to-be-radiation object corresponding to each feature region are determined; According to the affine transformation matrix corresponding to each feature region, the position information and the size information of the to-be-radiation object corresponding to each feature region are corrected to determine the final position information and the size information of the to-be-radiation object corresponding to each feature region.
5. The expansion and contraction compensation method according to claim 1, wherein, The method comprises the following steps: According to the absolute value of the parameters in the affine transformation matrix corresponding to each feature area, the inflation and shrinkage coefficients corresponding to each feature area are determined. According to the inflation and shrinkage coefficients corresponding to each feature area, the size information of the laser marking object corresponding to each feature area is corrected to determine the final size information of the laser marking object corresponding to each feature area.
6. The expansion and contraction compensation method according to claim 5, wherein, The method further comprises the following steps: The theoretical coordinate information of the laser marking object corresponding to each feature area in the processing drawing is determined. According to the parameters in the affine transformation matrix corresponding to each feature area, the theoretical coordinate information of the laser marking object corresponding to each feature area is corrected to determine the final position information of the laser marking object corresponding to each feature area.
7. A laser marking machine characterized by, The method comprises the following steps: The target workpiece on the workbench comprises a plurality of feature points processed according to a theoretical drawing; An image collector is configured to collect images of each feature point respectively; The plurality of feature points divide the target workpiece into a plurality of feature areas; A controller is configured to perform binaryzation processing on the images to obtain a binaryzation image corresponding to each feature point; The controller is configured to determine actual coordinate information of each feature point in a coordinate system corresponding to the workbench in the binaryzation image according to a preset extraction algorithm; The controller is configured to determine an affine transformation matrix corresponding to each feature area according to a conversion between the actual coordinate information of the feature points included in each feature area and the theoretical coordinate information of the feature points in the theoretical drawing; The controller is configured to correct the laser marking object corresponding to each feature area according to the affine transformation matrix corresponding to each feature area to determine cutting information of the laser marking object corresponding to each feature area, so that the laser cutter cuts according to the cutting information.
8. An expansion compensation device, characterized by The application is applied to a laser marking machine, which comprises a laser cutter, a workbench and an image collector. The target workpiece on the workbench comprises a plurality of feature points processed according to a theoretical drawing, the image collector is configured to collect images of each feature point respectively, the plurality of feature points divide the target workpiece into a plurality of feature areas, and the device comprises: An image processing module is configured to perform binaryzation processing on the images to obtain a binaryzation image corresponding to each feature point; An information determination module is configured to determine actual coordinate information of each feature point in a coordinate system corresponding to the workbench in the binaryzation image according to a preset extraction algorithm; A matrix determining module is configured to determine parameters in an affine transformation matrix corresponding to each feature region according to a conversion between the actual coordinate information of the feature points included in each feature region and the corresponding theoretical coordinate information in the theoretical drawing file; An executing module is configured to correct the to-be-laser-processed object corresponding to each feature region according to the affine transformation matrix corresponding to each feature region, determine cutting information of the to-be-laser-processed object corresponding to each feature region, and enable the laser to cut according to the cutting information.
9. A laser marking machine characterized by, Comprise: One or more processors; Memory; One or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the expansion and contraction compensation method according to any one of claims 1-6.
10. A computer readable storage medium, characterized in that, The computer readable storage medium stores program code, and the program code can be called and executed by the processor to execute the expansion and contraction compensation method according to any one of claims 1-6.
Citation Information
Patent Citations
Vision-based laser cutting method and device, electronic equipment and storage medium
CN113146073A
Laser cutting compensation method, device and equipment and storage medium
CN116060783A