Automatic focusing method and apparatus for laser processing device, and device, system and medium
By using first and second light output modules in laser processing equipment, the focus is automatically adjusted to the workpiece processing surface, solving the problem of cumbersome manual focusing operation and improving the accuracy and efficiency of laser processing.
Patent Information
- Application Number
- PCT/CN2025/089820
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-03-13
- Filing Date
- 2025-04-18
- Publication Date
- 2025-10-30
AI Technical Summary
In existing laser processing equipment, the focusing method of the laser focus mainly relies on manual adjustment, which makes the operation cumbersome when dealing with workpieces of different thicknesses and makes it impossible to achieve automatic focusing.
A first light output module and a second light output module are used to output a light spot for laser processing and a light spot for indication, respectively. By controlling the first light output module to descend and acquire images at different distances, the target image is determined. Based on the target image, the distance or thickness between the workpiece's processing surface and the light output module is calculated, and the focus is adjusted to the processing surface.
It achieves automatic focusing of the laser focal point, improves processing accuracy and efficiency, reduces manual intervention and operational errors, lowers the difficulty of operation, and optimizes processing results.
Smart Images

Figure CN2025089820_30102025_PF_FP_ABST
Abstract
Description
Automatic focusing methods, devices, equipment, systems and media for laser processing equipment
[0001] This application claims priority to Chinese Patent Application No. 202510299056.X, filed on March 13, 2025, entitled "Automatic Focusing Method, Apparatus, Device, System and Medium for Laser Processing Equipment", and Chinese Patent Application No. 202410507479.1, filed on April 25, 2024, entitled "Method for Adjusting Laser Focus, Laser Processing Equipment and Readable Storage Medium", the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of laser processing, specifically to an automatic focusing method, apparatus, equipment, system, and medium for laser processing equipment. Background Technology
[0003] Currently, most laser focusing methods involve manually adjusting the distance between the light-emitting module (such as the optical output module) and the processing platform to achieve focusing. However, manual adjustment is cumbersome when dealing with workpieces of varying thicknesses. Technical issues
[0004] How to provide an automatic focusing method, device, equipment, system and medium for laser processing equipment, aiming to solve the problem of inability to automatically focus. Technical solutions
[0005] To achieve the above objectives, this application provides an automatic focusing method for a laser processing device. The laser processing device includes a first light output module and a second light output module. The first light output module is used to output a laser spot for laser processing, and the second light output module is used to output an indicator spot. The automatic focusing method includes:
[0006] Control the first light output module to output a first light spot to the workpiece, and control the second light output module to output a second light spot to the workpiece;
[0007] The first light output module is controlled to descend, and images of the workpiece including the first light spot and the second light spot are acquired at multiple different distances to obtain multiple images;
[0008] The image with the smallest distance between the first spot and the second spot among the plurality of images is selected as the target image;
[0009] Based on the target image, determine the distance between the processed surface of the workpiece and the first light output module, or the thickness of the workpiece.
[0010] In one embodiment, after determining the distance between the processed surface of the workpiece and the first light output module, or the thickness of the workpiece, based on the target image, the focusing method further includes:
[0011] Based on the distance between the workpiece's processed surface and the first light output module, or the thickness of the workpiece, the focus of the first light output module is adjusted so that the focus is located on the processed surface.
[0012] In one embodiment, adjusting the focus of the first light output module based on the distance between the processed surface of the workpiece and the first light output module, so that the focus is located on the processed surface, includes:
[0013] Based on the distance between the workpiece's processed surface and the first light output module, the moving distance of the first light output module is determined, and the first light output module is controlled to move upward or downward to adjust the focus of the first light output module so that the focus is located on the processed surface.
[0014] In one embodiment, adjusting the focus of the first light output module based on the thickness of the workpiece so that the focus is located on the processing surface includes:
[0015] Based on the thickness of the workpiece, the moving distance of the first light output module is determined, and the first light output module is controlled to move up or down to adjust the focus of the first light output module so that the focus is located on the processing surface.
[0016] In one embodiment, determining the distance between the processed surface of the workpiece and the first light output module, or the thickness of the workpiece, based on the target image, includes:
[0017] Based on the position information of the first light spot in the target image, the distance between the processed surface of the workpiece and the first light output module, or the thickness of the workpiece, is calculated.
[0018] In one embodiment, calculating the distance between the processed surface of the workpiece and the first light output module, or the thickness of the workpiece, based on the position information of the first light spot in the target image, includes:
[0019] Obtain the X and / or Y coordinates of the center point of the first light spot in the target image;
[0020] Based on the X and / or Y coordinates of the center point of the first light spot and a preset mapping relationship, the distance between the processed surface of the workpiece and the first light output module, or the thickness of the workpiece, is calculated.
[0021] In one embodiment, determining the distance between the processed surface of the workpiece and the first light output module based on the target image includes:
[0022] Based on the descent distance of the first light output module corresponding to the target image, the distance between the processed surface of the workpiece and the first light output module is determined;
[0023] or,
[0024] Determining the thickness of the workpiece based on the target image includes:
[0025] Based on the descent distance of the first light output module corresponding to the target image, the distance between the processed surface of the workpiece and the first light output module is determined;
[0026] The thickness of the workpiece is determined based on the distance between the machined surface of the workpiece and the first light output module.
[0027] In one embodiment, acquiring the image with the smallest distance between the first spot and the second spot among the plurality of images includes:
[0028] If there is an image among the plurality of images in which the center point of the first spot and the center point of the second spot coincide, then that image is determined as the image with the smallest distance.
[0029] If there is no image in the plurality of images in which the center point of the first spot and the center point of the second spot coincide, then the image with the smallest distance is obtained based on the distance between the first spot and the second spot in each of the images.
[0030] In one embodiment, acquiring the image with the smallest distance between the first spot and the second spot among the plurality of images, and using it as the target image, includes:
[0031] Identify the first spot and the second spot in each of the images;
[0032] Based on the center point of the first spot and the center point of the second spot in each image, calculate the distance between the first spot and the second spot in each image;
[0033] The target image is obtained based on the distance between the first spot and the second spot in multiple images.
[0034] In one embodiment, calculating the distance between the first spot and the second spot in each image based on the center point of the first spot and the center point of the second spot in each image includes:
[0035] Obtain the first target pixel in the set of pixels corresponding to the first spot in the image, wherein the pixel value of the first target pixel is greater than the first pixel threshold, and obtain the coordinates of each first target pixel. Calculate the average coordinates of all the first target pixels to obtain the coordinates of the center point of the first spot in the image.
[0036] Obtain the second target pixel from the set of pixels corresponding to the second spot in the image. The pixel value of the second target pixel is greater than the second pixel threshold. Obtain the coordinates of each second target pixel. Calculate the average coordinates of all second target pixels to obtain the coordinates of the center point of the second spot in the image.
[0037] Based on the coordinates of the center point of the first light spot and the center point of the second light spot in the image, the distance between the first light spot and the second light spot in the image is calculated.
[0038] Furthermore, to achieve the above objectives, this application also provides an automatic focusing device for a laser processing equipment. The laser processing equipment includes a first light output module and a second light output module. The first light output module is used to output a laser spot for laser processing, and the second light output module is used to output an indicator spot. The automatic focusing device includes:
[0039] The light output control module is used to control the first light output module to output a first light spot to the workpiece, and to control the second light output module to output a second light spot to the workpiece; it is also used to control the first light output module to descend.
[0040] The image acquisition module is used to acquire images of the workpiece, including the first light spot and the second light spot, at multiple distances when the first light output module descends, thereby obtaining multiple images; and to acquire the image with the smallest distance between the first light spot and the second light spot among the multiple images, and use it as the target image.
[0041] The focus adjustment module is used to determine the distance between the processed surface of the workpiece and the first light output module, or the thickness of the workpiece, based on the target image.
[0042] In addition, to achieve the above objectives, this application also provides a laser processing apparatus, comprising:
[0043] A processing platform is used to place workpieces;
[0044] The first light output module is used to output a first light spot. The laser focus of the first light output module is adjustable. The first light output module can be moved up or down. The first light output module is used for laser processing.
[0045] The second light output module is used to output a second light spot for indication;
[0046] The camera module is used to acquire images of the workpiece, including the first light spot and the second light spot, at multiple different distances, wherein the multiple different distances are the distance between the first light output module and the processing platform;
[0047] The processor is used to control the movement of the first light output module and to control the operation of the camera module to implement the automatic focusing method of the laser processing equipment as described above.
[0048] In one embodiment, the direction in which the first light output module outputs the first light spot is perpendicular to the surface of the processing platform, and the direction in which the second light output module outputs the second light spot forms an angle with the surface of the processing platform.
[0049] In one embodiment, the laser processing equipment further includes a laser head, and the first optical output module and the second optical output module are integrated within the laser head.
[0050] In one embodiment, the laser processing equipment further includes a lifting module; wherein,
[0051] The lifting module is connected to the laser head drive to drive the laser head to move upward or downward; or,
[0052] The lifting module is used to move the first optical output module up or down.
[0053] In one embodiment, the processor is further configured to:
[0054] Based on the distance between the workpiece's processed surface and the first light output module, or the thickness of the workpiece, the focus of the first light output module is adjusted so that the focus is located on the processed surface.
[0055] In one embodiment, the processor is further configured to:
[0056] Based on the position information of the first light spot in the target image, the distance between the processed surface of the workpiece and the first light output module, or the thickness of the workpiece, is calculated.
[0057] In one embodiment, the processor is further configured to:
[0058] The distance between the first light output module corresponding to the target image and the workpiece is used as the focusing distance, and the focus of the first light output module is adjusted based on the focusing distance so that the focus is located on the processing surface of the workpiece.
[0059] In one embodiment, the processor is further configured to:
[0060] Identify the first spot and the second spot in each of the images;
[0061] Based on the center point of the first spot and the center point of the second spot in each image, calculate the distance between the first spot and the second spot in each image;
[0062] The target image is obtained based on the distance between the first spot and the second spot in multiple images.
[0063] In addition, to achieve the above objectives, this application also provides a laser processing system, comprising:
[0064] A laser processing device, comprising a first light output module, a second light output module, and a camera module, wherein the first light output module is used to output a light spot for laser processing, the second light output module is used to output a light spot for indication, and the laser focus of the first light output module is adjustable;
[0065] A terminal device is configured to: control the first light output module to output a first light spot to the workpiece, and control the second light output module to output a second light spot to the workpiece; control the first light output module to descend, and control the camera module to acquire images of the workpiece including the first light spot and the second light spot at multiple different distances, thereby obtaining multiple images; acquire the image with the smallest distance between the first light spot and the second light spot among the multiple images, and use it as the target image; and determine the distance between the processed surface of the workpiece and the first light output module, or the thickness of the workpiece, based on the target image.
[0066] In addition, to achieve the above objectives, this application also provides a computer-readable storage medium storing an autofocus program thereon, wherein the autofocus program, when executed by a processor, implements the autofocus method of the laser processing equipment described in any of the above claims. Beneficial effects
[0067] In the technical solution of this application, a first light output module outputs a first light spot and a second light output module outputs a second light spot to the workpiece. By controlling the first light output module to descend and acquiring multiple images of the workpiece including the first and second light spots at different distances, the different positions of the first and second light spots output to the workpiece at different distances are determined. The image with the smallest distance between the first and second light spots among the multiple images is obtained and used as the target image. Based on the target image, the distance between the workpiece's processing surface and the first light output module, or the thickness of the workpiece, is determined. This distance and thickness provide key data for subsequent focus adjustment, ensuring that the focus of the light output module can accurately fall on the workpiece's processing surface, improving processing accuracy and efficiency, achieving automatic focusing, reducing manual intervention, effectively reducing operational errors, and lowering operational difficulty. By controlling processing after adjusting the focus of the first light output module, more precise processing can be achieved, and the processing effect can be optimized. Attached Figure Description
[0068] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.
[0069] Figure 1 is a flowchart of an embodiment of the autofocus method provided in this application;
[0070] Figure 2 is a flowchart of an embodiment of the autofocus method provided in this application;
[0071] Figure 3 is a detailed flowchart of step S300 of an embodiment of the autofocus method provided in this application;
[0072] Figure 4 is a detailed flowchart of step S322 of an embodiment of the autofocus method provided in this application;
[0073] Figure 5 is a detailed flowchart of step S400 of an embodiment of the autofocus method provided in this application;
[0074] Figure 6 is a detailed flowchart of step S410 of an embodiment of the autofocus method provided in this application;
[0075] Figure 7 is a detailed flowchart of steps S400 and S500 of an embodiment of the autofocus method provided in this application;
[0076] Figure 8 is a schematic diagram of a module of an embodiment of the laser processing equipment provided in this application;
[0077] Figure 9 is a schematic diagram of the automatic focusing device of the laser processing equipment provided in this application;
[0078] Figure 10 is a schematic diagram of an embodiment of the autofocus method of this application;
[0079] Figure 11 is one of the schematic diagrams of the coarse focusing process of an embodiment of the autofocus method of this application;
[0080] Figure 12 is a second schematic diagram of the coarse focusing process of an embodiment of the autofocus method of this application;
[0081] Figure 13 is one of the schematic diagrams of the fine focusing process of an embodiment of the autofocus method of this application;
[0082] Figure 14 is a second schematic diagram of the fine focusing process of an embodiment of the autofocus method of this application;
[0083] Figure 15 is a third schematic diagram of the fine focusing process of an embodiment of the autofocus method of this application;
[0084] Figure 16 is a fourth schematic diagram of the fine focusing process of an embodiment of the autofocus method of this application;
[0085] Figure 17 is a schematic diagram of an embodiment of the laser processing equipment provided in this application;
[0086] Figure 18 is a simplified structural diagram of an embodiment of the laser processing equipment provided in this application;
[0087] Figure 19 is a simplified structural diagram of an embodiment of the laser processing system provided in this application.
[0088] Explanation of reference numerals: 100, Processing platform; 200, Laser processing equipment; 210, First light output module; 211, First beam; 212, First light spot; 220, Second light output module; 221, Second beam; 222, Second light spot; 230, Laser head; 300, Camera module; 400, Processor; 500, Lifting module; 600, Autofocus device; 610, Light output control module; 620, Image acquisition module; 630, Focus adjustment module; 700, Terminal equipment; 1000, Laser processing system.
[0089] 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.
[0090] Implementation methods of this application
[0091] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to Figures 1 to 19. 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.
[0092] It should be noted that if all directional indications 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, the directional indications will also change accordingly if the specific posture changes.
[0093] 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, features defined with "first" or "second" may explicitly or implicitly include at least one of those features. If the application uses the description "A and / or B," it indicates that solution A or solution B is included, or that solutions A and B are included. Furthermore, the technical solutions of various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.
[0094] In related technologies, most laser focusing methods require manually adjusting the distance between the light-emitting components, such as the light output module, and the processing platform to achieve focusing. This manual focusing is cumbersome when dealing with workpieces of varying thicknesses.
[0095] To achieve automatic laser focus adjustment and improve focusing accuracy, referring to Figures 1 to 19, this application provides an automatic focusing method, apparatus, device, system, and medium for a laser processing equipment 200. The automatic focusing method shown in this application is used for focus adjustment of light output modules such as the laser output module of the laser processing equipment 200. These light output modules can be optionally mounted on the laser head 230 or separately mounted on the laser processing equipment 200. The automatic focusing method is mainly applied to the laser processing equipment 200, the laser processing system 1000, the laser processing system control equipment, and other equipment, systems, and apparatuses that can be used to perform laser processing. The execution subject in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, mobile phone, or server, or an electronic device, laser processing control device, control system, control unit, controller, etc., capable of performing the above functions. The controller is mainly used as the execution subject. The controller can be located in the laser processing equipment 200 and other components of the laser processing system 1000, or it can be set independently of the components of the laser processing system 1000.
[0096] The laser processing equipment 200 includes a first light output module 210 and a second light output module 220. The first light output module 210 outputs a laser spot for laser processing, and the second light output module 220 outputs a light spot for indication. The first light output module 210 can be moved closer to or further away from the workpiece, or it can be moved closer to or further away from the processing platform 100, or it can be moved closer to or further away from both the workpiece and the processing platform 100, thereby adjusting the focus of the first light output module 210 to process workpieces of different thicknesses. The second light output module 220 can move closer to or further away from the workpiece together with the first light output module 210, or it can move closer to or further away from both the workpiece and the processing platform 100 together with the first light output module 210, or it can move closer to or further away from both the workpiece and the processing platform 100 together with the first light output module 210.
[0097] It should be noted that although the light spot output by the first light output module 210 is mainly used for processing, the power of the first light spot 212 is relatively weak and is mainly used for focusing. The corresponding high-power laser is used to realize laser processing. The second light output module 220 is used to output the second light spot 222, which mainly serves as an indicator.
[0098] For ease of explanation, the following description will primarily focus on the processor 400 within the terminal device 700 or the laser processing equipment 200 as the main execution unit.
[0099] Referring to Figure 1, the autofocus method includes the following steps S100 to S400:
[0100] Step S100: Control the first light output module 210 to output the first light spot 212 to the workpiece, and control the second light output module 220 to output the second light spot 222 to the workpiece;
[0101] In step S200, the first light output module 210 is controlled to descend, and images of the workpiece, including the first light spot 212 and the second light spot 222, are acquired at multiple different distances, resulting in multiple images. The multiple different distances refer to the distances between the first light output module 210 and the processing platform 100.
[0102] Step S300: Obtain the image with the smallest distance between the first spot 212 and the second spot 222 among multiple images, and use it as the target image;
[0103] Step S400: Based on the target image, determine the distance between the processed surface of the workpiece and the first light output module 210, or the thickness of the workpiece.
[0104] In some optional embodiments of this application, the workpiece is placed on the processing platform 100, the first light output module 210 is used to output a first light beam 211, the second light output module 220 is used to output a second light beam 221, the first light beam 211 is projected onto the workpiece to form a first light spot 212, and the second light beam 221 is projected onto the workpiece to form a second light spot 222.
[0105] Specifically, a laser or similar device is used as the first light output module 210, which outputs a first light spot 212 for laser processing to the workpiece. The first light output module 210 can move vertically up or down relative to the processing platform 100 to accommodate workpieces of different thicknesses. The second light output module 220 can be, but is not limited to, emitting infrared or ultraviolet light, or outputting one or more visible light spots such as red, blue, or yellow as a second light spot 222 onto the workpiece. The second light spot 222 is mainly used as a position reference. By controlling the descent of the first light output module 210 and acquiring multiple images of the workpiece including the first light spot 212 and the second light spot 222 at different distances, the different positions of the first light spot 212 and the second light spot 222 output to the workpiece at different distances are determined. The image with the smallest distance between the first light spot 212 and the second light spot 222 among multiple images is obtained and used as the target image. Based on the target image, the distance between the processing surface of the workpiece and the first light output module 210, or the thickness of the workpiece, is determined. This distance and thickness provide crucial data for subsequent focus adjustment, ensuring that the focus of the light output module can accurately fall on the workpiece's machining surface, thereby improving machining accuracy and efficiency.
[0106] In some examples, referring to Figure 2, after step S400, which determines the distance between the workpiece's machined surface and the first light output module 210, or the workpiece's thickness, based on the target image, the autofocus method further includes the following step S500:
[0107] Step S500: Based on the distance between the workpiece's processed surface and the first light output module 210, or the workpiece's thickness, adjust the focus of the first light output module 210 so that the focus is located on the workpiece's processed surface.
[0108] In some optional embodiments of this application, the focus of the first light output module 210 is adjusted based on the distance between the workpiece's processing surface and the first light output module 210, or the workpiece's thickness, so that the focus is located on the workpiece's processing surface, thereby achieving automatic focusing. This reduces manual intervention, effectively reduces operational errors, and lowers operational difficulty. Controlling processing after adjusting the focus of the first light output module 210 allows for more precise processing and optimized processing results. Controlling processing after adjusting the focus of the first light output module 210 used to output the first light spot 212 for laser processing also enables precise processing, accelerating the processing progress, optimizing processing results, and improving customer satisfaction. Compared to other focusing methods in related technologies, such as contact ranging and TOF (Time of Flight) ranging, the automatic focusing method of this application also reduces the use of detection components and lowers processing costs.
[0109] In this application, a camera module 300 or other device with image acquisition and recognition functions can be provided to acquire images of the workpiece, including the first light spot 212 and the second light spot 222, at multiple different distances from the processing platform 100 during the movement and descent of the first light output module 210, thereby obtaining multiple images. Specifically, by adjusting the distance between the first light output module 210 and the processing platform 100, or between the first light output module 210 and the processing surface of the workpiece placed on the processing platform 100, the distance between the first light spot 212 and the second light spot 222 is adjusted. The camera module 300 or other device acquires images of the light output module of the laser processing equipment 200 at different distances from the workpiece. By acquiring multiple images, the different positions of the first light spot 212 and the second light spot 222 projected onto the workpiece at different distances from the first light output module 210 are determined. The image with the smallest distance between the first light spot 212 and the second light spot 222 among the acquired multiple images is taken as the target image, and the distance between the first light output module 210 and the workpiece corresponding to the smallest distance of the target image is taken as the focusing distance. The focus of the first light output module 210 is further adjusted according to the focusing distance so that the focus is located on the processing surface of the workpiece, so that the distance between the first light spot 212 and the second light spot 222 meets the focusing requirements, thereby realizing automatic adjustment of the laser focus, reducing the use of detection components and additional ranging hardware, and reducing the difficulty of operation and processing costs.
[0110] It should be noted that this application mainly uses the example of controlling the first light output module 210 to move downwards to acquire images of the workpiece including the first light spot 212 and the second light spot 222 at multiple different distances. In other alternative solutions, the first light output module 210 can also be controlled to move upwards to acquire images of the workpiece including the first light spot 212 and the second light spot 222 at multiple different distances. The first light output module 210 and the second light output module 220 of this application can be either relatively independently configured or integrated on the same laser head 230. That is, in addition to controlling the first light output module 210 to move upwards or downwards independently to acquire multiple images including the first light output module 210 and the second light output module 220 at multiple different distances. Alternatively, the first light output module 210 and the second light output module 220 can be selectively controlled to move up or down simultaneously to obtain multiple images of the workpiece including the first light spot 212 and the second light spot 222 at multiple different distances. In this case, when the direction of the first light output module 210 outputting the first light spot 212 is perpendicular to the surface of the processing platform 100, and the direction of the second light output module 220 outputting the second light spot 222 forms an angle with the surface of the processing platform 100, the first light output module 210 and the second light output module 220 can be an integrated structure or a relatively independent structure.
[0111] Optionally, the first light output module 210 and the second light output module 220 are mounted on the laser processing equipment 200 and positioned above the processing platform 100. In step S200, the first light output module 210 is controlled to descend, and images of the workpiece, including the first light spot 212 and the second light spot 222, are acquired at multiple distances. When multiple images are obtained, the distance between the first light output module 210 and the workpiece needs to be adjusted. The first light output module 210 is used to output the light spot for laser processing, and it can move up or down relative to the processing platform 100 (or the workpiece placed on the processing platform 100).
[0112] In addition to the aforementioned method of adjusting the distance between the first light output module 210 and the workpiece by moving the first light output module 210 up or down, in some other embodiments, the processing platform 100 may be configured to move closer to or further away from the first light output module 210, thereby adjusting the distance between the first light output module 210 and the workpiece by adjusting the position of the processing plane.
[0113] In a specific embodiment of this application, step S200 involves controlling the first light output module 210 to descend and acquiring images of the workpiece including the first light spot 212 and the second light spot 222 at multiple different distances to obtain multiple images. This includes controlling the first light output module 210 to move sequentially from the initial position to the target position according to a preset adjustment distance, and acquiring workpiece images including the first light spot 212 and the second light spot 222 at each target position to obtain multiple images.
[0114] Specifically, the first light output module 210 is controlled to move sequentially from the initial position to the target position according to the preset adjustment distance. Each time the first light output module 210 moves, it acquires an image. After moving sequentially multiple times according to the set number of moves, the movement stops, and multiple images of the first light output module 210 and the workpiece at different distances are acquired.
[0115] In step S300, the image with the smallest distance between the first light spot 212 and the second light spot 222 is selected from the multiple images obtained. Specifically, the image with the smallest distance between the center point of the first light spot 212 and the center point of the second light spot 222 (or other calibration positions of the first light spot 212 and the second light spot 222) is selected and used as the target image. In step S400, the distance between the first light output module 210 and the workpiece when the distance between the first light spot 212 and the second light spot 222 is the smallest is used as the focusing distance. The focus of the first light output module 210 is adjusted so that the focus of the first light output module 210 is located on the processing surface of the workpiece.
[0116] In a specific embodiment of this application, step S200 involves controlling the first light output module 210 to descend and acquiring multiple images of the workpiece including the first light spot 212 and the second light spot 222 at multiple different distances, thereby obtaining multiple images. This includes: controlling the first light output module 210 to move sequentially from an initial position to a target position according to a preset adjustment distance; acquiring an image of the workpiece including the first light spot 212 and the second light spot 222 each time the first light output module 210 moves; acquiring the distance between the first light spot 212 and the second light spot 222 in the image; and specifically, acquiring the distance between the center point of the first light spot 212 and the center point of the second light spot 222 (or the distance between other calibration positions of the first light spot 212 and other calibration positions of the second light spot 222). Moving from the initial distance to the target position can be understood as moving the first light output module 210 in the same direction so that the distance between the center point of the first light spot 212 and the center point of the second light spot 222 gradually decreases. For example, controlling the first light output module 210 to move and descend so that the distance between the center point of the first light spot 212 and the center point of the second light spot 222 gradually decreases.
[0117] When the direction of the first light spot 212 output by the first light output module 210 is perpendicular to the surface of the processing platform 100, and the direction of the second light spot 222 output by the second light output module 220 forms an angle with the surface of the processing platform 100, the projection directions of the first light spot 212 and the second light spot 222 intersect rather than are parallel. Therefore, when the distance between the center point of the first light spot 212 and the center point of the second light spot 222 reaches its minimum, the distance between the center point of the first light spot 212 and the center point of the second light spot 222 will increase when the first light output module 210 continues to move in the same direction. Therefore, after multiple moves until the distance between the center point of the first light spot 212 and the center point of the second light spot 222 in the currently acquired image is greater than the distance between the center points of the first light spot 212 and the second light spot 222 in the previously acquired image, it indicates that the distance between the center points of the first light spot 212 and the second light spot 222 in the previously acquired image is the minimum distance. At this time, image acquisition is stopped, and the distance between the first light output module 210 and the workpiece corresponding to the previously acquired image is used as the focusing distance, and the previously acquired image is determined as the target image.
[0118] When performing step S500, the focus distance between the first light output module 210 and the workpiece is used as the focusing distance when the distance between the first light spot 212 and the second light spot 222 is the smallest. The focus of the first light output module 210 is adjusted so that the focus of the first light output module 210 is located on the processing surface of the workpiece.
[0119] In another specific embodiment of this application, step S200 involves controlling the first light output module 210 to descend and acquiring multiple images of the workpiece including the first light spot 212 and the second light spot 222 at multiple different distances, thereby obtaining multiple images. This includes: controlling the first light output module 210 to move sequentially from the initial position to the target position according to a preset adjustment distance; acquiring an image of the workpiece including the first light spot 212 and the second light spot 222 each time the first light output module 210 moves; moving multiple times until the distance between the center point of the first light spot 212 and the center point of the second light spot 222 in the acquired image is the smallest; stopping the movement; and using the distance between the first light output module 210 and the workpiece corresponding to the smallest distance between the center point of the first light spot 212 and the center point of the second light spot 222 as the focusing distance.
[0120] Additionally, a distance threshold can be set to determine that the distance between the first light spot 212 and the second light spot 222 in the image is minimum when the distance between the center point of the first light spot 212 and the center point of the second light spot 222 is not greater than a preset distance threshold. Movement stops when the two light spots coincide or when the distance between the center points of the first light spot 212 and the second light spot 222 reaches its minimum (or when the distance between other calibration positions of the first light spot 212 and other calibration positions of the second light spot 222 reaches its minimum). The distance between the first light output module 210 and the workpiece corresponding to the point of coincidence or the minimum distance is used as the focusing distance, and the image is determined as the target image. During step S400, the focus of the first light output module 210 is adjusted using the distance between the first light output module 210 and the workpiece when the distance between the first light spot 212 and the second light spot 222 is minimum, so that the focus of the first light output module 210 is located on the processing surface of the workpiece.
[0121] It should be noted that in the aforementioned examples, the distance between the center point of the first light spot 212 and the center point of the second light spot 222 in the obtained image is the smallest. This includes not only examples where the center points of the first light spot 212 and the second light spot 222 in the target image coincide when the first light output module 210 is in its current position, but also examples where the center points of the first light spot 212 and the second light spot 222 are closest when they cannot coincide.
[0122] In some embodiments of this application, it is necessary to acquire an image of the first light output module 210 in its initial position before moving it. If the distance between the center point of the first light spot and the center point of the second light spot 222 in the image acquired by the first light output module 210 in its initial position reaches the minimum distance, then no further movement is required. Additionally, the direction of movement of the first light output module 210 (besides the aforementioned downward movement, it can also be upward movement), the number of movements, and the magnitude of the adjustment distance can be determined based on the distance between the center points of the first light spot 212 and the center points of the second light spot 222 in the image of the first light output module 210 in its initial position. These can be specifically set according to actual conditions and are not limited here. The method of determining the movement direction of the first light output module 210 based on the distance between the center point of the first light spot 212 and the center point of the second light spot 222 in the image of the first light output module 210 at its initial position includes: when the direction in which the first light output module 210 outputs the first light spot 212 is perpendicular to the surface of the processing platform 100, and the second light output module 220 is located to the right of the first light output module 210, and the direction in which the second light spot 222 is output forms an angle with the surface of the processing platform 100, if the second light spot 222 output to the workpiece is located to the right of the first light spot 212, then the first light output module 210 is controlled to move downward; if the second light spot 222 output to the workpiece is located to the left of the first light spot 212, then the first light output module 210 is controlled to move upward; if the center point of the first light spot 212 coincides with the center point of the second light spot 222, then the first light output module 210 is controlled to remain at its current position, and the acquired image is determined as the target image.
[0123] Taking the first light output module 210 as an example, which uses a laser or other laser for laser emission processing, the laser emitted by the first light output module 210 has a focal point after being focused. The energy at the focal point is the highest, making it easier to engrave, cut or mark the workpiece. In order to better process the workpiece, the focal point of the first light output module 210 is generally adjusted to be located on the processing surface of the workpiece. Therefore, in order to visually adjust the focal point of the laser, when installing and debugging the laser processing equipment 200, it is preset that when the distance between the first light spot 212 and the second light spot 222 on the processing surface of the workpiece is the smallest, the focal point of the first light output module 210 is located on the surface of the workpiece.
[0124] The camera module 300 can be specifically set in the light output module (first light output module 210, second light output module 220) or in any other location such as on the laser processing equipment 200 or outside the laser processing equipment 200, to acquire images such as the captured image of the workpiece or the processing platform 100. It identifies the first light spot 212 and the second light spot 222 by recognizing image features such as image pixels, image size, and image shape, and can specifically be used to find the center point of the first light spot 212 and the second light spot 222 or other calibrated positions of the light spots. Specifically, the image acquired by the camera module 300, as shown in Figure 10, can be directly displayed through the user interface, with different colors representing the light spots output to the workpiece by the first light output module 210 and the second light output module 220, respectively. To distinguish the light spots output to the workpiece by the first light output module 210 and the second light output module 220, the first light output module 210 and the second light output module 222 can be set to output first light spots 212 and second light spots 222 of different colors. Alternatively, the camera module 300 can automatically display the two light spots with images of different colors after recognizing the first light spot 212 and the second light spot 222. The specific settings can be determined according to actual conditions and are not limited here.
[0125] The second light spot 222 is used as a position reference. Since the beam is projected radially onto the workpiece and / or processing platform 100 and appears as a light spot, the brightness varies at different positions, with the brightness being highest at the center of the beam. When controlling the first light output module 210 to output the corresponding higher power laser processing, the light utilization rate is highest at the beam center of the first light output module 210. Therefore, by controlling the first light output module 210 to descend (or ascend) and acquiring multiple images of the workpiece including the first light spot 212 and the second light spot 222 at multiple different distances, the distance between the first light spot 212 and the second light spot 222 is determined by the distance between the center points of the first light spot 212 and the second light spot 222. The distance between the first light output module 210 and the workpiece corresponding to the minimum distance between the center points of the first light spot 212 and the second light spot 222 is used as the focusing distance. This maximizes the focusing accuracy and further improves processing accuracy while reducing processing errors. Compared to focusing methods such as contact ranging and TOF ranging in related technologies, the autofocus method of this application can reduce the use of detection components and additional ranging hardware, thereby reducing the difficulty of operation and processing costs.
[0126] In one embodiment, step S300, obtaining the image with the smallest distance between the first spot 212 and the second spot 222 among multiple images, includes:
[0127] If among multiple images, there exists an image in which the center point of the first spot 212 coincides with the center point of the second spot 222, then that image is determined as the one with the smallest distance.
[0128] In this example, the first light output module 210 is controlled to move so that when there is an image in the currently acquired image where the center point of the first light spot 212 and the center point of the second light spot 222 coincide, as shown in Figure 11, the first light output module 210 stops moving. Alternatively, when the center points of the first light spot 212 and the second light spot 222 coincide in multiple acquired images, the distance between the first light output module 210 and the workpiece when the light spots coincide is directly determined as the focusing distance.
[0129] In one embodiment, step S300, which involves obtaining the image with the smallest distance between the first spot 212 and the second spot 222 among multiple images, further includes:
[0130] If there is no image in the multiple images in which the center point of the first spot 212 coincides with the center point of the second spot 222, then the image with the smallest distance is obtained based on the distance between the first spot 212 and the second spot 222 in each image.
[0131] In this embodiment, the first light output module 210 is controlled to move, and multiple images are acquired at different distances between the first light output module 210 and the workpiece. As shown in Figure 12, the distances between the center points of the first light spot 212 and the second light spot 222 in the acquired multiple images are compared. The image with the minimum distance is used to determine the target image, and it is also used to further determine the distance between the first light output module 210 and the workpiece at the minimum distance as the focusing distance. This is used to further control the movement of the first light output module 210 to adjust the focal position of the laser based on the focusing distance.
[0132] In this application, since the direction of the first light spot 212 output by the first light output module 210 is perpendicular to the surface of the processing platform 100, and the direction of the second light spot 222 output by the second light output module 220 forms an angle with the surface of the processing platform 100, specifically, the positions of the first light spot 212 and the second light spot 222 in the image obtained by the first light output module 210 at its initial position, and the angle formed between the direction of the second light beam 221 output by the second light output module 220 and the surface of the processing platform 100, can be directly calculated to determine whether the first light spot 212 and the second light spot 222 may overlap. If they overlap, the first light output module 210 and the workpiece are directly considered when the first light spot 212 and the second light spot 222 overlap. The distance between the two light spots is used as the focusing distance, and the first light output module 210 is further moved according to the focusing distance to adjust the focal position of the first light output module 210 so that the focal point of the first light output module 210 is located on the processing surface of the workpiece. If there is no overlap, the distance between the first light spot 212 and the second light spot 222 when they are closest is taken as the minimum distance. The distance between the first light output module 210 and the workpiece corresponding to this minimum distance is calculated as the focusing distance, and the first light output module 210 is further moved according to this focusing distance to adjust the focal position of the first light output module 210 so that the focal point of the first light output module 210 is located on the processing surface of the workpiece. The specific method of adjusting the focal position of the first light output module 210 can be set according to actual conditions and is not limited here.
[0133] Referring to Figure 3, in one embodiment, step S300, acquiring the image with the smallest distance between the first spot 212 and the second spot 222 among multiple images, and using it as the target image, includes:
[0134] Step S321: Identify the first spot 212 and the second spot 222 in each image;
[0135] Step S322: Based on the center point of the first spot 212 and the center point of the second spot 222 in each image, calculate the distance between the first spot 212 and the second spot 222 in each image;
[0136] Step S323: Obtain the target image based on the distance between the first spot 212 and the second spot 222 in multiple images.
[0137] An algorithm identifies a first spot 212 and a second spot 222 in each image, and image processing techniques are used to calculate the distance between them. Specifically, the center points of the first spot 212 and the second spot 222 in each image are first determined, and then the distance between the center points of the first spot 212 and the second spot 222 is calculated as the spot distance. By comparing the spot distances in multiple images, the image with the smallest distance between the first spot 212 and the second spot 222 is selected and used as the target image for subsequent analysis or processing.
[0138] Optionally, to improve the accuracy of spot recognition, image processing techniques (which may include preprocessing steps such as denoising, enhancement, edge detection, and threshold segmentation) are used to analyze the brightness, color, shape, and other features of each image to identify the first spot 212 and the second spot 222 that match preset conditions (such as preset brightness thresholds, templates, etc.). The specific implementation method can be adjusted according to actual needs and is not limited here.
[0139] Referring to Figures 4 and 10, in one embodiment, step S322, calculating the distance between the first spot 212 and the second spot 222 in each image based on the center point of the first spot 212 and the center point of the second spot 222 in each image, includes:
[0140] Step S3221: Obtain the first target pixel in the set of pixels corresponding to the first spot 212 in the image. The pixel value of the first target pixel is greater than the first pixel threshold. Obtain the coordinates of each first target pixel and calculate the average coordinate of all first target pixels to obtain the coordinates of the center point of the first spot 212 in the image.
[0141] Step S3222: Obtain the second target pixel in the set of pixels corresponding to the second spot 222 in the image. The pixel value of the second target pixel is greater than the second pixel threshold. Obtain the coordinates of each second target pixel and calculate the average coordinate of all second target pixels to obtain the coordinates of the center point of the second spot 222 in the image.
[0142] The aforementioned steps S3221 and S3222 can be performed simultaneously or sequentially.
[0143] Step S3223: Based on the coordinates of the center point of the first spot 212 and the center point of the second spot 222 in the image, calculate the distance between the first spot 212 and the second spot 222 in the image.
[0144] A light spot is typically composed of a set of pixels with high pixel values. To determine the center position of a light spot and calculate the distance between two light spots, firstly, by setting a first pixel threshold, pixels in the image with pixel values exceeding the threshold are selected. These pixels form the set of first light spots 212. Then, the average coordinates of these pixels are calculated to obtain the coordinates of the center point of the first light spot 212. Similarly, by setting a second pixel threshold, the set of pixels constituting the second light spot 222 is selected, and the coordinates of the center point of the second light spot 222 are calculated. Specifically, using any one of pixel values 80, 85, and 90, or any other arbitrary pixel value, as a first pixel threshold, all pixels in the set of pixels corresponding to the first light spot 212 in the image that are greater than the first pixel threshold are obtained and identified as first target pixels. The coordinates of each first target pixel are also obtained, and the average coordinate of all first target pixels is calculated. This average is used as the coordinates of the center point of the first light spot 212 in the image. Similarly, using any one of pixel values 80, 85, and 90, or any other arbitrary pixel value, as a second pixel threshold, the coordinates of the center point of the second light spot 222 are further obtained. Then, the distance between these two center points is calculated based on their coordinates. By identifying the center points of the first light spot 212 and the second light spot 222 in each image and calculating the distance between them, the light spot distances in multiple images can be compared, thereby selecting the image with the smallest light spot distance. This helps determine the optimal focusing position between the workpiece processing surface and the first light output module 210.
[0145] It should be noted that when performing steps S100 to S300 of the aforementioned autofocus method, the first light output module 210 and the second light output module 220 are kept open. When performing the aforementioned steps S400 and related steps, the second light output module 220 may be turned off; or, the first light output module 210 and the second light output module 220 may be kept open.
[0146] In some embodiments, steps S100 to S300 can be performed independently for autofocusing without the need for subsequent focusing steps. Specifically, after performing step S300, the lifting distance corresponding to the target image is obtained, and the focusing distance is determined. Autofocusing is achieved by controlling the first light output module 210 to move to the position corresponding to the minimum distance between it and the first light spot 212 and the second light spot 222, without the need for subsequent fine focusing steps.
[0147] In some embodiments, when the autofocus method further includes a fine focusing step or when there are high requirements for actual focusing accuracy, steps S100 to S300 can be used as coarse focusing steps to provide accurate focusing range and distance information for fine focusing in the subsequent step S500, ensuring that the focus of the first light output module 210 can accurately fall on the processing surface of the workpiece, reducing the difficulty of subsequent fine focusing, and optimizing processing accuracy and quality.
[0148] Specifically, in order to further move and adjust the focal position of the laser and improve the adjustment accuracy of the laser focal point, through the above steps S100, S200, S300 and related steps, coarse focusing is achieved by controlling the first light output module 210 to move to the position corresponding to the minimum distance between the first light spot 212 and the second light spot 222, and fine focusing is achieved through the related steps of fine focusing. This is used to control the movement of the first light output module 210 during the coarse focusing stage and to minimize the distance between the first light spot 212 and the second light spot 222 by acquiring the target image, so as to control the focus of the first light output module 210 within a certain range. Then, in the fine focusing stage, based on the target image, the X coordinate and / or Y coordinate of the center point of the first light spot 212 in the target image are acquired. Based on the X coordinate and / or Y coordinate of the center point of the first light spot 212 and the preset mapping relationship, the distance between the workpiece's processing surface and the first light output module 210, or the thickness of the workpiece, is calculated. Based on the distance between the workpiece's processing surface and the first light output module 210, or the thickness of the workpiece, the moving distance of the first light output module 210 is determined, and the first light output module 210 is controlled to move up or down to adjust the focus of the first light output module 210 so that the focus is located on the processing surface, thereby achieving automatic focusing, in order to further achieve precise processing, improve processing accuracy, and optimize processing effect.
[0149] Through the aforementioned coarse focusing and subsequent fine focusing, the focal point of the first light output module 210 can be precisely adjusted to adapt to workpieces of different thicknesses, further improving processing accuracy and efficiency. In some embodiments, coarse focusing ensures that the focusing accuracy remains within 3mm; fine focusing after coarse focusing ensures that the focusing accuracy remains around 0.5mm.
[0150] In some embodiments, in step S500, adjusting the focus of the first light output module 210 based on the distance between the workpiece's processed surface and the first light output module 210, or the workpiece's thickness, to make the focus lie on the workpiece's processed surface includes: using the distance between the first light output module 210 corresponding to the target image and the workpiece as the focusing distance, and adjusting the focus of the first light output module 210 based on the focusing distance to make the focus lie on the workpiece's processed surface. In this case, step S500 is used to achieve coarse focusing.
[0151] It should be noted that when the autofocus method also includes a fine focusing step or has high requirements for actual focusing accuracy, a fine focusing step is also included. This fine focusing step, achieved through steps S100 to S300, provides accurate focusing range and distance information for the subsequent fine focusing in step S500. This ensures that the focus of the first light output module 210 accurately falls on the workpiece's machining surface, reducing the difficulty of subsequent fine focusing and optimizing machining accuracy and quality. In this way, the focus of the first light output module 210 can be precisely adjusted to adapt to workpieces of different thicknesses, further improving machining accuracy and efficiency.
[0152] This application achieves precise focusing based on the principle of triangulation. Specifically, the first light spot 212 output by the first light output module 210 is perpendicular to the surface of the processing platform 100 and is used for laser processing. The second light spot 222 output by the second light output module 220 forms a certain tilt angle with the surface of the processing platform 100, serving as an auxiliary positioning or indication. During the movement of the first light output module 210 downwards (or upwards), the camera module 300 acquires multiple images of the workpiece, including the first light spot 212 and the second light spot 222. As the light output modules (first light output module 210 and second light output module 220) move, the positions of the first light spot 212 and the second light spot 222 change. The principle of triangulation is applied to these captured images, and by analyzing the positional changes of the first light spot 212 and the second light spot 222, the positional change of the light output module relative to the workpiece surface is determined. Combining known geometric relationships and system parameters (such as the tilt angle of the second light output module 220), the distance between the light output module and the workpiece surface can be calculated, and the thickness of the workpiece can be further obtained. For example, if the thickness or shape of a certain part of the workpiece is known, the thickness of the workpiece can be indirectly obtained by calculating the distance difference between that part and the light output module. Since the first light output module 210 projects the first light spot 212 vertically onto the workpiece, while the second light output module 220 projects the second light spot 222 at an angle, the center position of the second light spot 222 changes with the distance from the workpiece, while the position of the first light spot 212 remains relatively stable. If the second light spot 222 is selected, determining the distance between the workpiece's processing surface and the first light output module 210, or the thickness of the workpiece, based on the position information of the second light spot 222, requires a high degree of control over the area of the workpiece (or processing platform 100), the projection position of the second light spot 222, and the moving distance of the laser head 230. Furthermore, simultaneously projecting the first light spot 212 and the second light spot 222 would affect the adjustment effect of the laser focus. Therefore, in this embodiment, the first light spot 212 is selected, and the position information of the first light output module 210 is determined by the coordinates of the center point of the first light spot 212. The explanation mainly focuses on adjusting the focus of the first light output module 210 based on the target image so that the focus is located on the processing surface of the workpiece.
[0153] Referring to Figure 5, in a specific embodiment, step S400, determining the distance between the processed surface of the workpiece and the first light output module 210, or the thickness of the workpiece, based on the target image, includes:
[0154] Step S410: Based on the position information of the first light spot 212 in the target image, calculate the distance between the processed surface of the workpiece and the first light output module 210, or the thickness of the workpiece.
[0155] Understandably, the distance between the workpiece's processing surface and the first light output module 210 can be calculated based on the position information of the first light spot 212 in the target image; or, the thickness of the workpiece can be calculated based on the position information of the first light spot 212 in the target image; or, the distance between the workpiece's processing surface and the first light output module 210 can be calculated based on the position information of the first light spot 212 in the target image, and the thickness of the workpiece can be further estimated.
[0156] This embodiment primarily uses the calculation of the distance between the workpiece's processing surface and the first light output module 210 based on the position information of the first light spot 212 in the target image as an example for illustration. Related embodiments for calculating the workpiece thickness based on the position information of the first light spot 212 in the target image, and for calculating the distance between the workpiece's processing surface and the first light output module 210 based on the position information of the first light spot 212 in the target image, and further deducing the workpiece thickness, can be referred to accordingly and will not be repeated here. Specifically, by acquiring the target image (i.e., the image with the minimum distance between the first light spot 212 and the second light spot 222), the position of the first light spot 212 in the image can be accurately determined. Then, using optical principles and known geometric relationships (such as the triangulation principle), the distance between the first light output module 210 and the workpiece's processing surface is calculated. Based on this distance (or the workpiece's thickness), the first light output module 210 is moved via the lifting module 500 or other means to adjust its focus so that it is located on the workpiece's processing surface. In this way, automatic focusing can be achieved, improving the accuracy and efficiency of subsequent processing.
[0157] Referring to Figure 6, in one embodiment, step S410, calculating the distance between the processed surface of the workpiece and the first light output module 210, or the thickness of the workpiece, based on the position information of the first light spot 212 in the target image, includes:
[0158] Step S411: Obtain the X and / or Y coordinates of the center point of the first spot 212 in the target image;
[0159] Step S412: Based on the X and / or Y coordinates of the center point of the first light spot 212 and the preset mapping relationship, calculate the distance between the processed surface of the workpiece and the first light output module 210, or the thickness of the workpiece.
[0160] By acquiring the X and / or Y coordinates of the center point of the first light spot 212 in the target image (i.e., the image where the distance between the first light spot 212 and the second light spot 222 is minimized), key data can be provided for subsequent distance or thickness calculations. Specifically, the coordinate values of the center point of the first light spot 212 and a preset mapping relationship are used to calculate the distance between the workpiece processing surface and the first light output module 210, or to further calculate the thickness of the workpiece.
[0161] The preset mapping relationship is used to determine the correspondence between the coordinates of the center point of the light spot and the position information of the first light output module 210 based on the principle of triangulation. This preset mapping relationship is typically established through experiments or calibration. It describes the correspondence between the position of the center point of the first light spot 212 in the image (i.e., X and / or Y coordinates) and the distance between the first light output module 210 and the workpiece processing surface. This relationship may be linear, non-linear, or based on a mathematical model. In other words, given a clear preset mapping relationship between the coordinates of the center point of the first light spot 212 and the position of the first light output module 210 (corresponding to the distance between the workpiece processing surface and the first light output module 210, or corresponding to the workpiece thickness), the position information of the light output module corresponding to the coordinates of the center point of the first light spot 212 (such as the distance between the workpiece processing surface and the first light output module 210, or the workpiece thickness) can be directly determined based on the coordinates of the center point of the first light spot 212. The specific details can be determined according to actual conditions and are not limited here.
[0162] Steps S411 and S412 acquire the coordinate information of the light spot and combine it with a preset mapping relationship to accurately calculate the distance between the workpiece processing surface and the light output module, or the workpiece thickness. This process provides crucial data for subsequent focus adjustment, ensuring that the focus of the light output module can accurately fall on the workpiece processing surface, thereby improving processing accuracy and efficiency.
[0163] In implementation, the coordinates of the center point of the first light spot 212 and the position of the first light output module 210 can be directly obtained by calling a pre-stored calibration file; alternatively, the relationship between the coordinates of the center point of the first light spot 212 and the position of the first light output module 210 can be determined based on the principle of triangulation, and the pre-defined mapping relationship between the coordinates of the center point of the first light spot 212 and the position of the first light output module 210 can be determined by repeatedly adjusting the focal position of the first light output module 210. This application mainly determines the pre-defined mapping relationship between the coordinates of the center point of the first light spot 212 and the position of the first light output module 210 by directly calling a pre-stored calibration file, which can effectively reduce the difficulty and complexity of operation, facilitate precise processing, and improve processing accuracy.
[0164] Referring to Figure 7, as an example, step S500, adjusting the focus of the first light output module 210 based on the distance between the workpiece's machining surface and the first light output module 210 so that the focus is located on the machining surface, includes:
[0165] Step S510: Based on the distance between the workpiece's processing surface and the first light output module 210, determine the moving distance of the first light output module 210, and control the first light output module 210 to move up or down to adjust the focus of the first light output module 210 so that the focus is located on the processing surface.
[0166] The moving distance is determined based on the actual distance between the workpiece processing surface and the first light output module 210. For example, the moving distance is the actual distance between the workpiece processing surface and the first light output module 210 minus the focal length of the first light output module 210. In this process, based on the determined actual distance between the workpiece processing surface and the first light output module 210, the distance that the first light output module 210 needs to rise or fall can be accurately calculated to ensure that the laser focus falls precisely on the workpiece processing surface. This method reduces calculation steps while ensuring the accuracy and efficiency of laser processing, and is particularly suitable for applications requiring high precision in measurement equipment.
[0167] Referring to Figure 7, as an example, step S500, adjusting the focus of the first light output module 210 based on the workpiece thickness so that the focus is located on the processing surface, includes:
[0168] Step S520: Based on the thickness of the workpiece, determine the moving distance of the first light output module 210, and control the first light output module 210 to move up or down to adjust the focus of the first light output module 210 so that the focus is located on the processing surface.
[0169] The moving distance of the first light output module 210 is determined based on the workpiece thickness. In this case, it is assumed that the light spot of the first light output module 210 is located at the center (or another position) of the processing platform 100. Based on this assumed position and the workpiece thickness, the distance the first light output module 210 needs to move can be calculated to align the laser focus with the workpiece processing surface of the corresponding thickness. For example, the distance between the first light output module 210 and the workpiece processing surface can be determined based on the workpiece thickness. The moving distance is then the difference between the distance between the processing surface and the first light output module 210 and the focal length of the first light output module 210. This method simplifies the calculation process and directly uses the workpiece thickness to determine the moving distance, making it suitable for applications requiring a certain level of accuracy in workpiece thickness measurement.
[0170] As an example, determining the distance between the workpiece's processed surface and the first light output module 210 based on the target image includes: determining the distance between the workpiece's processed surface and the first light output module 210 based on the descent distance of the first light output module 210 corresponding to the target image. The distance between the workpiece's processed surface and the first light output module 210 can be obtained by summing the descent distance of the first light output module 210 corresponding to the target image with a preset distance (which could be the focal length, or the distance corresponding to the minimum distance between two light spots). This distance is the distance between the first light output module 210 and the workpiece's processed surface when the first light output module 210 is at its origin position.
[0171] As an example, determining the thickness of a workpiece based on a target image includes: determining the distance between the processed surface of the workpiece and the first light output module 210 based on the descent distance of the first light output module 210 corresponding to the target image; and determining the thickness of the workpiece based on the distance between the processed surface of the workpiece and the first light output module 210. The thickness of the workpiece can be obtained by subtracting the distance between the first light output module 210 and the distance between the processed surface of the workpiece and the first light output module 210 from the distance (generally known) between the first light output module 210 at the origin position and the processing base plate.
[0172] In related technologies, contact ranging and Time-of-Flight (TOF) ranging are generally used for focusing. However, contact ranging requires a probe-like detection component to detect the distance between the optical element and the processing platform 100 and adjust the laser focus. TOF ranging adjusts the laser focus by measuring the time of flight of light at a specific frequency. Because additional detection components and ranging hardware are required, the processing cost is high and the operation is more difficult. In this embodiment, through the aforementioned steps S421 or S422, the focus of the first light output module 210 is adjusted by controlling its movement upwards or downwards, so that the focus is on the processing surface, achieving automatic focusing. Unlike contact ranging and TOF ranging in related technologies, the embodiment of this application effectively reduces the use of detection components and additional ranging hardware. Based on the target image, the focus of the first light output module 210 is adjusted so that the focus is on the processing surface of the workpiece, thereby achieving automatic focusing. This reduces manual intervention, effectively reduces operational errors, and lowers the operational difficulty. Controlling the processing after adjusting the focus of the first light output module 210 allows for more precise processing and optimized processing results.
[0173] In this application, the specific implementation process for determining the preset mapping relationship between the coordinate position of the center point of the first light spot 212 and the position of the first light output module 210 is as follows:
[0174] Figures 13 and 14 show that the processing equipment is calibrated at the factory to determine the preset mapping relationship between the coordinate position of the center point of the first light spot 212 and the position of the first light output module 210. For each height calibration, a set of parameters is obtained based on the captured image: the pixel position CX of the center point of the first light spot 212 of the first light output module 210 and the corresponding spatial position (X, Y, Z) of the first light output module 210. This set of parameters is then regrouped. The center point of the first light spot 212 is defined as the illumination point. For example, when performing the calibration process at a certain height, the obtained pixel position Cx of the illumination point and the spatial position (X, Y, Z) of the illumination point constitute a set. This set is then regrouped pairwise by the pixel position of the illumination point and each coordinate value to obtain three sets of parameters: (CX, Z), (X, Z), and (Y, Z). This process is repeated for each height, obtaining three sets of parameters through regrouping. For all heights, the same set of parameters are grouped together, for example, all (CX, Z) are grouped together, and linear fitting is performed, such as performing linear fitting on (CX0, Z0), (CX3, Z3), (CX6, Z6), (CX9, Z9), (CX12, Z12), and (CX15, Z15), adapting to the regrouping, and obtaining the mapping from the spatial position of the illumination point to the coordinate values through the linear fitting. This mapping specifically includes the mapping from the spatial position to the Z-axis coordinate value, the mapping from the X-axis coordinate value to the Z-axis coordinate value, and the mapping from the Y-axis coordinate value to the Z-axis coordinate value, and so on, to obtain the mapping from the pixel position of the illumination point to the spatial position of the illumination point.
[0175] The mapping from the pixel position of the illumination point to its spatial position indicates the coordinate values of the pixel position and the spatial position of the illumination point, as well as the relationship between these coordinate values. This relationship can be characterized by a linear function and its coefficients. Therefore, by linear fitting, the coordinate values of the pixel position and the spatial position of the illumination point, as well as the coefficients of the corresponding linear function between these coordinate values, are obtained. From these coefficients, the corresponding linear function can be determined, thereby obtaining the relationship between the pixel position of the illumination point and the spatial position of the illumination point, that is, the mapping relationship between the coordinate position of the center point of the first light spot 212 and the position of the first light output module 210.
[0176] The linear function obtained by linearly fitting the pixel position CX of the illumination point and a coordinate value, namely the Z-axis coordinate value, is Z = a*CX + b; the linear function obtained by linearly fitting the X-axis coordinate value and the Z-axis coordinate value is X = c*Z + d; and the linear function obtained by linearly fitting the Y-axis coordinate value and the Z-axis coordinate value is Y = e*Z + f. Here, a, b, c, d, and c are coefficients read from the calibration file obtained during the calibration process. Therefore, the coefficients obtained from the linear fitting are extracted to form the calibration file. Correspondingly, in the measurement point measurement, only the calibration file needs to be called to obtain the calibration relationship between the pixel position of the illumination point and the spatial position of the illumination point (i.e., the preset mapping relationship between the coordinate position of the center point of the first light spot 212 and the position of the first light output module 210). Because the illumination point is located above the measurement point in the CNC machine coordinate system, the spatial position of the illumination point is the same as the spatial position of the measurement point. Therefore, in the measurement point measurement performed in this embodiment, only the pixel position of the illumination point needs to be substituted into the above calibration relationship to obtain the spatial position of the measurement point.
[0177] Figures 15 and 16 show schematic diagrams of the fine focusing measurement process. When performing specific calculations, the coefficients are first read from the calibration file, and the formulas are constructed from the read coefficients. That is, the spatial position of the measurement point and a coordinate value Z = a*CX + b are constructed, as well as the linear functions X = c*Z + d and Y = e*Z + f between the coordinate values.
[0178] For the image acquired by the camera module 300, the spatial position CX' is obtained by image recognition of the red dot (the center point of the first light spot 212), and then Z', Y', and x' are calculated sequentially using the constructed linear function. Z', Y', and x' constitute the spatial position of the measurement point (i.e., the position of the first light output module 210). For obtaining the pixel position of the illumination point from the captured image, since the captured image is a description of the illumination point formed by the light beam captured by the camera inside the CNC machine, and the captured illumination point is expressed as pixels in the captured image, image recognition can be performed on the captured image to obtain the pixel where the illumination point is located. Finally, the pixel position of the illumination point is obtained through the pixel position of the captured illumination point. This is how the pixel position of one illumination point is obtained. Similarly, the pixel positions of multiple measurement points corresponding to the multi-point array are obtained through this process using captured images. By measuring the point array, the processing of the workpiece is achieved by measuring several measurement points, more accurately determining the spatial position of the area where the measurement point is located.
[0179] Figures 13 and 15 are used to explain the scheme of this application and should not be construed as limiting the application. In practice, the laser output by the first light output module 210 can be perpendicular to the workpiece, and the camera module 300 can be tilted relative to the workpiece.
[0180] The specific location of the first optical output module 210 of this application can be obtained according to the actual settings and the specific solutions of related technologies, and is not limited here.
[0181] As a specific embodiment of this application, referring to Figures 8, 17, and 18, this application also provides a laser processing device 200, which includes a processing platform 100, a first light output module 210, a second light output module 220, a camera module 300, and a processor 400.
[0182] The processing platform 100 is used to place the workpiece. The first light output module 210 is used to output the first light spot 212. The laser focus of the first light output module 210 is adjustable. The first light output module 210 can be moved up or down. The first light output module 210 is used for laser processing. The second light output module 220 is used to output the second light spot 222 for indication.
[0183] The camera module 300 is used to acquire images of the workpiece, including the first light spot 212 and the second light spot 222, at multiple different distances. The multiple different distances are the distances between the first light output module 210 and the processing platform 100.
[0184] The processor 400 is used to control the movement of the first light output module 210 and to control the operation of the camera module 300 to implement the autofocus method of the laser processing equipment 200 as described above.
[0185] A laser or similar device is used as the first light output module 210, which outputs a first light spot 212 for laser processing to the workpiece. The first light output module 210 can move vertically up or down relative to the processing platform 100 to accommodate workpieces of different thicknesses. The second light output module 220 can be, but is not limited to, emitting infrared or ultraviolet light, or outputting one or more colored light spots such as red, blue, or yellow as a second light spot 222 onto the workpiece. The second light spot 222 is mainly used as a position reference. The camera module 300 is used to acquire images of the workpiece, including the first light spot 212 and the second light spot 222, at multiple different distances during the movement of the first light output module 210. The camera module 300 may optionally include a camera (such as a complementary metal-oxide-semiconductor camera (CMOS camera) or a charge-coupled device (CCD camera), a lens, an image acquisition card, etc. The camera module 300 can be specifically set in the light output module (first light output module 210, second light output module 220) or in any other location such as on the laser processing equipment 200 or outside the laser processing equipment 200. It is used to acquire images such as the captured image of the workpiece or the processing platform 100. The images acquired by the camera module 300 can be directly displayed through the user interface, and different colors can be used to represent the first light spot 212 projected onto the workpiece by the first light output module 210 and the second light spot 222 output onto the workpiece by the second light output module 220. To distinguish the light spots output to the workpiece by the first light output module 210 and the second light output module 220, the first light output module 210 and the second light output module 220 can be set to output the first light spot 212 and the second light spot 222 with different colors, or the camera module 300 can automatically display the two light spots with different colors after recognizing the first light spot 212 and the second light spot 222; the specific settings can be determined according to actual conditions and are not limited here.
[0186] The processor 400 controls the movement of the first light output module 210 and the operation of the camera module 300. It processes the image data fed back by the camera module 300, determines the optimal laser focus position, and sends control signals to the first light output module 210 to adjust its focus and achieve automatic focusing. Specifically, the processor 400 controls the first light output module 210 to descend and acquires multiple images of the workpiece, including the first light spot 212 and the second light spot 222, at different distances collected by the camera module 300. This information is used to determine the different positions of the first light spot 212 and the second light spot 222 output to the workpiece at different distances. The processor 400 also acquires the image with the smallest distance between the first light spot 212 and the second light spot 222 from among the multiple images and uses it as the target image. Based on the target image, it determines the distance between the processed surface of the workpiece and the first light output module 210, or the thickness of the workpiece.
[0187] In some examples, the processor 400 is also used to adjust the focus of the first light output module 210 based on the distance between the workpiece's machined surface and the first light output module 210, or the thickness of the workpiece, so that the focus is located on the workpiece's machined surface.
[0188] In this way, automatic focusing can be achieved, which can effectively reduce operational errors by reducing human intervention, enabling precise processing and optimizing processing results.
[0189] In some embodiments, the processor 400 can control the movement of the first light output module 210 and the operation of the camera module 300 based on processing instructions sent by the terminal device 700, so as to achieve autofocus. Specifically, it can be based on the embodiments of the autofocus method described above.
[0190] In some examples, the processor 400 is also used to: calculate the distance between the processed surface of the workpiece and the first light output module 210, or the thickness of the workpiece, based on the position information of the first light spot 212 in the target image. In some examples, the processor 400 is also used to: use the distance between the first light output module 210 corresponding to the target image and the workpiece as the focusing distance, and adjust the focus of the first light output module 210 based on the focusing distance so that the focus is located on the processed surface of the workpiece.
[0191] In some examples, the processor 400 is also used to: identify a first spot 212 and a second spot 222 in each image; calculate the distance between the first spot 212 and the second spot 222 in each image based on the center point of the first spot 212 and the center point of the second spot 222 in each image; and acquire a target image based on the distance between the first spot 212 and the second spot 222 in multiple images.
[0192] In one embodiment, the direction in which the first light output module 210 outputs the first light spot 212 is perpendicular to the surface of the processing platform 100, and the direction in which the second light output module 220 outputs the second light spot 222 forms an angle with the surface of the processing platform 100.
[0193] The first light beam 211 (such as a laser beam) output by the first light output module 210 is perpendicular to the surface of the processing platform 100. The first light beam 211 is output onto the workpiece to form a first light spot 212. This is intended to ensure that the laser energy is concentrated to a single point on the workpiece to achieve precise laser processing operations such as cutting, welding, and drilling. The perpendicular output direction helps maintain the stability and accuracy of the laser beam, while reducing energy loss and processing errors caused by angular deviations. The second light spot 222 (such as infrared, ultraviolet, or colored light spot) output by the second light output module 220 forms a certain angle with the surface of the processing platform 100. This angle causes the second light spot 222 to form a mark on the workpiece processing surface that distinguishes it from the first light spot 212. This allows the operator or the equipment itself to identify and adjust the position of the first light output module 210 accordingly, thereby precisely adjusting its focus.
[0194] Referring to Figures 17 and 18, in one embodiment, the laser processing equipment 200 further includes a laser head 230, and a first light output module 210 and a second light output module 220 are integrated within the laser head 230.
[0195] Integrating the first light output module 210 and the second light output module 220 into the laser head 230 significantly reduces the overall size of the equipment, making the laser processing equipment 200 more compact and lightweight. The lenses and other mechanisms configured in the laser head 230 also help to achieve beam collimation and focusing, ensuring that the first beam 211 and the second beam 221 can be efficiently and centrally guided to the workpiece surface to form a clear light spot, thereby reducing beam loss during transmission and improving energy utilization. Furthermore, the integrated design facilitates integrated control of the position and angle of the first light output module 210 and the second light output module 220, simplifying operation procedures and reducing operational errors.
[0196] Referring to Figures 17 and 18, in one embodiment, the laser processing equipment 200 further includes a lifting module 500, which is connected to the laser head 230 for driving the laser head 230 to move up or down; or, the lifting module 500 is used to drive the first light output module 210 to move up or down.
[0197] The first optical output module 210 and the second optical output module 220 of this application can be either relatively independently configured or integrated into the same laser head 230. The lifting module 500 can optionally be used to individually move the first optical output module 210 upwards or downwards to obtain multiple images including the first optical output module 210 and the second optical output module 220 at multiple different distances; alternatively, the lifting module 500 can be used to move the first optical output module 210 and the second optical output module 220 upwards or downwards respectively; alternatively, when the first optical output module 210 and the second optical output module 220 are integrated into the laser head 230, the lifting module 500 is connected to the laser head 230 and can simultaneously move the first optical output module 210 and the second optical output module 220 upwards or downwards while moving the laser head 230 upwards or downwards.
[0198] Taking the lifting module 500 driving the laser head 230 to move or descend as an example, the lifting module 500 can be specifically located on the processing platform 100 or other positions of the laser processing equipment 200, and is connected to the laser head 230 for transmission, so as to drive the laser head 230 to move closer to or away from the processing platform 100. The direction of the first light output module 210 outputting the first light spot 212 is perpendicular to the surface of the processing platform 100, and the direction of the second light output module 220 outputting the second light spot 222 forms an angle with the surface of the processing platform 100. The processor 400 is connected to the lifting module 500 and is used to control the lifting module 500 to drive the laser head 230 to move, so as to adjust the distance between the first light output module 210 and the processing platform 100. The lifting module 500 can be equipped with a guide rail, conveyor belt, slider, pull rod, push-pull structure or other devices that can be used to drive the laser head 230 to move, and the specific design can be determined according to actual needs, without limitation here. The embodiment in which the lifting module 500 drives the first light output module 210 and the second light output module 220 to move up or down can be referred to the above-mentioned related embodiments and will not be repeated here.
[0199] In one embodiment, the laser processing equipment 200 further includes a storage module for storing a preset mapping relationship; and / or for storing the coordinate position (X coordinate and / or Y coordinate) of the center point of the first light spot 212 and the position information of the first light output module 210 corresponding to the coordinate position of the center point of the first light spot 212 (such as the distance between the processing surface of the workpiece and the first light output module 210, the thickness of the workpiece, etc.).
[0200] The first light output module 210 is controlled to descend, and the camera module 300 acquires images of the workpiece, including the first light spot 212 and the second light spot 222, at different distances. The multiple images obtained can also be stored in the storage module; this is not limited here.
[0201] The specific implementation of the laser processing equipment 200 shown in this application refers to the aforementioned automatic focusing method. Since the laser processing equipment 200 adopts all the technical solutions of all the above embodiments, it has at least all the beneficial effects brought about by the technical solutions of the above embodiments, so it will not be described in detail here.
[0202] Referring to FIG9, this application also provides an autofocus device 600 for a laser processing equipment 200. The laser processing equipment 200 includes a first light output module 210 and a second light output module 220. The first light output module 210 is used to output a light spot for laser processing, and the second light output module 220 is used to output a light spot for indication. The autofocus device 600 includes a light output control module 610, an image acquisition module 620, and a focus adjustment module 630.
[0203] The light output control module 610 is used to: control the first light output module 210 to output a first light spot 212 to the workpiece, and control the second light output module 220 to output a second light spot 222 to the workpiece; it is also used to control the first light output module 210 to descend. The light output control module 610 is used to control the output states of the first light output module 210 and the second light output module 220, and by controlling the moving actions of the first light output module 210 (descending and ascending), it helps the image acquisition module 620 acquire light spot images at different distances.
[0204] The image acquisition module 620 is used to: acquire images of the workpiece, including the first light spot 212 and the second light spot 222, at multiple distances when the first light output module 210 descends, thus obtaining multiple images; and to acquire the image with the smallest distance between the first light spot 212 and the second light spot 222 among the multiple images, and use it as the target image. The image acquisition module 620 is also used to: acquire images of the workpiece, including the first light spot 212 and the second light spot 222, at multiple distances during the descent of the first light output module 210, and obtain the target image by identifying the image with the smallest distance between the first light spot 212 and the second light spot 222, thereby aiding in further autofocus.
[0205] The focus adjustment module 630 is used to: determine the distance between the workpiece's processed surface and the first light output module 210, or the workpiece's thickness, based on the target image.
[0206] The focus adjustment module 630 is also used to: adjust the focus of the first light output module 210 based on the distance between the workpiece's processed surface and the first light output module 210, or the thickness of the workpiece, so that the focus is located on the workpiece's processed surface. Based on the target image provided by the image acquisition module 620, the focus adjustment module 630 calculates the distance and direction that the focus needs to be adjusted according to the positional relationship between the first light spot 212 and the second light spot 222 in the target image, and then drives the first light output module 210 to make corresponding adjustments to adjust the focus position of the first light output module 210 so that the focus is accurately located on the workpiece's processed surface.
[0207] In this way, automatic focusing can be achieved, reducing manual intervention, effectively reducing operational errors, and lowering the difficulty of operation. After adjusting the focus of the first light output module 210, the processing can be controlled to achieve more precise processing and optimize the processing effect.
[0208] In some examples, the focus adjustment module 630 is also used to: calculate the distance between the workpiece's processing surface and the first light output module 210, or the thickness of the workpiece, based on the position information of the first light spot 212 in the target image; and adjust the focus of the first light output module 210 so that the focus is located on the processing surface, based on the distance between the workpiece's processing surface and the first light output module 210, or the thickness of the workpiece.
[0209] In some examples, the focus adjustment module 630 is also used to: obtain the X coordinate and / or Y coordinate of the center point of the first light spot 212 in the target image; and calculate the distance between the processed surface of the workpiece and the first light output module 210, or the thickness of the workpiece, based on the X coordinate and / or Y coordinate of the center point of the first light spot 212 and a preset mapping relationship.
[0210] In some examples, the image acquisition module 620 is also used to: if there is an image in which the center point of the first spot 212 and the center point of the second spot 222 coincide, then that image is determined as the image with the smallest distance; if there is no image in which the center point of the first spot 212 and the center point of the second spot 222 coincide, then the image with the smallest distance is obtained based on the distance between the first spot 212 and the second spot 222 in each image.
[0211] In some examples, the image acquisition module 620 is also used to: identify a first spot 212 and a second spot 222 in each image; calculate the distance between the first spot 212 and the second spot 222 in each image based on the center point of the first spot 212 and the center point of the second spot 222 in each image; and acquire a target image based on the distance between the first spot 212 and the second spot 222 in multiple images.
[0212] The aforementioned modules can be implemented using a general-purpose computing device, or can be modules within a general-purpose computing device. A general-purpose computing device typically includes a processor 400 and a memory. The memory stores instructions, which, when executed by the processor 400, cause the computing device to execute the steps or program modules of this application. These can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using device-executable program code, thereby allowing them to be stored in a storage device for execution by the computing device. In some cases, the steps shown or described can be executed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. This invention is not limited to any particular hardware and software combination.
[0213] The specific implementation of the autofocus device 600 of the laser processing equipment 200 shown in this application refers to the aforementioned laser processing equipment 200. Since the autofocus device 600 adopts all the technical solutions of all the above embodiments, it has at least all the beneficial effects brought about by the technical solutions of the above embodiments, so it will not be described in detail here.
[0214] This application also provides a laser processing system 1000. Please refer to FIG19. FIG19 is a structural schematic diagram of an embodiment of the laser processing system 1000 provided in this application. The laser processing system 1000 includes a laser processing device 200 and a terminal device 700.
[0215] The laser processing equipment 200 includes a first light output module 210, a second light output module 220, and a camera module 300. The first light output module 210 is used to output a light spot for laser processing, and the second light output module 220 is used to output a light spot for indication. The laser focus of the first light output module 210 is adjustable.
[0216] The terminal device 700 is used to control the first light output module 210 to output the first light spot 212 to the workpiece and to control the second light output module 220 to output the second light spot 222 to the workpiece; control the first light output module 210 to descend and control the camera module 300 to acquire multiple images of the workpiece including the first light spot 212 and the second light spot 222 at multiple different distances, and obtain multiple images; acquire the image with the smallest distance between the first light spot 212 and the second light spot 222 among the multiple images, and use it as the target image; based on the target image, determine the distance between the processed surface of the workpiece and the first light output module 210, or the thickness of the workpiece.
[0217] The terminal device 700 is also used to: adjust the focus of the first light output module 210 based on the distance between the workpiece's processed surface and the first light output module 210, or the thickness of the workpiece, so that the focus is located on the workpiece's processed surface.
[0218] The terminal device 700 receives input commands from the user via control buttons, touchscreen, keyboard, mouse, or other input devices. Based on the received input commands, it issues corresponding focusing commands to the laser processing equipment 200. The lifting module 500, camera module 300, and other components of the laser processing equipment 200 then execute corresponding operations to achieve one-click automatic focusing. Specifically, the terminal device 700 controls the output states of the first light output module 210 and the second light output module 220, including on / off states, output intensity, and spot position. This ensures that the first light spot 212 used for laser processing and the second light spot 222 used for indication can be accurately projected onto the workpiece's processing surface. The terminal device 700 also controls the descent of the first light output module 210 by issuing lifting control commands. In some other embodiments, the terminal device 700 also controls the ascent of the first light output module 210. During the process of controlling the first light output module 210 to move upward or downward, the terminal device 700 sends a collection command to the camera module 300, triggering the camera module 300 to start collecting and acquiring images of the workpiece, including the first light spot 212 and the second light spot 222, at different distances. The terminal device 700 receives the image data collected by the camera module 300 and processes and analyzes it. Specifically, the terminal device 700 identifies the positions of the first light spot 212 and the second light spot 222 based on the acquired images, calculates the distance between them, and finds the image with the smallest distance (the target image). The terminal device 700 is also used to calculate the distance and direction that the first light output module 210 needs to adjust based on the positional relationship between the first light spot 212 and the second light spot 222 in the target image. The terminal device 700 sends the focus adjustment command to the first light output module 210 and controls it to make corresponding adjustments so that the focus is accurately located on the processing surface of the workpiece.
[0219] The modules in the laser processing equipment 200 work together with the terminal equipment 700 to achieve automatic focusing and precise processing functions in laser processing. This not only improves processing accuracy and efficiency but also reduces the difficulty of operation. By adjusting the focus of the first light output module 210, processing can be controlled to achieve more precise processing and optimize the processing effect.
[0220] The terminal device 700 can control various modules in the laser processing equipment 200 based on the autofocus method provided in the above embodiments, thereby achieving autofocus. Specifically, during the autofocus process, the terminal device 700 can send autofocus commands to the laser processing equipment 200, thereby controlling each module.
[0221] This application also provides a computer-readable storage medium storing an autofocus program that, when executed by a processor 400, implements the autofocus method of the laser processing equipment 200 as described above.
[0222] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0223] The aforementioned computer-readable storage medium may be included in a computer device or may exist independently and not assembled into a computer device.
[0224] The aforementioned computer-readable storage medium carries one or more programs. When the aforementioned one or more programs are executed by a computer device, the computer device causes the computer device to: control the first light output module 210 to output a first light spot 212 to the workpiece, and control the second light output module 220 to output a second light spot 222 to the workpiece; control the first light output module 210 to descend and acquire multiple images of the workpiece including the first light spot 212 and the second light spot 222 at multiple different distances, thereby obtaining multiple images; acquire the image with the smallest distance between the first light spot 212 and the second light spot 222 among the multiple images, and use it as the target image; and adjust the focus of the first light output module 210 based on the target image so that the focus is located on the processing surface of the workpiece.
[0225] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0226] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0227] The modules involved in the embodiments of this application can be implemented in software or hardware. The name of the module does not, in some cases, constitute a limitation on the unit itself.
[0228] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the autofocus method of the laser processing equipment 200 described above, which can solve the problem of inability to autofocus. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the autofocus method of the laser processing equipment 200 provided in the above embodiments, and will not be repeated here.
[0229] This application also provides a computer device, which includes: at least one processor 400; and a memory communicatively connected to the at least one processor 400; wherein the memory stores an autofocus program that can be executed by the at least one processor 400, the autofocus program being executed by the at least one processor 400 to enable the at least one processor 400 to execute the autofocus method of the laser processing equipment 200 in the above embodiments.
[0230] The computer devices in this application embodiment may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. The computer devices shown in this application are merely examples and should not be construed as limiting the functionality and scope of use of the embodiments in this application.
[0231] Computer devices may include control components such as processing units (e.g., central processing unit, graphics processing unit, etc.), which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) or loaded from storage devices into random access memory (RAM). RAM also stores various programs and data required for the operation of the computer device. The processing unit, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus. Typically, the following systems can be connected to the I / O interface: input devices including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices including, for example, magnetic tape, hard disks, etc.; and communication devices. Communication devices allow the computer device to communicate wirelessly or wiredly with other devices to exchange data.
[0232] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processing device, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0233] The computer device provided in this application employs the autofocus method of the laser processing equipment 200 in the above embodiments to solve the problem of inability to autofocus. Compared with the prior art, the beneficial effects of the computer device provided in this application are the same as those of the autofocus method of the laser processing equipment 200 provided in the above embodiments, and other technical features of this computer device are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.
[0234] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0235] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0236] This application also provides a computer program product, including a computer program that, when executed by a processor 400, implements the steps of the autofocus method of the laser processing equipment 200 as described above.
[0237] The computer program product provided in this application can solve the technical problem of inability to autofocus. Compared with the prior art, the beneficial effects of the computer program product provided in the embodiments of this application are the same as the beneficial effects of the autofocus method of the laser processing equipment 200 provided in the above embodiments, and will not be repeated here.
[0238] The above description is merely an optional embodiment of this application and does not limit the patent scope of this application. Any equivalent structural transformations made based on the inventive concept of this application and the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included within the patent protection scope of this application.
Claims
1. An automatic focusing method for laser processing equipment, wherein, The laser processing equipment includes a first light output module and a second light output module. The first light output module is used to output a laser spot for laser processing, and the second light output module is used to output a light spot for indication. The automatic focusing method includes: Control the first light output module to output a first light spot to the workpiece, and control the second light output module to output a second light spot to the workpiece; The first light output module is controlled to descend, and images of the workpiece including the first light spot and the second light spot are acquired at multiple different distances to obtain multiple images; The image with the smallest distance between the first spot and the second spot among the plurality of images is selected as the target image; Based on the target image, determine the distance between the processed surface of the workpiece and the first light output module, or the thickness of the workpiece.
2. The automatic focusing method for laser processing equipment as described in claim 1, wherein, After determining the distance between the processed surface of the workpiece and the first light output module, or the thickness of the workpiece, based on the target image, the focusing method further includes: Based on the distance between the workpiece's processed surface and the first light output module, or the thickness of the workpiece, the focus of the first light output module is adjusted so that the focus is located on the processed surface.
3. The automatic focusing method for laser processing equipment as described in claim 2, wherein, Based on the distance between the processed surface of the workpiece and the first light output module, the focus of the first light output module is adjusted so that the focus is located on the processed surface, including: Based on the distance between the workpiece's processed surface and the first light output module, the moving distance of the first light output module is determined, and the first light output module is controlled to move upward or downward to adjust the focus of the first light output module so that the focus is located on the processed surface.
4. The automatic focusing method for laser processing equipment as described in claim 2, wherein, Based on the thickness of the workpiece, adjusting the focus of the first light output module so that the focus is located on the processing surface includes: Based on the thickness of the workpiece, the moving distance of the first light output module is determined, and the first light output module is controlled to move up or down to adjust the focus of the first light output module so that the focus is located on the processing surface.
5. The automatic focusing method for laser processing equipment as described in claim 1, wherein, Determining the distance between the processed surface of the workpiece and the first light output module, or the thickness of the workpiece, based on the target image, includes: Based on the position information of the first light spot in the target image, the distance between the processed surface of the workpiece and the first light output module, or the thickness of the workpiece, is calculated.
6. The automatic focusing method for laser processing equipment as described in claim 5, wherein, Based on the position information of the first light spot in the target image, the distance between the processed surface of the workpiece and the first light output module, or the thickness of the workpiece, is calculated, including: Obtain the X and / or Y coordinates of the center point of the first light spot in the target image; Based on the X and / or Y coordinates of the center point of the first light spot and a preset mapping relationship, the distance between the processed surface of the workpiece and the first light output module, or the thickness of the workpiece, is calculated.
7. The automatic focusing method for laser processing equipment as described in claim 1, wherein, Based on the target image, determining the distance between the processed surface of the workpiece and the first light output module includes: Based on the descent distance of the first light output module corresponding to the target image, the distance between the processed surface of the workpiece and the first light output module is determined; or, Determining the thickness of the workpiece based on the target image includes: Based on the descent distance of the first light output module corresponding to the target image, the distance between the processed surface of the workpiece and the first light output module is determined; The thickness of the workpiece is determined based on the distance between the machined surface of the workpiece and the first light output module.
8. The automatic focusing method of the laser processing equipment as described in any one of claims 1 to 7, wherein, The step of obtaining the image with the smallest distance between the first spot and the second spot among the plurality of images includes: If there is an image among the plurality of images in which the center point of the first spot and the center point of the second spot coincide, then that image is determined as the image with the smallest distance. If there is no image in the plurality of images in which the center point of the first spot and the center point of the second spot coincide, then the image with the smallest distance is obtained based on the distance between the first spot and the second spot in each of the images.
9. The automatic focusing method of the laser processing equipment as described in any one of claims 1 to 7, wherein, The step of acquiring the image with the smallest distance between the first spot and the second spot among the plurality of images, and using it as the target image, includes: Identify the first spot and the second spot in each of the images; Based on the center point of the first spot and the center point of the second spot in each image, calculate the distance between the first spot and the second spot in each image; The target image is obtained based on the distance between the first spot and the second spot in multiple images.
10. The automatic focusing method for laser processing equipment as described in claim 9, wherein, The step of calculating the distance between the first spot and the second spot in each image based on the center point of the first spot and the center point of the second spot in each image includes: Obtain the first target pixel in the set of pixels corresponding to the first spot in the image, wherein the pixel value of the first target pixel is greater than the first pixel threshold, and obtain the coordinates of each first target pixel. Calculate the average coordinates of all the first target pixels to obtain the coordinates of the center point of the first spot in the image. Obtain the second target pixel from the set of pixels corresponding to the second spot in the image. The pixel value of the second target pixel is greater than the second pixel threshold. Obtain the coordinates of each second target pixel. Calculate the average coordinates of all second target pixels to obtain the coordinates of the center point of the second spot in the image. Based on the coordinates of the center point of the first light spot and the center point of the second light spot in the image, the distance between the first light spot and the second light spot in the image is calculated.
11. An automatic focusing device for laser processing equipment, wherein, The laser processing equipment includes a first light output module and a second light output module. The first light output module is used to output a laser spot for laser processing, and the second light output module is used to output a light spot for indication. The automatic focusing device includes: The light output control module is used to control the first light output module to output a first light spot to the workpiece, and to control the second light output module to output a second light spot to the workpiece; it is also used to control the first light output module to descend. The image acquisition module is used to acquire images of the workpiece, including the first light spot and the second light spot, at multiple distances when the first light output module descends, thereby obtaining multiple images; and to acquire the image with the smallest distance between the first light spot and the second light spot among the multiple images, and use it as the target image. The focus adjustment module is used to determine the distance between the processed surface of the workpiece and the first light output module, or the thickness of the workpiece, based on the target image.
12. A laser processing device, wherein, include: A processing platform is used to place workpieces; The first light output module is used to output a first light spot. The laser focus of the first light output module is adjustable. The first light output module can be moved up or down. The first light output module is used for laser processing. The second light output module is used to output a second light spot for indication; The camera module is used to acquire images of the workpiece, including the first light spot and the second light spot, at multiple different distances, wherein the multiple different distances are the distance between the first light output module and the processing platform; A processor, the processor being configured to control the movement of the first light output module and to control the operation of the camera module, for implementing the automatic focusing method of the laser processing equipment as described in any one of claims 1 to 10.
13. The laser processing equipment as described in claim 12, wherein, The first light output module outputs the first light spot in a direction perpendicular to the surface of the processing platform, and the second light output module outputs the second light spot in a direction that forms an angle with the surface of the processing platform.
14. The laser processing equipment as described in claim 12, wherein, The laser processing equipment also includes a laser head, and the first optical output module and the second optical output module are integrated inside the laser head.
15. The laser processing equipment as described in claim 14, wherein, The laser processing equipment also includes a lifting module; wherein... The lifting module is connected to the laser head drive to drive the laser head to move upward or downward; or, The lifting module is used to move the first optical output module up or down.
16. The laser processing apparatus according to any one of claims 12 to 15, wherein, The processor is also used for: Based on the distance between the workpiece's processed surface and the first light output module, or the thickness of the workpiece, the focus of the first light output module is adjusted so that the focus is located on the processed surface.
17. The laser processing apparatus according to any one of claims 12 to 15, wherein, The processor is also used for: Based on the position information of the first light spot in the target image, the distance between the processed surface of the workpiece and the first light output module, or the thickness of the workpiece, is calculated.
18. The laser processing apparatus according to any one of claims 12 to 15, wherein, The processor is also used for: The distance between the first light output module corresponding to the target image and the workpiece is used as the focusing distance, and the focus of the first light output module is adjusted based on the focusing distance so that the focus is located on the processing surface of the workpiece.
19. The laser processing apparatus according to any one of claims 12 to 15, wherein, The processor is also used for: Identify the first spot and the second spot in each of the images; Based on the center point of the first spot and the center point of the second spot in each image, calculate the distance between the first spot and the second spot in each image; The target image is obtained based on the distance between the first spot and the second spot in multiple images.
20. A laser processing system, wherein, include: A laser processing device, comprising a first light output module, a second light output module, and a camera module, wherein the first light output module is used to output a light spot for laser processing, the second light output module is used to output a light spot for indication, and the laser focus of the first light output module is adjustable; The terminal device is configured to: control the first light output module to output a first light spot to the workpiece, and control the second light output module to output a second light spot to the workpiece; control the first light output module to descend, and control the camera module to acquire images of the workpiece including the first light spot and the second light spot at multiple different distances, thereby obtaining multiple images; and acquire the image with the smallest distance between the first light spot and the second light spot among the multiple images, and use it as the target image. Based on the target image, determine the distance between the processed surface of the workpiece and the first light output module, or the thickness of the workpiece.
21. A computer-readable storage medium having an autofocus program stored thereon, wherein, When the autofocus program is executed by the processor, it implements the autofocus method of the laser processing equipment according to any one of claims 1 to 10.
Citation Information
Patent Citations
Distance-measurement focusing method applied for laser cutting processing
CN101422848A
Focusing positioning method based on initial laser processing position and laser processing device
CN101856773A
Dot line overlapping focusing auxiliary system and auxiliary focusing method thereof
CN106695129A
Optical axis light based laser marking machine automatic focusing method and focusing device
CN108262557A
Automatic focusing device for laser beams
CN204430557U