Laser focus dynamic tracking method and system based on image super-resolution
Through the laser focus dynamic tracking method based on image super-resolution, the problem of real-time precise control of laser focus in laser processing is solved, and high accuracy tracking of laser focus is achieved, and the processing effect is improved.
Patent Information
- Application Number
- CN202510236712.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2045-02-28
AI Technical Summary
During laser processing, it is difficult for the prior art to achieve real-time precise control of the laser focus, resulting in a change in the defocus amount that affects the concentration of laser energy and the processing effect.
The laser focus dynamic tracking method based on image super-resolution is adopted. By acquiring the laser focus spot image and the corresponding defocus amount of continuous frames, the attention mechanism is used to enhance the image, extract edge pixel points, optimize circular parameters, determine the linear relationship between the defocus amount and the optimal radius, perform filtering and feedback adjustments, and optimize the dynamic tracking performance of the laser focus.
It improves the accuracy of laser focus dynamic tracking, reduces the impact of noise, ensures the precise concentration of laser energy, and improves the processing effect.
Smart Images

Figure CN120147132A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of dynamic tracking, and particularly to a method and system for dynamically tracking a laser focus based on image super-resolution. Background Art
[0002] Laser processing has the characteristics of high processing accuracy, high automation, strong flexibility, non-contact, etc., and is widely used in industries such as aerospace, shipbuilding, automotive manufacturing, and electronic power. During the laser processing process, in order to ensure that the energy is concentrated and achieve the best cutting, welding or other processing effects, the laser beam needs to be precisely focused on a specific position of the workpiece. To achieve this precise focusing, it is necessary to control the defocus amount. The defocus amount refers to the relative position between the laser focus and the processing object, including two cases of positive defocus and negative defocus. Considering that the change in the defocus amount will directly affect the concentration degree of the laser energy and the processing effect, therefore, real-time and precise control of the defocus amount is of great significance for high-precision laser processing. Summary of the Invention
[0003] The present invention provides a method and system for dynamically tracking a laser focus based on image super-resolution to solve existing problems.
[0004] The object of the present invention can be achieved by the following technical solutions: The first aspect of the present invention is to provide a method for dynamically tracking a laser focus based on image super-resolution, including: Obtaining consecutive frames of laser focus spot images and corresponding defocus amounts; Enhancing the laser focus spot images through the attention mechanisms of different modules, and denoting the enhanced image as a high-resolution reconstructed image; extracting edge pixel points of the high-resolution reconstructed image to obtain a number of edge pixel points, and optimizing the circular parameters for all edge pixel points in each high-resolution reconstructed image to obtain the optimal radius of the circle; determining the linear relationship between the defocus amount and the optimal radius through the defocus amounts and the optimal radii corresponding to all frames of laser focus spot images; Filtering the defocus amount of each frame through the linear relationship between the defocus amount and the optimal radius and the defocus amounts corresponding to consecutive frames of laser focus spot images to obtain the filtered defocus amount of each frame; Feedback-adjusting the position of the laser head through the difference between the filtered defocus amount of each frame and the target defocus amount to optimize the dynamic tracking performance of the laser focus; wherein, the target defocus amount is a preset value.
[0005] Further, the enhancing the laser focus spot images through the attention mechanisms of different modules and denoting the enhanced image as a high-resolution reconstructed image includes: Downsample the laser focus spot image, and denote the downsampled image as the low-resolution image; Use the low-resolution images of consecutive frames and the corresponding laser focus spot images as the dataset for training the super-resolution reconstruction network to train the super-resolution reconstruction network and obtain the trained super-resolution reconstruction network; According to the low-resolution image, obtain the high-resolution reconstructed image through the trained super-resolution reconstruction network. Among them, multiple GCAF modules are used in the super-resolution reconstruction network for feature extraction to obtain the deep fusion feature image; Use the bicubic interpolation method to interpolate the low-resolution image to obtain the interpolated feature image; Finally, add the deep fusion feature image and the interpolated feature image to obtain the high-resolution reconstructed image; Among them, in each GCAF module, deep feature extraction is performed by using the feature extraction method of three paths; The first path is not processed, the second path is processed by the GCNet module, and the third path is processed by the CBAM module; Among them, first fuse the results processed by the GCNet module and the CBAM module to obtain the module fusion result, and finally fuse the module fusion result with the result without processing to obtain the result processed by each GCAF module.
[0006] Further, extracting the edge pixel points of the high-resolution reconstructed image to obtain a number of edge pixel points includes: Grayscale the high-resolution reconstructed image to obtain the laser focus spot grayscale image; According to the laser focus spot grayscale image, use the Canny edge detection algorithm to obtain the edge pixel points in the laser focus spot grayscale image and obtain a number of edge pixel points.
[0007] Further, optimizing the circular parameters for all edge pixel points in each high-resolution reconstructed image to obtain the optimal radius of the circle includes: Take the bottom left pixel point in the laser focus spot grayscale image as the coordinate origin, with the horizontal direction to the right as the horizontal axis and the vertical direction upward as the vertical axis to construct an image coordinate system, obtain the coordinate positions of all edge pixel points in the image coordinate system, take the median of the horizontal values of all edge pixel points as the horizontal value of the initial center, and take the median of the vertical values of all edge pixel points as the vertical value of the initial center; Calculate the Manhattan distance between any two points in the image coordinate system, and take half of the maximum Manhattan distance as the initial radius; Optimize the radius of the circle according to the initial center and the initial radius through the nonlinear least squares method to obtain the optimal radius of the circle.
[0008] Further, determining the linear relationship between the defocus amount and the optimal radius through the defocus amount and the optimal radius corresponding to the laser focus spot images of all frames includes: Taking the defocus amount corresponding to each gray-scale image of the laser focus spot as one dimension and the optimal radius corresponding to each gray-scale image of the laser focus spot as another dimension, a relationship feature space is constructed. The defocus amounts and optimal radii corresponding to all the gray-scale images of the laser focus spots are mapped in the relationship feature space to obtain a number of data points. A linear equation of a first-degree polynomial is used for the number of data points in the relationship feature space, and linear fitting is performed by the least squares method to obtain the linear relationship between the defocus amount and the optimal radius.
[0009] Further, filtering the defocus amount of each frame by using the linear relationship between the defocus amount and the optimal radius and the defocus amount corresponding to the laser focus spot images of consecutive frames to obtain the defocus amount of each frame after filtering, including: Taking the time sequence as the horizontal axis and the defocus amount as the vertical axis, a filtering space is constructed; according to the optimal radius determined by the gray-scale image of the previous frame of the laser focus spot, the defocus amount corresponding to the previous frame is inversely deduced through the linear relationship between the defocus amount and the optimal radius, and the initial state vector is determined through the filtering space according to the inversely deduced defocus amount corresponding to the previous frame; Predicting according to the initial state vector and the initial error covariance matrix to obtain the predicted defocus amount of the next frame; then obtaining the actually collected defocus amount, obtaining the Kalman gain through the initial error covariance matrix according to the defocus amount collected in the next frame and the predicted defocus amount, filtering the defocus amount through the Kalman gain, the defocus amount collected in the next frame and the predicted defocus amount, and updating the state vector and the error covariance matrix to obtain the defocus amount of the next frame after filtering, the updated state vector and the error covariance matrix; filtering the defocus amount of each subsequent frame through the defocus amount of the next frame after filtering, the updated state vector and the error covariance matrix; Wherein, the initial error covariance matrix is a preset matrix.
[0010] Further, optimizing the dynamic tracking performance of the laser focus by feedback-adjusting the position of the laser head according to the difference between the defocus amount of each frame after filtering and the target defocus amount, including: Adjusting the position of the laser head through the difference between the defocus amount of each frame after filtering and the target defocus amount by using the PID control algorithm, that is, controlling the defocus amount by adjusting the position of the laser head; and returning the execution result of the position adjustment of the laser head to the system through a feedback loop, so as to realize the closed-loop control of the system.
[0011] The second aspect of the present invention is to provide a laser focus dynamic tracking system based on image super-resolution, including: A data acquisition module: used to acquire consecutive frames of laser focus spot images and the corresponding defocus amounts; Image enhancement and optimization module: used to enhance the laser focus spot image through the attention mechanisms of different modules, and record the enhanced image as the high-resolution reconstructed image; extract the edge pixel points of the high-resolution reconstructed image to obtain a number of edge pixel points, and optimize the circular parameters for all the edge pixel points in each high-resolution reconstructed image to obtain the optimal radius of the circle; determine the linear relationship between the defocus amount and the optimal radius based on the defocus amounts and the optimal radii corresponding to all frames of the laser focus spot images. Filtering module: used to filter the defocus amount of each frame based on the linear relationship between the defocus amount and the optimal radius and the defocus amounts corresponding to consecutive frames of the laser focus spot images, so as to obtain the filtered defocus amount of each frame. Adjustment and control module: used to perform feedback adjustment on the position of the laser head based on the difference between the filtered defocus amount of each frame and the target defocus amount, so as to optimize the dynamic tracking performance of the laser focus; where the target defocus amount is a preset value.
[0012] The third aspect of the present invention is to provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for dynamically tracking the laser focus based on image super-resolution is implemented.
[0013] The fourth aspect of the present invention is to provide a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the method for dynamically tracking the laser focus based on image super-resolution is implemented.
[0014] Compared with the prior art, the beneficial effects of the present invention are as follows: enhancing the laser focus spot image through the attention mechanisms of different modules, and recording the enhanced image as the high-resolution reconstructed image to improve the acquisition of image detail feature information; extracting the edge pixel points of the high-resolution reconstructed image to obtain a number of edge pixel points, and optimizing the circular parameters for all the edge pixel points in each high-resolution reconstructed image to obtain the optimal radius of the circle; determining the linear relationship between the defocus amount and the optimal radius based on the defocus amounts and the optimal radii corresponding to all frames of the laser focus spot images to improve the accuracy of analyzing the relationship between the defocus amount and the optimal radius; filtering the defocus amount of each frame based on the linear relationship between the defocus amount and the optimal radius and the defocus amounts corresponding to consecutive frames of the laser focus spot images to obtain the filtered defocus amount of each frame and reduce the influence of noise; performing feedback adjustment on the position of the laser head based on the difference between the filtered defocus amount of each frame and the target defocus amount to optimize the dynamic tracking performance of the laser focus; and improving the accuracy of the dynamic tracking of the laser focus. Description of the Drawings
[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0016] Figure 1 It is a schematic flowchart of the steps of a method for dynamically tracking a laser focus based on image super-resolution provided by the present invention; Figure 2 It is a schematic module flowchart of a system for dynamically tracking a laser focus based on image super-resolution provided by the present invention. Detailed implementation manners
[0017] In order to enable those skilled in the art to better understand the solution of the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, rather than all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0018] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described here can be implemented in an order other than those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.
[0019] In response to the problems in the background art, a method and system for dynamically tracking a laser focus based on image super-resolution are studied and designed, which has important practical significance.
[0020] As Figure 1 shown, the first aspect of the present invention is to provide a method for dynamically tracking a laser focus based on image super-resolution, including the following steps: Step S001: Collect the laser focus spot image and the corresponding defocus amount.
[0021] It should be noted that when using a laser to process a workpiece, the relative position between the laser focus and the processing object affects the processing effect of the workpiece. To analyze the influence of the laser on the workpiece processing, it is necessary to collect the laser focus spot image, and adjust the relative position between the laser focus and the processing object based on the information in the image, so as to improve the accuracy of the dynamic tracking of the laser focus.
[0022] Specifically, use a vision sensor to continuously collect the images of the laser focus during the processing of the workpiece, and obtain a series of laser focus spot images of consecutive frames. Collect the defocus amount corresponding to each laser focus spot image through an optical displacement sensor.
[0023] So far, a series of laser focus spot images and the corresponding defocus amounts are obtained.
[0024] Step S002: Enhance the laser focus spot image through the attention mechanisms of different modules, and record the enhanced image as the high-resolution reconstruction image; extract the edge pixel points of the high-resolution reconstruction image to obtain a number of edge pixel points, and optimize the circular parameters for all the edge pixel points in each high-resolution reconstruction image to obtain the optimal radius of the circle; determine the linear relationship between the defocus amount and the optimal radius based on the defocus amounts and the optimal radii corresponding to all frames of the laser focus spot images.
[0025] It should be noted that since the detailed information in the directly collected laser focus spot image is not clear enough, it is necessary to enhance the details and clarity of the image to restore or generate a higher-quality image. And because the super-resolution reconstruction network can well enhance the detailed information and clarity of the image, it is processed through the super-resolution reconstruction network.
[0026] Specifically, downsample the laser focus spot image, and record the downsampled image as the low-resolution image; use the consecutive frames of low-resolution images and the corresponding laser focus spot images as the dataset for training the super-resolution reconstruction network to train the super-resolution reconstruction network and obtain the trained super-resolution reconstruction network; obtain the high-resolution reconstruction image according to the low-resolution image through the trained super-resolution reconstruction network. Among them, the loss function used in the process of training the super-resolution reconstruction network is the L1 loss function; both the L1 loss function and the downsampling are well-known technologies and will not be specifically described here. Among them, since the super-resolution reconstruction network is trained based on the low-resolution image and the high-resolution image during the training process, but there is only one image collected for each frame, the collected laser focus spot image is used as the high-resolution image, and the downsampled image is used as the low-resolution image for training.
[0027] Among them, two groups of 3x3 convolutional layers and the PReLU activation function are used in the super-resolution reconstruction network to map the low-resolution image from 3 channels of RGB to 128 feature channels; then, the stacked deep feature extraction module GCAF is used for progressive upsampling feature refinement; finally, in the image reconstruction part, along the channel dimension, the high-resolution feature outputs of multiple GCAF modules are concatenated, and a 3x3 convolutional layer is used to map the channels from multiple dimensions to 3 channels of RGB to obtain a deep fusion feature image. Among them, the PReLU activation function and upsampling are both well-known technologies and will not be specifically elaborated here. Among them, in this embodiment, the number of groups of the two groups of 3x3 convolutional layers is obtained through experimental experience, and the number of groups of the convolutional layers is not specifically limited, and the implementer can determine it according to specific circumstances.
[0028] Among them, multiple GCAF (Global Context Attention Fusion) modules are used in the super-resolution reconstruction network for feature extraction to obtain a deep fusion feature image; the bicubic interpolation method is used to interpolate the low-resolution image to obtain an interpolated feature image; finally, the deep fusion feature image and the interpolated feature image are added together to obtain a high-resolution reconstructed image; among them, in each GCAF module, deep feature extraction is performed by using a feature extraction method with three paths; the first path is not processed, the second path is processed by the GCNet (Global Context Network) module, and the third path is processed by the CBAM (Convolutional Block Attention Module) module; among them, the results processed by the GCNet module and the CBAM module are first fused to obtain a module fusion result, and finally the module fusion result is fused with the result that is not processed to obtain the result processed by each GCAF module. Among them, the bicubic interpolation method is a well-known technology and will not be specifically elaborated here.
[0029] Thus, a high-resolution reconstructed image is obtained.
[0030] It should be noted that since the change in the defocus amount will cause the change in the spot of the laser focus, the laser focus spot information at different defocus amounts can be collected multiple times to fit the relationship between the defocus amount and the laser focus spot information; the influence of the defocus amount on the laser focus can be analyzed through the laser focus spot information, that is, the defocus amount can be deduced by analyzing the laser focus information in the laser focus imaging through the fitting relationship; finally, the detected defocus amount information is fed back to the control system, so as to accurately control the defocus amount and improve the positioning accuracy of the workpiece during the processing.
[0031] Specifically, the high-resolution reconstructed image is grayscale-converted to obtain a grayscale image of the laser focus spot; among them, the process of grayscale-converting the image is a well-known technology and will not be specifically described here.
[0032] According to the grayscale image of the laser focus spot, through the Canny edge detection algorithm, the edge pixel points in the grayscale image of the laser focus spot are obtained, and a number of edge pixel points are obtained; among them, the Canny edge detection algorithm is a well-known technology and will not be specifically described here.
[0033] Taking the bottom-left pixel point in the grayscale image of the laser focus spot as the coordinate origin, with the horizontal direction to the right as the horizontal axis and the vertical direction upward as the vertical axis, an image coordinate system is constructed in this way, and the coordinate positions of all edge pixel points in the image coordinate system are obtained. Taking the median of the horizontal values of all edge pixel points as the horizontal value of the initial center, and taking the median of the vertical values of all edge pixel points as the vertical value of the initial center; calculate the Manhattan distance between any two points in the image coordinate system, and take half of the maximum Manhattan distance as the initial radius. Thus, the initial center and the initial radius are obtained. Among them, the calculation process of the Manhattan distance between two points is a well-known technology and will not be specifically described here.
[0034] According to the initial center and the initial radius, the center and the radius are optimized by the nonlinear least squares method to obtain the optimal center and radius; among them, the optimization process of the nonlinear least squares method is a well-known technology and will not be specifically described here.
[0035] The defocus amount corresponding to each grayscale image of the laser focus spot is obtained. Taking the defocus amount corresponding to each grayscale image of the laser focus spot as one dimension and the optimal radius corresponding to each grayscale image of the laser focus spot as one dimension, a relationship feature space is constructed, and the defocus amounts and the optimal radii corresponding to all grayscale images of the laser focus spot are mapped in the relationship feature space to obtain a number of data points; for the number of data points in the relationship feature space, a linear equation of a first-degree polynomial is used, and linear fitting is performed by the least squares method to obtain the linear relationship between the defocus amount and the optimal radius; among them, the least squares method is a well-known technology and will not be specifically described here.
[0036] Thus, the linear relationship between the defocus amount and the optimal radius is obtained.
[0037] Step S003: Filter the defocus amount of each frame through the linear relationship between the defocus amount and the optimal radius and the defocus amounts corresponding to the laser focus spot images of consecutive frames to obtain the filtered defocus amount of each frame.
[0038] It should be noted that since there is noise interference during the process of collecting images, it is necessary to eliminate the influence of noise; in order to reduce the storage and calculation amount of data, since only the data of the previous moment is required in the Kalman filtering process to estimate the data of the next moment, and the amount of data involved in this process is small, therefore, Kalman filtering is used for prediction estimation to eliminate the influence of process noise and measurement noise on the measurement data and improve the laser focus tracking accuracy.
[0039] Furthermore, it should be noted that since the Kalman filtering process requires knowing the state vector and the error covariance matrix; among them, the state vector is constructed according to position, velocity, acceleration, etc., so a filtering space for the defocus amount needs to be constructed for the defocus amount, and the state vector is obtained by the change of the defocus amount in the filtering space. Among them, Kalman filtering is a well-known technology and will not be specifically described here.
[0040] Specifically, an initial error covariance matrix is set. Among them, the initial error covariance matrix is preset according to experience. Since the change of the defocus amount in the experiment is not large, a smaller initial covariance matrix is set to represent smaller uncertainty.
[0041] Taking the time sequence as the horizontal axis and the defocus amount as the vertical axis, a filtering space is constructed; according to the optimal radius determined by the gray-scale image of the laser focus spot in the previous frame, through the linear relationship between the defocus amount and the optimal radius, the defocus amount corresponding to the previous frame is deduced inversely, and the initial state vector is determined through the filtering space according to the defocus amount corresponding to the previous frame deduced inversely; among them, the process of determining the initial state vector is a well-known technology and will not be specifically described here; Predict according to the initial state vector and the initial error covariance matrix to obtain the predicted defocus amount of the next frame; then obtain the actually collected defocus amount. According to the defocus amount collected in the next frame and the predicted defocus amount, obtain the Kalman gain through the initial error covariance matrix, and filter the defocus amount through the Kalman gain, the defocus amount collected in the next frame and the predicted defocus amount, and update the state vector and the error covariance matrix to obtain the defocus amount of the next frame after filtering, the updated state vector and the error covariance matrix; filter the defocus amount of each subsequent frame through the defocus amount of the next frame after filtering, the updated state vector and the error covariance matrix.
[0042] Thus, the defocus amount of each frame after filtering is obtained.
[0043] Step S004: Adjust the position of the laser head in feedback according to the difference between the defocus amount of each frame after filtering and the target defocus amount to optimize the dynamic tracking performance of the laser focus.
[0044] It should be noted that during the actual processing of the workpiece, a target defocus amount is set. When there is a certain error between the monitored defocus amount and the target defocus amount, a certain degree of feedback adjustment is required.
[0045] Specifically, based on the difference between the defocus amount of each frame after filtering and the target defocus amount, the position of the laser head is adjusted through the PID control algorithm, that is, the defocus amount is controlled by adjusting the position of the laser head; and through the feedback loop, the execution result of the position adjustment of the laser head is returned to the system, thereby realizing the closed-loop control of the system. This closed-loop control structure can continuously adjust and correct according to the defocus amount situation to maintain the stability and accuracy of the dynamic tracking process of the laser focus. Among them, the PID control algorithm is a well-known technology and will not be specifically described here. Among them, the target defocus amount is a preset value.
[0046] As Figure 2 shown, the second aspect of the present invention is to provide a laser focus dynamic tracking system based on image super-resolution, including the following modules: Data acquisition module 101: used to obtain the laser focus spot images of continuous frames and the corresponding defocus amounts; Image enhancement and optimization module 102: used to enhance the laser focus spot image through the attention mechanisms of different modules, and record the enhanced image as a high-resolution reconstructed image; extract the edge pixel points of the high-resolution reconstructed image to obtain a number of edge pixel points, and optimize the circular parameters for all the edge pixel points in each high-resolution reconstructed image to obtain the optimal radius of the circle; determine the linear relationship between the defocus amount and the optimal radius through the defocus amounts and the optimal radii corresponding to the laser focus spot images of all frames. Filtering module 103: used to filter the defocus amount of each frame through the linear relationship between the defocus amount and the optimal radius and the defocus amounts corresponding to the laser focus spot images of continuous frames to obtain the defocus amount of each frame after filtering; Adjustment control module 104: used to feedback-adjust the position of the laser head through the difference between the defocus amount of each frame after filtering and the target defocus amount to optimize the dynamic tracking performance of the laser focus; among them, the target defocus amount is a preset value.
[0047] The third aspect of the present invention is to provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements a laser focus dynamic tracking method based on image super-resolution.
[0048] The fourth aspect of the present invention is to provide a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements a laser focus dynamic tracking method based on image super-resolution.
[0049] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, optical storage, etc.) that contain computer-usable program code.
[0050] The present invention is described with reference to the flowcharts and / or block diagrams of methods, systems, and computer program products according to the embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in one Figure 1 one flow or multiple flows and / or blocks Figure 1 or multiple blocks specified in one flow or multiple flows and / or blocks.
[0051] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including instruction means, and the instruction means implement the functions specified in one Figure 1 one flow or multiple flows and / or blocks Figure 1 or multiple blocks specified in one flow or multiple flows and / or blocks.
[0052] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one Figure 1 one flow or multiple flows and / or blocks Figure 1 or multiple blocks specified in one flow or multiple flows and / or blocks.
[0053] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: it is still possible to modify the specific implementation manners of the present invention or make equivalent replacements. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention shall be covered by the protection scope of the present invention.
Claims
1. A laser focus dynamic tracking method based on image super-resolution, characterized in that: include: Obtaining laser focus spot images of continuous frames and corresponding defocus values; The laser focus spot image is enhanced through the attention mechanism of different modules, and the enhanced image is recorded as a high-resolution reconstructed image; edge pixels are extracted from the high-resolution reconstructed image to obtain a number of edge pixels, and the optimal radius of the circle is obtained by optimizing the circular parameters of all edge pixels in each high-resolution reconstructed image; the linear relationship between the defocus amount and the optimal radius is determined through the defocus amount and the optimal radius corresponding to the laser focus spot image of all frames; The defocus amount of each frame is filtered according to the linear relationship between the defocus amount and the optimal radius and the defocus amount corresponding to the laser focus spot image of the continuous frames to obtain the defocus amount of each frame after filtering; The position of the laser head is adjusted by feedback based on the difference between the defocus amount of each frame after filtering and the target defocus amount to optimize the dynamic tracking performance of the laser focus; wherein the target defocus amount is a preset value.
2. The laser focus dynamic tracking method based on image super-resolution according to claim 1, characterized in that: The laser focus spot image is enhanced by using the attention mechanism of different modules, and the enhanced image is recorded as a high-resolution reconstructed image, including: Down-sampling the laser focus spot image, recording the down-sampled image as a low-resolution image; using the low-resolution images of continuous frames and the corresponding laser focus spot images as data sets for training a super-resolution reconstruction network, to train the super-resolution reconstruction network, and obtain a trained super-resolution reconstruction network; according to the low-resolution image, a high-resolution reconstructed image is obtained through the trained super-resolution reconstruction network; Among them, multiple modules GCAF are used in the super-resolution reconstruction network to extract features and obtain deep fusion feature images; the bicubic interpolation method is used to interpolate the low-resolution image to obtain the interpolation feature image; finally, the deep fusion feature image and the interpolation feature image are added to obtain the high-resolution reconstructed image; wherein, in each module GCAF, deep feature extraction is performed by using the feature extraction method of three paths; the first path is not processed, the second path is processed by the module GCNet, and the third path is processed by the module CBAM; wherein, the results of the module GCNet and the module CBAM are first fused to obtain the module fusion result, and finally the module fusion result is fused with the result without processing to obtain the result processed by each module GCAF.
3. The laser focus dynamic tracking method based on image super-resolution according to claim 1, characterized in that: The step of extracting edge pixels from the high-resolution reconstructed image to obtain a plurality of edge pixels includes: Grayscale the high-resolution reconstructed image to obtain a laser focus spot grayscale image; According to the laser focus spot grayscale image, the edge pixel points in the laser focus spot grayscale image are obtained by using the Canny edge detection algorithm to obtain a plurality of edge pixel points.
4. The laser focus dynamic tracking method based on image super-resolution according to claim 3, characterized in that: The method of optimizing the circle parameters of all edge pixels in each high-resolution reconstructed image to obtain the optimal radius of the circle includes: The lower left pixel in the grayscale image of the laser focus spot is used as the coordinate origin, the horizontal right direction is used as the horizontal axis, and the vertical upward direction is used as the vertical axis to construct the image coordinate system, and the coordinate positions of all edge pixels in the image coordinate system are obtained. The median of the horizontal values of all edge pixels is used as the horizontal value of the initial circle center, and the median of the vertical values of all edge pixels is used as the vertical value of the initial circle center; the Manhattan distance between any two points in the image coordinate system is calculated, and half of the maximum Manhattan distance is used as the initial radius; The radius of the circle is optimized by the nonlinear least square method according to the initial center and the initial radius to obtain the optimal radius of the circle.
5. The laser focus dynamic tracking method based on image super-resolution according to claim 4, characterized in that: The step of determining the linear relationship between the defocus amount and the optimal radius by using the defocus amount and the optimal radius corresponding to the laser focus spot images of all frames includes: A relational feature space is constructed with the defocus amount corresponding to each laser focus spot grayscale image as one dimension and the optimal radius corresponding to each laser focus spot grayscale image as another dimension. The defocus amounts and optimal radius corresponding to all laser focus spot grayscale images are mapped in the relational feature space to obtain a number of data points. A linear polynomial linear equation is used for a number of data points in the relational feature space, and linear fitting is performed through the least squares method to obtain the linear relationship between the defocus amount and the optimal radius.
6. The laser focus dynamic tracking method based on image super-resolution according to claim 5, characterized in that: The defocus amount of each frame is filtered according to the linear relationship between the defocus amount and the optimal radius and the defocus amount corresponding to the laser focus spot image of the continuous frames to obtain the defocus amount of each frame after filtering, including: The filtering space is constructed with the time sequence as the horizontal axis and the defocus amount as the vertical axis; the optimal radius is determined according to the grayscale image of the laser focus spot of the previous frame, and the defocus amount corresponding to the previous frame is inferred through the linear relationship between the defocus amount and the optimal radius, and the initial state vector is determined through the filtering space according to the inferred defocus amount corresponding to the previous frame; Predictions are made based on the initial state vector and the initial error covariance matrix to obtain the predicted defocus amount for the next frame; then the actually collected defocus amount is obtained, and the Kalman gain is obtained through the initial error covariance matrix based on the defocus amount collected by the next frame and the predicted defocus amount, and the defocus amount is filtered through the Kalman gain, the defocus amount collected by the next frame and the predicted defocus amount, and the state vector and the error covariance matrix are updated to obtain the defocus amount of the next frame after filtering, the updated state vector and the error covariance matrix; the defocus amount of each subsequent frame is filtered through the defocus amount of the next frame after filtering, the updated state vector and the error covariance matrix; Among them, the initial error covariance matrix is a preset matrix.
7. The laser focus dynamic tracking method based on image super-resolution according to claim 6, characterized in that: The position of the laser head is adjusted by feedback based on the difference between the defocus amount of each frame after filtering and the target defocus amount to optimize the dynamic tracking performance of the laser focus, including: By using the difference between the defocus amount of each frame after filtering and the target defocus amount, the position of the laser head is adjusted through the PID control algorithm, that is, the defocus amount is controlled by adjusting the position of the laser head; and through the feedback loop, the execution result of the laser head position adjustment is returned to the system, thereby realizing closed-loop control of the system.
8. A laser focus dynamic tracking system based on image super-resolution, characterized in that: include: Data acquisition module: used to obtain continuous frames of laser focus spot images and corresponding defocus values; Image enhancement and optimization module: used to enhance the laser focus spot image through the attention mechanism of different modules, and record the enhanced image as a high-resolution reconstructed image; extract edge pixels from the high-resolution reconstructed image to obtain a number of edge pixels, and optimize the circle parameters of all edge pixels in each high-resolution reconstructed image to obtain the optimal radius of the circle; determine the linear relationship between the defocus amount and the optimal radius through the defocus amount and the optimal radius corresponding to the laser focus spot image of all frames; Filtering module: used to filter the defocus amount of each frame through the linear relationship between the defocus amount and the optimal radius and the defocus amount corresponding to the laser focus spot image of the continuous frames, so as to obtain the defocus amount of each frame after filtering; Adjustment control module: used to optimize the dynamic tracking performance of the laser focus by feedback adjustment of the position of the laser head through the difference between the defocus amount of each frame after filtering and the target defocus amount; wherein the target defocus amount is a preset value.
9. An electronic device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for dynamic tracking of laser focus based on image super-resolution as claimed in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for dynamic tracking of a laser focus based on image super-resolution according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Laser defocusing amount automatic adjusting device on micrometer scale and adjusting method thereof
CN109297940A
Microscope automatic focusing method, based on laser image, system and computer equipment
CN111679418A
Remote sensing video target tracking method and system based on super-resolution network
CN116363168A
Real-time super resolution at long standoff ranges
US20220138905A1
Image depth prediction method, electronic device, and non-transitory storage medium
US20240029283A1