Laser marking method, device, terminal equipment and storage medium
By acquiring and stitching together multiple area images of the products to be processed, the laser marking machine can generate a complete marking path, solving the problem of poor marking effect caused by the limited scanning range of the CCD camera, and realizing efficient and accurate laser marking.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-07
- Publication Date
- 2026-03-24
AI Technical Summary
Existing laser marking machines suffer from limitations in the scanning range of CCD cameras. When the size of the product to be processed exceeds the scanning range, the marking becomes more difficult, the manual adjustment costs are high, the efficiency is low, and the marking is prone to overlapping and misalignment.
The image acquisition module acquires multiple non-overlapping images of the product to be processed. The vision processing module stitches these regional images into a whole image. Based on the whole image and the preset marking pattern, the marking path is determined to achieve uninterrupted laser marking.
It enables uninterrupted laser marking operations, avoids overlapping and misalignment of marks, improves marking efficiency, reduces labor costs, and ensures the appearance of the product.
Smart Images

Figure CN117245225B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of laser processing technology, and in particular to a laser marking method, apparatus, terminal equipment, and storage medium. Background Technology
[0002] Laser marking machines use laser beams to illuminate the surface of workpieces, marking the desired text and graphics onto the workpiece surface. As market demands diversify, laser marking technology continues to innovate and develop.
[0003] Existing laser marking machines are limited by the scanning range of CCD (Charge Coupled Device) cameras. When the size of the product to be processed exceeds the scanning range of the CCD camera, the marking difficulty of the laser marking machine increases. It is necessary to manually adjust the field of view of the CCD camera to the marking position during the marking process before marking. This not only increases labor costs and leads to low marking efficiency, but also causes problems such as overlapping and misaligned marks due to multiple marking stops.
[0004] In summary, how to solve the problem of poor marking effect of laser marking machine due to the size of the product to be processed exceeding the scanning range of the CCD camera has become an urgent technical problem to be solved in this field. Summary of the Invention
[0005] The main purpose of this application is to provide a laser marking method, apparatus, terminal equipment, and storage medium, which aims to solve the problem of poor laser marking effect caused by the size of the product to be processed exceeding the scanning range of the CCD camera.
[0006] To achieve the above objectives, this application provides a laser marking method applied to a laser marking machine, the laser marking machine comprising: an image acquisition module, a vision processing module, and a movable worktable, the movable worktable being used to fix and move the product to be processed;
[0007] The laser marking method includes:
[0008] The image acquisition module acquires multiple area images of the product to be processed, wherein the multiple area images have no overlapping parts;
[0009] The visual processing module stitches together multiple images of the region into a single image.
[0010] The marking path is determined based on the overall image and the preset marking pattern, and the product to be processed is laser-marked according to the marking path.
[0011] Optionally, the step of acquiring multiple area images of the product to be processed through the image acquisition module includes:
[0012] When the image acquisition module detects that it has acquired an area image of the product to be processed, it determines whether the edge portion of the area image is the image of the product to be processed.
[0013] If the edge portion is the image of the product to be processed, then the image acquisition module is moved a preset distance toward the edge portion to acquire a new area image; or, the moving worktable is controlled to move the product to be processed a preset distance in the opposite direction of the edge portion to acquire a new area image.
[0014] Based on the new region image, the steps of determining whether the edge portion of the region image is the product image to be processed and subsequent steps are performed to acquire the region image until the newly generated edge portion of the region image is no longer the product image to be processed, at which point the acquisition of the region image ends.
[0015] Optionally, after the step of determining whether the edge portion of the region image is an image of the product to be processed, the method further includes:
[0016] If none of the edge portions are images of the product to be processed, then the region image is taken as the whole image.
[0017] Optionally, the laser marking machine also includes a display interface;
[0018] The step of stitching multiple region images into a whole image using the visual processing module includes:
[0019] The visual processing module displays multiple images of the region on the display interface, and determines the stitching direction of the multiple images of the region according to the moving direction of the image acquisition module or the moving workbench.
[0020] Multiple images of the aforementioned regions are stitched together into a single image according to the stitching direction.
[0021] Optionally, the laser marking machine further includes a laser and a galvanometer. The step of determining the marking path based on the overall image and a preset marking pattern, and performing laser marking on the product to be processed according to the marking path, includes:
[0022] The preset marking pattern is projected onto the overall image to obtain the predicted marking effect image;
[0023] A marking path is generated based on the predicted marking effect diagram, and the galvanometer is rotated according to the marking path so that the laser emitted by the laser is refracted by the galvanometer and then shines on the product to be processed to perform laser marking on the product.
[0024] Optionally, the step of projecting a preset marking pattern onto the overall image to obtain a predicted marking effect image includes:
[0025] Obtain the ratio between the overall image and the product to be processed;
[0026] The preset marking pattern is adjusted according to the ratio value and the deflection angle of the overall image to obtain a simulated marking pattern that matches the overall image.
[0027] The simulated marking pattern is projected onto the overall image to obtain the predicted marking effect image.
[0028] Optionally, the method further includes:
[0029] When laser marking is performed on the product to be processed, the marking image of the current marking area of the product to be processed is simultaneously acquired by the image acquisition module, and the marking image is used to replace the area image in the overall image corresponding to the marking image to obtain the target area image;
[0030] The target area image and the predicted marking effect image are compared to determine the marking accuracy of the laser marking machine.
[0031] In addition, to achieve the above objectives, this application also provides a laser marking device, which is deployed on a laser marking machine. The laser marking machine includes: an image acquisition module, a vision processing module, and a movable worktable. The movable worktable is used to fix and move the product to be processed.
[0032] The laser marking device includes:
[0033] A regional image acquisition module is used to acquire multiple regional images of the product to be processed, wherein the multiple regional images have no overlapping parts;
[0034] The stitching module is used to stitch multiple images of the region into a whole image through the visual processing module;
[0035] The laser marking module is used to determine the marking path based on the overall image and the preset marking pattern, and to perform laser marking on the product to be processed according to the marking path.
[0036] In addition, to achieve the above objectives, this application also provides a terminal device, which includes: a memory, a processor, and a laser marking program stored in the memory and executable on the processor. When the laser marking program is executed by the processor, it implements the steps of the laser marking method described above.
[0037] In addition, to achieve the above objectives, this application also proposes a computer-readable storage medium storing a laser marking program, which, when executed by a processor, implements the steps of the laser marking method described above.
[0038] This application discloses a laser marking method, apparatus, terminal device, and storage medium. The laser marking method is applied to a laser marking machine, which includes an image acquisition module, a vision processing module, and a movable worktable. The movable worktable is used to fix and move the product to be processed. The laser marking method includes: acquiring multiple area images of the product to be processed through the image acquisition module, wherein the multiple area images have no overlapping portions; stitching the multiple area images into a whole image through the vision processing module; determining a marking path based on the whole image and a preset marking pattern; and performing laser marking on the product to be processed according to the marking path.
[0039] Compared to traditional laser marking methods, this application applies to a laser marking machine that includes an image acquisition module, a vision processing module, and a mobile worktable for fixing and moving the product to be processed. The image acquisition module acquires multiple area images of the product to be processed without overlapping parts. Then, the vision processing module stitches the multiple area images into a complete image containing the complete image of the product to be processed. Finally, based on the stitched complete image and the preset marking pattern, the marking path of the product to be processed is determined, and laser marking is performed on the product to be processed according to the marking path.
[0040] Thus, this application acquires images of multiple areas of the product to be processed separately, synthesizes an overall image containing a complete image of the product to be processed, and then performs laser marking. This allows the laser marking machine to generate a complete marking path at once based on the overall image, achieving a non-stop marking operation. This avoids the problems of overlapping or misaligned marks caused by multiple pauses to adjust the image acquisition field of view, ensuring the appearance of the product. This solves the problem of poor marking effect caused by the size of the product to be processed exceeding the scanning range of the CCD camera. Attached Figure Description
[0041] Figure 1 This is a schematic diagram of the hardware operating environment of the terminal device involved in the embodiments of this application;
[0042] Figure 2 This is a flowchart illustrating the first embodiment of the laser marking method of this application;
[0043] Figure 3 This is a schematic diagram of the marking process involved in one embodiment of the laser marking method of this application;
[0044] Figure 4This is a schematic diagram of the process involved in one embodiment of the laser marking method of this application;
[0045] Figure 5 This is a schematic diagram of the functional modules of an embodiment of the laser marking machine of this application.
[0046] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0047] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.
[0048] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0049] It should be noted that all directional indicators (such as up, down, left, right, front, back, etc.) in the embodiments of this application are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicator will also change accordingly.
[0050] In this application, unless otherwise expressly specified and limited, the terms "connection," "fixed," etc., should be interpreted broadly. For example, "fixed" can mean a fixed connection, a detachable connection, or an integral part; it can mean a mechanical connection or an electrical connection; it can mean a direct connection or an indirect connection through an intermediate medium; it can mean the internal communication of two components or the interaction between two components, unless otherwise expressly limited. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.
[0051] Furthermore, the use of terms such as "first" and "second" in this application is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of the various embodiments can be combined with each other, but only on the basis of being achievable by those skilled in the art. If the combination of technical solutions is contradictory or impossible to implement, such a combination of technical solutions should be considered non-existent and not within the scope of protection claimed in this application.
[0052] This application provides a terminal device.
[0053] like Figure 1 As shown, Figure 1 This is a schematic diagram of the hardware operating environment of the terminal device involved in the embodiments of this application.
[0054] In this embodiment, the terminal device can be a laser marking machine.
[0055] like Figure 1 As shown, in the hardware operating environment of the terminal device, the terminal device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. The communication bus 1002 is used to implement communication between these components. The user interface 1003 may include a display screen and an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or stable non-volatile memory, such as a disk storage device. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0056] Those skilled in the art will understand that Figure 1 The terminal device structure shown does not constitute a limitation on the device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0057] like Figure 1 As shown, the memory 1005, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a laser marking program.
[0058] exist Figure 1 In the device shown, network interface 1004 is mainly used to connect to the backend server and communicate data with it; user interface 1003 is mainly used to connect to the client (user end) and communicate data with it; the laser marking machine includes: an image acquisition module, a vision processing module, and a moving worktable, the moving worktable being used to fix and move the product to be processed; and processor 1001 can be used to call the laser marking program stored in memory 1005 and perform the following operations:
[0059] The image acquisition module acquires multiple area images of the product to be processed, wherein the multiple area images have no overlapping parts;
[0060] The visual processing module stitches together multiple images of the region into a single image.
[0061] The marking path is determined based on the overall image and the preset marking pattern, and the product to be processed is laser-marked according to the marking path.
[0062] Optionally, the processor 1001 can also be used to call a laser marking program stored in the memory 1005 and perform the following operations:
[0063] When the image acquisition module detects that it has acquired an area image of the product to be processed, it determines whether the edge portion of the area image is the image of the product to be processed.
[0064] If the edge portion is the image of the product to be processed, then the image acquisition module is moved a preset distance toward the edge portion to acquire a new area image; or, the moving worktable is controlled to move the product to be processed a preset distance in the opposite direction of the edge portion to acquire a new area image.
[0065] Based on the new region image, the steps of determining whether the edge portion of the region image is the product image to be processed and subsequent steps are performed to acquire the region image until the newly generated edge portion of the region image is no longer the product image to be processed, at which point the acquisition of the region image ends.
[0066] Optionally, the processor 1001 can also be used to call a laser marking program stored in the memory 1005, and after performing the step of determining whether the edge portion of the area image is an image of the product to be processed, it further performs the following operations:
[0067] If none of the edge portions are images of the product to be processed, then the region image is taken as the whole image.
[0068] Optionally, the laser marking machine also includes a display interface; the processor 1001 can also be used to call the laser marking program stored in the memory 1005 and perform the following operations:
[0069] The visual processing module displays multiple images of the region on the display interface, and determines the stitching direction of the multiple images of the region according to the moving direction of the image acquisition module or the moving workbench.
[0070] Multiple images of the aforementioned regions are stitched together into a single image according to the stitching direction.
[0071] Optionally, the laser marking machine also includes a laser and a galvanometer. The processor 1001 can also be used to call the laser marking program stored in the memory 1005 and perform the following operations:
[0072] The preset marking pattern is projected onto the overall image to obtain the predicted marking effect image;
[0073] A marking path is generated based on the predicted marking effect diagram, and the galvanometer is rotated according to the marking path so that the laser emitted by the laser is refracted by the galvanometer and then shines on the product to be processed to perform laser marking on the product.
[0074] Optionally, the processor 1001 can also be used to call a laser marking program stored in the memory 1005 and perform the following operations:
[0075] Obtain the ratio between the overall image and the product to be processed;
[0076] The preset marking pattern is adjusted according to the ratio value and the deflection angle of the overall image to obtain a simulated marking pattern that matches the overall image.
[0077] The simulated marking pattern is projected onto the overall image to obtain the predicted marking effect image.
[0078] The processor 1001 can also be used to call the laser marking program stored in the memory 1005 and perform the following operations:
[0079] When laser marking is performed on the product to be processed, the marking image of the current marking area of the product to be processed is simultaneously acquired by the image acquisition module, and the marking image is used to replace the area image in the overall image corresponding to the marking image to obtain the target area image;
[0080] The target area image and the predicted marking effect image are compared to determine the marking accuracy of the laser marking machine.
[0081] Based on the above hardware structure, the overall concept of various embodiments of the laser marking method of this application is proposed.
[0082] In this embodiment of the application, the laser marking machine generates a laser beam to irradiate the surface of the workpiece, thereby marking the required text and graphics on the surface of the workpiece. As market demands diversify, laser marking technology is also constantly innovating and developing.
[0083] Existing laser marking machines are limited by the scanning range of CCD cameras. When the size of the product to be processed exceeds the scanning range of the CCD camera, the marking difficulty of the laser marking machine increases. It is necessary to manually adjust the field of view of the CCD camera to the marking position during the marking process before marking. This not only increases labor costs but also leads to low marking efficiency. In addition, multiple marking stops can cause problems such as overlapping and misaligned marks at the stopping positions.
[0084] In summary, how to solve the problem of poor marking effect of laser marking machine due to the size of the product to be processed exceeding the scanning range of the CCD camera has become an urgent technical problem to be solved in this field.
[0085] To address the aforementioned problems, this application proposes a laser marking method applied to a laser marking machine. The laser marking machine includes an image acquisition module, a vision processing module, and a movable worktable. The movable worktable is used to fix and move the product to be processed. The laser marking method includes: acquiring multiple area images of the product to be processed through the image acquisition module, wherein the multiple area images have no overlapping parts; stitching the multiple area images into a whole image through the vision processing module; determining a marking path based on the whole image and a preset marking pattern; and performing laser marking on the product to be processed according to the marking path.
[0086] Compared to traditional laser marking methods, this application embodiment is applied to a laser marking machine that includes an image acquisition module, a vision processing module, and a mobile worktable for fixing and moving the product to be processed. The image acquisition module acquires multiple area images of the product to be processed without overlapping parts. Then, the vision processing module stitches the multiple area images into a complete image containing the complete image of the product to be processed. Finally, based on the stitched complete image and the preset marking pattern, the marking path of the product to be processed is determined, and laser marking is performed on the product to be processed according to the marking path.
[0087] Thus, this embodiment of the application acquires images of multiple areas of the product to be processed separately, synthesizes an overall image containing a complete image of the product to be processed, and then performs laser marking. This allows the laser marking machine to generate a complete marking path at once based on the overall image, achieving a non-stop marking operation. This avoids the problems of overlapping or misaligned marks caused by multiple pauses to adjust the image acquisition field of view, ensuring the appearance of the product. This solves the problem of poor marking effect caused by the size of the product to be processed exceeding the scanning range of the CCD camera.
[0088] Based on the overall concept of the laser marking method of this application described above, various embodiments of the laser marking method of this application are proposed.
[0089] Please refer to Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the laser marking method of this application. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.
[0090] In this embodiment, for ease of understanding and explanation, a laser marking machine is used as the direct execution subject to describe the laser marking method of this application.
[0091] In this embodiment, the laser marking method of this application is applied to a laser marking machine, which includes an image acquisition module, a vision processing module, and a movable worktable. The movable worktable is used to fix and move the product to be processed.
[0092] Step S10: Acquire multiple area images of the product to be processed through the image acquisition module, wherein the multiple area images have no overlapping parts;
[0093] In this embodiment, the laser marking machine includes an image acquisition module, a vision processing module, and a mobile worktable for fixing and moving the product to be processed. The laser marking machine acquires multiple area images of the product to be processed on the mobile worktable through the image acquisition module. Each of the multiple area images contains an image of a part of the product to be processed, and the contents of the multiple area images do not overlap.
[0094] It should be noted that, in this embodiment, the image acquisition module includes a high-precision CCD camera. The high-precision CCD camera can locate the current position of the product to be processed and acquire images and position information of the product to be processed in real time. The acquired content is then transmitted to the vision processing module. In this embodiment, image acquisition using a high-precision CCD camera can automatically identify the product regardless of its position, angle, or shape, greatly improving marking efficiency and effectively reducing human error.
[0095] Step S20: The visual processing module stitches together multiple images of the region into a single image;
[0096] In this embodiment, the laser marking machine stitches together multiple regional images into a single overall image using a vision processing module. This overall image includes a complete image of the product to be processed and an image of part of the moving worktable. In addition, after stitching together the overall image, the laser marking machine can also perform image segmentation processing on the overall image to obtain a clean image of the product to be processed, thereby improving the image observation experience for the staff.
[0097] Furthermore, in one feasible embodiment, due to the influence of the shooting environment and matching errors, the overlapping parts of the stitched images may have differences such as changes in lighting and color difference. Due to these influences, even two images that are matched very accurately will have seams at the overlapping area after stitching. In this embodiment, a variable weighted function method is used for fusion. Considering the irregularity of the overlapping area of the images, the weighted average weight function takes different forms depending on the position. This can take into account every detail of the image and finally obtain a distortion-free and seamless overall image.
[0098] Step S30: Determine the marking path based on the overall image and the preset marking pattern, and perform laser marking on the product to be processed according to the marking path.
[0099] In this embodiment, the laser marking machine has pre-stored marking patterns and related data. The related data specifically includes the marking position, size, and matching product model of the marking pattern. The laser marking machine determines the marking path based on the overall image and marking pattern obtained by splicing, and performs laser marking on the product to be processed according to the marking path.
[0100] In this embodiment, the present application is applied to a laser marking machine, which includes an image acquisition module, a vision processing module, and a movable worktable. The movable worktable is used to fix and move the product to be processed. The laser marking method includes: acquiring multiple area images of the product to be processed through the image acquisition module, wherein the multiple area images have no overlapping parts; stitching the multiple area images into a whole image through the vision processing module; determining a marking path based on the whole image and a preset marking pattern; and performing laser marking on the product to be processed according to the marking path.
[0101] Specifically, compared to traditional laser marking methods, the laser marking machine in this application includes an image acquisition module, a vision processing module, and a mobile worktable for fixing and moving the product to be processed. The laser marking machine acquires multiple area images of the product to be processed on the mobile worktable through the image acquisition module. Each of the multiple area images contains a portion of the product to be processed, and the content of the multiple area images has no overlap. Then, the laser marking machine stitches the acquired multiple area images into a whole image through the vision processing module. This whole image contains a complete image of the product to be processed and a portion of the mobile worktable. In addition, after stitching the whole image, the laser marking machine can also perform image segmentation processing on the whole image to obtain a clean image of the product to be processed, so as to improve the image observation experience for the operator. Finally, the laser marking machine itself has pre-stored the marking pattern and its related data, including the marking position, size, and matching model of the product to be processed. The laser marking machine determines the marking path based on the stitched whole image and the marking pattern, and performs laser marking on the product to be processed according to the marking path.
[0102] Thus, this embodiment of the application acquires images of multiple areas of the product to be processed separately, synthesizes an overall image containing a complete image of the product to be processed, and then performs laser marking. This allows the laser marking machine to generate a complete marking path at once based on the overall image, achieving a non-stop marking operation. This avoids the problems of overlapping or misaligned marks caused by multiple pauses to adjust the image acquisition field of view, ensuring the appearance of the product. This solves the problem of poor marking effect caused by the size of the product to be processed exceeding the scanning range of the CCD camera. It also reduces labor costs and improves marking efficiency.
[0103] Furthermore, based on the first embodiment of the laser marking method of this application described above, a second embodiment of the laser marking method of this application is proposed.
[0104] In this embodiment, step S10 above: acquiring multiple area images of the product to be processed through the image acquisition module, including:
[0105] Step S101: When the image acquisition module detects that it has acquired an area image of the product to be processed, it determines whether the edge part of the area image is the image of the product to be processed.
[0106] In this embodiment, the mobile workbench is connected to the mobile production line. The worker places the products to be processed on the mobile production line at certain intervals, without restricting the placement angle of the products. When the products to be processed move to the preset acquisition position on the mobile workbench, the mobile production line and the mobile workbench pause their movement for a certain period of time. The image acquisition module identifies and acquires the area image of the product to be processed. At this time, the vision processing module is activated to identify whether the four edges of the area image are the image of the product to be processed.
[0107] It should be noted that, in this embodiment, the preferred field of view of the image acquisition module is a rectangular view. The shape of the product to be processed is not limited. When the product to be processed is in the acquisition position, if the product to be processed is completely within the field of view of the image acquisition module, the visual processing module will identify the edge part of the image in that area as the moving worktable. If part of the product to be processed is outside the field of view, the visual processing module will still identify the edge part of the image in that area as the image of the product to be processed.
[0108] Step S102: If the edge portion is the image of the product to be processed, then the image acquisition module is moved a preset distance toward the edge portion to acquire a new area image, or the moving worktable is controlled to move the product to be processed a preset distance in the opposite direction of the edge portion to acquire a new area image.
[0109] In this embodiment, if the laser marking machine determines that part or all of the edge lines of the area image are the product image to be processed, then the image acquisition module moves a preset distance in the direction of the edge and acquires a new area image. Alternatively, the machine controls the moving worktable to move the product to be processed in the opposite direction of the edge and acquires a new area image. After moving the preset distance, the new area image acquired by the image acquisition module has no overlap with the previous area image, and the edge of the previous image is used as the edge image on the opposite side of the new area image.
[0110] Step S103: Based on the new region image, perform the steps of determining whether the edge portion of the region image is the product image to be processed and the subsequent steps to acquire the region image until the newly generated edge portion of the region image is no longer the product image to be processed, then end the acquisition of the region image.
[0111] In this embodiment, after the laser marking machine acquires a new area image, it continues to determine whether the edge part of the new area image is the image of the product to be processed. If the edge part is still the image of the product to be processed, it continues to move the image acquisition module or the worktable to acquire a new area image until the newly generated edge part of the acquired area image is no longer the image of the product to be processed, then the acquisition of the area image of the current product to be processed ends.
[0112] It should be noted that in this embodiment, only the first acquired area image needs to identify whether the upper, lower, left, and right edges are images of the product to be processed. In subsequent acquired area images, at least one edge is the same boundary line as one edge of the previously acquired area image. Therefore, the repeated boundary lines do not need to be judged.
[0113] The laser marking machine automatically acquires images of the areas of the product to be processed. It can either move the image acquisition device to scan the image of the product through a movable bracket, or use the vision processing module to connect the moving worktable's movement path controller to move each area of the product to be processed sequentially into the scanning range of the image acquisition device. This improves the flexibility of laser marking. Users can choose to control the movement of the image acquisition device or the moving worktable based on the attributes of the product to be processed, without the need for manual adjustment, making laser marking operation simpler.
[0114] Furthermore, in a feasible embodiment, after step S101 above, the laser marking method of this application may further include:
[0115] Step S104: If none of the edge portions are images of the product to be processed, then the region image is taken as the whole image.
[0116] In this embodiment, as Figure 3 As shown, when the product to be processed flows to the acquisition position on the mobile worktable, the image acquisition module identifies and acquires the regional image of the product to be processed. When the vision processing module identifies that the four edges of the regional image are not part of the product image, it determines that the planar area of the product to be processed does not exceed the acquisition field of view of the image acquisition module. Then, the laser marking machine directly uses the regional image as the whole image, determines the marking path of the product based on the image and the marking pattern, and performs the marking operation on the product according to the determined marking path.
[0117] Furthermore, in one feasible embodiment, the laser marking machine also includes a display interface. Step S20 above: stitching multiple region images into a single image using the vision processing module includes:
[0118] Step S201: The vision processing module displays multiple images of the region on the display interface, and determines the stitching direction of the multiple images of the region according to the moving direction of the image acquisition module or the moving workbench.
[0119] Step S202: Stitch multiple images of the region into a whole image according to the stitching direction.
[0120] In this embodiment, the laser marking machine is also equipped with a display interface. The vision processing module sequentially displays multiple regional images on the display interface, and determines the splicing direction of each of the multiple regional images according to the moving direction of the image acquisition module or the moving worktable.
[0121] For example, taking the movement of the image acquisition module as an example, when the image acquisition module acquires the first area image of the product to be processed and determines that the left edge of the area image is the product image, the image acquisition device is controlled to move to the left a certain distance so that the original left edge becomes the right edge of the second area image. Thus, the laser marking machine stitches the second area image to the left of the first area image. Similarly, if it is determined that the lower edge of the second area image is still the product image, the image acquisition device is controlled to move downwards a certain distance so that the lower edge of the second area image becomes the upper edge of the third area image. Thus, the laser marking machine stitches the third area image to the lower side of the second area image. This process continues until the newly generated edge position of the latest area image is no longer the product image. The laser marking machine then stitches the first to the latest area images into a single overall image.
[0122] Therefore, users can observe the acquired images in real time through the display interface, and the laser marking machine automatically stitches the area images without human operation, reducing human error, and is more efficient and has a better image stitching effect, which helps to improve the accuracy of laser marking.
[0123] Furthermore, in a feasible embodiment, the laser marking machine further includes a laser and a galvanometer. Step S30 above, which involves determining a marking path based on the overall image and a preset marking pattern, and performing laser marking on the product to be processed according to the marking path, includes:
[0124] Step S301: Project the preset marking pattern onto the overall image to obtain the predicted marking effect image;
[0125] In this embodiment, the laser marking machine obtains an overall image containing the image of the product to be processed and displays it on the display interface. Then, the marking graphic is adaptively adjusted and projected onto the overall image to obtain a predicted marking effect image of the product to be processed.
[0126] Furthermore, in one feasible embodiment, step S301 above includes:
[0127] Step S3011: Obtain the ratio between the overall image and the product to be processed;
[0128] In this embodiment, the laser marking machine acquires the ratio between the overall image and the product to be processed. Specifically, since the image acquisition module only moves in the xy-axis plane, the ratio between the pixel coordinates of the acquired image and the actual coordinates of the product to be processed on the moving worktable is fixed. After the terminal device obtains the overall image of the large-sized product to be processed through the vision processing module, it determines the ratio between the actual coordinates of the remaining products based on the pixel coordinates of the complete image of the product to be processed in the overall image.
[0129] Step S3012: Adjust the preset marking pattern according to the ratio value and the deflection angle of the overall image to obtain a simulated marking pattern that matches the overall image;
[0130] In this embodiment, the laser marking machine adjusts the marking pattern according to the ratio and the deflection angle of the overall image, so that the position, size and angle of the marking pattern match the overall image, and the adjusted marking pattern is used as the simulated marking pattern.
[0131] Step S3013: Project the simulated marking graphic onto the overall image to obtain the predicted marking effect image.
[0132] In this embodiment, the laser marking machine projects the adjusted simulated marking pattern onto the overall image of the display interface to obtain a predicted marking effect image of the product to be processed. Thus, by adjusting the marking pattern and projecting it onto the overall image, a predicted marking effect image of the product to be processed is obtained, allowing the user to adjust the marking parameters based on the predicted image, making the product's appearance more aesthetically pleasing.
[0133] Step S302: Generate a marking path based on the predicted marking effect diagram, and control the rotation of the galvanometer according to the marking path so that the laser emitted by the laser is refracted by the galvanometer and shines on the product to be processed to perform laser marking on the product.
[0134] In this embodiment, the laser marking machine determines the marking path based on the predicted marking effect diagram. The marking path guides the rotation angle of the galvanometer, so that the laser emitted by the laser is refracted by the galvanometer and marks a mark on the product to be processed that is consistent with the marking pattern.
[0135] It should be noted that, in this embodiment, the galvanometer includes an X-axis scanning galvanometer and a Y-axis scanning galvanometer. The laser output from the laser passes through the X-axis scanning galvanometer, the Y-axis scanning galvanometer, and the flat field focusing lens in sequence and converges onto the surface of the product to be processed on the moving worktable. By controlling the rotation of the X-axis and Y-axis scanning galvanometers, the laser beam can be controlled to move arbitrarily in the X-axis and Y-axis directions on the product surface, thereby marking a mark consistent with the marking pattern.
[0136] Therefore, in this embodiment, when the laser marking machine performs marking operations on the product to be processed that is outside the field of view of the CCD camera, it generates a predicted marking effect by acquiring multiple regional images of the product to be processed in different areas, stitching them together to obtain an overall image containing a complete image of the product to be processed, and then determining the marking path based on the predicted marking effect image to perform laser marking, thus meeting the requirements of high precision, high efficiency and low cost of laser marking.
[0137] Furthermore, in one feasible embodiment, such as Figure 4 As shown, the laser marking method of this application may further include:
[0138] Step A10: When laser marking the product to be processed, the marking image of the current marking area of the product to be processed is acquired synchronously through the image acquisition module, and the marking image is used to replace the area image in the overall image corresponding to the marking image to obtain the target area image;
[0139] Step A20: Compare the target area image and the predicted marking effect image to determine the marking accuracy of the laser marking machine.
[0140] In this embodiment, when the laser marking machine is laser marking the product to be processed, it simultaneously acquires the marking image of the area being marked on the product through the image acquisition module. The range of the marking image corresponds one-to-one with the previously acquired area images. After acquiring the marking image, the laser marking machine needs to update the overall image on the display interface. Specifically, it replaces the corresponding area image in each area image with the marking image to obtain the replaced target area image. After the laser marking machine completes the marking operation of each area, it immediately compares the target area image with the predicted marking effect image. Alternatively, the laser marking machine can also compare the updated overall image with the predicted marking effect image after completing all marking operations on the current product, thereby determining the marking accuracy of the laser marking machine. The operator can set a minimum accuracy threshold for the marking operation according to the actual usage scenario. When the laser marking machine detects that the marking accuracy of the current product is lower than the minimum accuracy threshold, it outputs corresponding prompt information.
[0141] Therefore, by optimizing the laser marking process, it is easier for staff to monitor the entire laser marking process, thus ensuring the quality of the products leaving the factory.
[0142] Thus, in this embodiment, by separately acquiring images of multiple areas of the product to be processed, synthesizing a complete image containing the complete image of the product to be processed, and then performing laser marking, the laser marking machine can generate a complete marking path at once to achieve non-overlapping marking. At the same time, it avoids the problem of splicing marks caused by multiple splicing markings, ensuring the appearance of the product. It can also generate a predicted marking effect image before laser marking, which makes it convenient for staff to adjust the marking graphic parameters in real time. After marking is completed, the marking accuracy is checked to ensure the quality of the product leaving the factory. It solves the problem of poor marking effect caused by the product size exceeding the scanning range of the CCD acquisition device, and also reduces labor costs and improves marking efficiency.
[0143] Furthermore, this application also proposes a laser marking device, which is deployed on a laser marking machine. The laser marking machine includes an image acquisition module, a vision processing module, and a movable worktable. The movable worktable is used to fix and move the product to be processed.
[0144] Please refer to Figure 5 The laser marking apparatus of this application includes:
[0145] The area image acquisition module 10 is used to acquire multiple area images of the product to be processed through the image acquisition module, wherein the multiple area images have no overlapping parts;
[0146] The stitching module 20 is used to stitch multiple images of the region into a whole image through the visual processing module;
[0147] The laser marking module 30 is used to determine the marking path based on the overall image and the preset marking pattern, and to perform laser marking on the product to be processed according to the marking path.
[0148] The functions of each module in the laser marking machine correspond to the steps in the above-mentioned laser marking method embodiment, and their functions and implementation processes will not be described in detail here.
[0149] In addition, this application also proposes a storage medium storing a laser marking program, which, when executed by a processor, implements the steps of the laser marking method of this application as described above.
[0150] The specific embodiments of the storage medium in this application are basically the same as the embodiments of the laser marking method described above, and will not be repeated here.
[0151] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0152] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0153] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0154] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A laser marking method, characterized in that, This invention is applied to a laser marking machine, which includes an image acquisition module, a vision processing module, and a movable worktable. The movable worktable is used to fix and move the product to be processed. The laser marking method includes: The image acquisition module acquires multiple area images of the product to be processed, wherein the multiple area images have no overlapping parts; The visual processing module stitches together multiple images of the region into a single image. The marking path is determined based on the overall image and the preset marking pattern, and the product to be processed is laser-marked according to the marking path; The step of acquiring multiple area images of the product to be processed through the image acquisition module includes: When the image acquisition module detects that it has acquired an area image of the product to be processed, it determines whether the edge portion of the area image is the image of the product to be processed. If none of the edge portions are images of the product to be processed, then the region image is taken as the whole image; If the edge portion is the image of the product to be processed, then the image acquisition module is moved a preset distance toward the edge portion to acquire a new area image; or, the moving worktable is controlled to move the product to be processed a preset distance in the opposite direction of the edge portion to acquire a new area image. Based on the new region image, the steps of determining whether the edge portion of the region image is the product image to be processed and subsequent steps are performed to acquire the region image until the newly generated edge portion of the region image is no longer the product image to be processed, at which point the acquisition of the region image ends.
2. The laser marking method as described in claim 1, characterized in that, The laser marking machine also includes a display interface; The step of stitching multiple region images into a whole image using the visual processing module includes: The visual processing module displays multiple images of the region on the display interface, and determines the stitching direction of the multiple images of the region according to the moving direction of the image acquisition module or the moving workbench. Multiple images of the aforementioned regions are stitched together into a single image according to the stitching direction.
3. The laser marking method as described in claim 1, characterized in that, The laser marking machine also includes a laser and a galvanometer; The step of determining the marking path based on the overall image and the preset marking pattern, and performing laser marking on the product to be processed according to the marking path, includes: The preset marking pattern is projected onto the overall image to obtain the predicted marking effect image; A marking path is generated based on the predicted marking effect diagram, and the galvanometer is rotated according to the marking path so that the laser emitted by the laser is refracted by the galvanometer and then shines on the product to be processed to perform laser marking on the product.
4. The laser marking method as described in claim 3, characterized in that, The step of projecting a preset marking pattern onto the overall image to obtain a predicted marking effect image includes: Obtain the ratio between the overall image and the product to be processed; The preset marking pattern is adjusted according to the ratio value and the deflection angle of the overall image to obtain a simulated marking pattern that matches the overall image. The simulated marking pattern is projected onto the overall image to obtain the predicted marking effect image.
5. The laser marking method according to any one of claims 1 to 4, characterized in that, The method further includes: When laser marking is performed on the product to be processed, the marking image of the current marking area of the product to be processed is simultaneously acquired by the image acquisition module, and the marking image is used to replace the area image in the overall image corresponding to the marking image to obtain the target area image; The target area image and the predicted marking effect image are compared to determine the marking accuracy of the laser marking machine.
6. A laser marking device, characterized in that, The laser marking device is deployed on a laser marking machine, which includes an image acquisition module, a vision processing module, and a movable worktable. The movable worktable is used to fix and move the product to be processed. The laser marking device includes: A regional image acquisition module is used to acquire multiple regional images of the product to be processed, wherein the multiple regional images have no overlapping parts; The stitching module is used to stitch multiple images of the region into a whole image through the visual processing module; The laser marking module is used to determine the marking path based on the overall image and the preset marking pattern, and to perform laser marking on the product to be processed according to the marking path; The regional image acquisition module is also used for: When the image acquisition module detects that it has acquired an area image of the product to be processed, it determines whether the edge portion of the area image is the image of the product to be processed. If none of the edge portions are images of the product to be processed, then the region image is taken as the whole image; If the edge portion is the image of the product to be processed, then the image acquisition module is moved a preset distance toward the edge portion to acquire a new area image; or, the moving worktable is controlled to move the product to be processed a preset distance in the opposite direction of the edge portion to acquire a new area image. Based on the new region image, the steps of determining whether the edge portion of the region image is the product image to be processed and subsequent steps are performed to acquire the region image until the newly generated edge portion of the region image is no longer the product image to be processed, at which point the acquisition of the region image ends.
7. A terminal device, characterized in that, The terminal device includes: a memory, a processor, and a laser marking program stored in the memory and executable on the processor. When the laser marking program is executed by the processor, it implements the steps of the laser marking method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a laser marking program, which, when executed by a processor, implements the steps of the laser marking method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Graph on-line splicing method and system for laser processing of large format
CN109702319A
Large-breadth positioning and marking system and using method thereof
CN111001956A