Method and apparatus for determining target displacement amount, and laser detection device and storage medium
By receiving real-time sample images in the laser detection device, determining the laser linewidth difference value, and using the preset linewidth difference value and displacement relationship to quickly determine the target displacement, the problem of low focus efficiency of the laser detection device is solved, and processing efficiency and focus accuracy are improved.
Patent Information
- Application Number
- PCT/CN2024/087709
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-11-23
- Filing Date
- 2024-04-15
- Publication Date
- 2025-05-30
AI Technical Summary
In the semiconductor field, the depth of field of high-magnification objective lens is small, which causes laser detection equipment to collect images in the overall sample displacement, and some interval images need to be focused frequently. Traditional image processing technology takes a long time and has low processing efficiency.
By receiving the sample image collected in real time, the target line width difference value between the laser line width and the target line width threshold is determined, and the target line width difference value is used to determine the target line width difference value and the displacement amount, and move to the focus position according to the displacement amount. This relationship is obtained through data fitting and fitting based on the original laser morphology of the laser detection device.
The target displacement is quickly determined, the focus efficiency and processing efficiency of the laser detection device are improved, so that the fitting relationship is more in line with the hardware structural characteristics of the device, thereby improving the accuracy of focus accuracy and displacement determination.
Smart Images

Figure CN2024087709_30052025_PF_FP_ABST
Abstract
Description
Method, device, laser detection equipment and storage medium for determining target displacement
[0001] Related applications
[0002] This application claims priority to Chinese patent application number 202311572691.8, filed on November 23, 2023, entitled “Method, device, laser detection equipment and storage medium for determining target displacement,” the entire text of which is hereby incorporated by reference. Technical Field
[0003] The present application relates to the field of laser focusing technology, and in particular to a method and apparatus for determining target displacement, a laser detection device, a storage medium, and a computer program product. Background Art
[0004] In the semiconductor field, due to the high requirements for sample imaging precision, laser inspection equipment equipped with high-magnification objective lenses is often used for imaging. However, due to the narrow depth of field of high-magnification objective lenses, when using laser inspection equipment to capture images of sample displacement as a whole, some areas of the image are often out of focus. Therefore, focusing the laser inspection equipment is often necessary.
[0005] In traditional image processing technology, the clarity evaluation parameters of the sample image can be calculated by extracting the gradient information, frequency information or phase information in the laser imaging sample image, thereby analyzing the focusing condition of the laser detection equipment and determining the displacement required for the laser detection equipment to move to the focusing position.
[0006] However, due to the large amount of information in the sample image, when traditional image processing technology is used, it will take a lot of time to perform calculations, resulting in low processing efficiency.
[0007] Summary of the Invention
[0008] According to various embodiments of the present application, a method, apparatus, laser detection device, storage medium, and computer program product for determining a target displacement are provided.
[0009] In a first aspect, the present application provides a method for determining target displacement, which is applied to a laser detection device, comprising:
[0010] receiving sample images collected in real time;
[0011] determining a target line width difference between a laser line width in a sample image and a target line width threshold, where the target line width threshold is a laser line width value collected by a laser detection device at a focus position;
[0012] According to the preset relationship between the line width difference and the displacement, the target displacement corresponding to the target line width difference is determined. The relationship between the line width difference and the displacement is obtained by fitting the laser line width difference and the displacement interval corresponding to the laser line width difference through a data fitting method; the laser line width difference is collected by the laser detection equipment; the data fitting method is a data fitting method corresponding to the original laser shape of the laser detection equipment;
[0013] Move to the focus position according to the target displacement.
[0014] In one embodiment, the original laser morphology includes a nonlinear morphology; and the fitting method for the relationship between the line width difference and the displacement includes:
[0015] A polynomial fitting method corresponding to the nonlinear morphology is used to construct a polynomial fitting relationship between the laser linewidth difference and the displacement interval at a preset order through a pre-trained deep learning model;
[0016] Acquire a verification image captured at a preset displacement from the focus position, and determine a verification line width difference between a laser line width in the verification image and a target line width threshold;
[0017] Determine the verification displacement corresponding to the verification line width difference based on the polynomial fitting relationship under the preset order;
[0018] Generate a fitting accuracy corresponding to a polynomial fitting relationship under a preset order according to the verified displacement and the preset displacement;
[0019] The relationship between the line width difference and the displacement is determined based on the comparison result of the fitting accuracy and the preset threshold.
[0020] In one embodiment, the preset order is any one order selected from a plurality of orders;
[0021] Based on the comparison result of the fitting accuracy and the preset threshold, the relationship between the line width difference and the displacement is determined, including:
[0022] When the fitting accuracy corresponding to the preset order is less than the preset threshold, a polynomial fitting relationship between the laser linewidth difference and the displacement interval at the remaining orders is constructed through the deep learning model, where the remaining orders represent any order different from the preset order among the multiple orders;
[0023] When the fitting accuracy corresponding to the polynomial fitting relationship under other orders meets the preset threshold, the polynomial fitting relationship under other orders is used as the relationship between the line width difference and the displacement.
[0024] In one embodiment, the method further comprises:
[0025] When the fitting accuracy of the remaining orders is still less than the preset threshold, another order is selected from the multiple orders to infer the polynomial fitting relationship until the fitting accuracy of the polynomial fitting relationship meets the preset threshold.
[0026] In one embodiment, the fitting method of the relationship between the line width difference and the displacement includes:
[0027] Acquire multiple sample images collected at equal displacement intervals, and determine the laser center point in each sample image and the laser line width difference relative to a target line width threshold;
[0028] Determine the original laser shape based on the mapping result of the laser center point on the coordinate system;
[0029] Using the data fitting method corresponding to the original laser morphology, the laser line width difference corresponding to each sample image sample and the displacement interval between two sample image samples are fitted to obtain the relationship between the line width difference and the displacement;
[0030] In one embodiment, the original laser shape includes a linear shape; and the fitting method for the relationship between the line width difference and the displacement includes:
[0031] According to the positional relationship between the laser center point and the focus center point, multiple sample image samples are divided into upper defocus samples and lower defocus samples. The focus center point is the laser center point collected by the laser detection device at the focus position;
[0032] Using a linear fitting method corresponding to the linear morphology, a linear fitting is performed on the laser line width difference and displacement interval of the upper defocus sample to obtain the upper defocus relationship, and a linear fitting is performed on the laser line width difference and displacement interval of the lower defocus sample to obtain the lower defocus relationship;
[0033] The upper defocus relationship and the lower defocus relationship are taken as the relationship between the line width difference and the displacement.
[0034] In one embodiment, a plurality of sample images are divided into upper defocused samples and lower defocused samples according to the positional relationship between the laser center point and the focus center point, including:
[0035] The sample image samples where the laser center point is above the focus center point are divided into upper defocus samples;
[0036] The sample image samples where the laser center point is below the focus center point are classified as lower defocused samples.
[0037] In one embodiment, determining a target displacement corresponding to a target line width difference according to a preset relationship between the line width difference and the displacement includes:
[0038] When the laser center position in the sample image is above the focus center point, the target displacement corresponding to the target line width difference is determined according to the upper defocus relationship;
[0039] When the center position of the laser in the sample image is below the focus center point, the target displacement corresponding to the target line width difference is determined according to the lower defocus relationship.
[0040] In one embodiment, determining a target linewidth difference between a laser linewidth in a sample image and a target linewidth threshold value includes:
[0041] Performing grayscale processing on the sample image to obtain a grayscale image of the sample image;
[0042] The grayscale image is binarized using a preset grayscale threshold to obtain a binary image of the sample image;
[0043] Determine the laser line in the sample image according to the image contour information in the binary image;
[0044] The laser line width of the laser line and the target line width threshold are processed to obtain the target line width difference.
[0045] In one embodiment, binarization processing is performed on the grayscale image using a preset grayscale threshold to obtain a binary image of the sample image, including:
[0046] The pixels in the grayscale image whose grayscale values are less than the grayscale threshold are determined as background pixels that are not on the laser line;
[0047] Reset the grayscale value of the background pixel to the first threshold;
[0048] Determine the pixel points in the grayscale image whose grayscale value is greater than the grayscale threshold as the target pixel points on the laser line;
[0049] The grayscale value of the target pixel is reset to the second threshold to obtain a binary image of the sample image.
[0050] In one embodiment, determining the laser line in the sample image based on image contour information in the binarized image includes:
[0051] The binary image is processed by morphological opening and closing operations to remove noise in the binary image.
[0052] Contour extraction is performed on the binary image after noise removal, and the connected area composed of multiple pixels with the same grayscale value is regarded as the area where the laser line is located, and the image contour information corresponding to the laser line in the sample image is obtained;
[0053] The image segmentation algorithm is used to perform contour extraction processing on the extracted image contour information again to obtain the laser line in the sample image.
[0054] In a second aspect, the present application further provides a device for determining target displacement, which is applied to a laser detection device, and comprises:
[0055] An image acquisition module, used for receiving sample images collected in real time;
[0056] a difference determination module for determining a target line width difference between the laser line width in the sample image and a target line width threshold, where the target line width threshold is a laser line width value collected by the laser detection device at a focus position;
[0057] A displacement calculation module is used to determine a target displacement corresponding to a target line width difference based on a preset relationship between the line width difference and the displacement. The relationship between the line width difference and the displacement is obtained by fitting the laser line width difference and the displacement interval corresponding to the laser line width difference through a data fitting method. The laser line width difference is collected by a laser detection device. The data fitting method is a data fitting method corresponding to the original laser shape of the laser detection device.
[0058] The device focus module is used to move to the focus position according to the target displacement.
[0059] In a third aspect, the present application also provides a laser detection device, including a processor and a memory, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps in any of the above method embodiments are implemented.
[0060] In a fourth aspect, the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above method embodiments.
[0061] In a fifth aspect, the present disclosure further provides a computer program product, which includes a computer program that implements the steps of any of the above method embodiments when executed by a processor.
[0062] The above-mentioned method, device, laser detection equipment, storage medium and computer program product for determining the target displacement amount receive a sample image collected in real time; determine the target line width difference between the laser line width in the sample image and the target line width threshold, where the target line width threshold is the laser line width value collected by the laser detection equipment at the focus position; determine the target displacement amount corresponding to the target line width difference based on the preset relationship between the line width difference and the displacement amount, and the relationship between the line width difference and the displacement amount is obtained by fitting the laser line width difference collected by the laser detection equipment and the displacement interval corresponding to the laser line width difference using a data fitting method corresponding to the original laser morphology of the laser detection equipment; move to the focus position according to the target displacement amount, and can quickly determine the target displacement amount corresponding to the current real-time collection position by only using the difference between the laser line width of the laser detection equipment at the current real-time collection position and the laser line width value at the focus position, and the known relationship between the line width difference and the displacement amount, thereby improving the efficiency of determining the target displacement amount and the focusing efficiency of the laser detection equipment.
[0063] In addition, by adopting the method for determining the target displacement amount provided in the present application, by adopting a data fitting method corresponding to the original laser morphology of the laser detection device, the laser line width difference collected by the laser detection device and the displacement interval corresponding to the laser line width difference are fitted to obtain the relationship between the laser line width and the displacement amount corresponding to the laser detection device. The relationship between the fitted line width difference and the displacement amount can also be made more consistent with the hardware structure characteristics of the laser detection device itself, thereby helping to improve the subsequent determination accuracy of the target displacement amount based on the relationship between the line width difference and the displacement amount.
[0064] The details of one or more embodiments of the present disclosure are set forth in the accompanying drawings and the description below. Other features, objects, and advantages of the present disclosure will become apparent from the description, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the conventional technology, the following briefly introduces the drawings required for use in the embodiments or the conventional technology descriptions. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the disclosed drawings without any creative work.
[0066] FIG1 is a diagram illustrating an application environment of a method for determining a target displacement in one embodiment;
[0067] FIG2 is a block diagram of a laser displacement sensor 200 according to an embodiment;
[0068] FIG3 is a schematic flow chart of a method for determining a target displacement in one embodiment;
[0069] FIG4A is a schematic diagram of a sample image in one embodiment;
[0070] FIG4B is a schematic flow chart of a target line width difference determination step in one embodiment;
[0071] FIG5 is a flow chart of a method for fitting the relationship between line width difference and displacement in one embodiment;
[0072] FIG6 is a schematic diagram of a flow chart of a relationship fitting method under a nonlinear form in one embodiment;
[0073] FIG7 is a schematic diagram of a process for fitting a relationship in a linear form according to an embodiment;
[0074] FIG8 is a schematic flow chart of a method for determining a target displacement in another embodiment;
[0075] FIG9 is a structural block diagram of a device 900 for determining a target displacement in one embodiment. DETAILED DESCRIPTION
[0076] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0077] It should be noted that the terms "first," "second," and the like in the specification and claims herein and in the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product, or device comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to these processes, methods, products, or devices.
[0078] The method for determining the target displacement provided in the embodiment of the present application can be applied to the application environment shown in FIG. 1 , including a laser detection device 102 , a sample stage 104 , and a Z-axis translation stage 106 .
[0079] For example, the laser detection device 102 may emit a laser toward a sample placed on the sample stage 104 , receive laser information reflected from the sample surface, and then convert the received laser information into image information, thereby obtaining a sample image collected by itself in real time.
[0080] The laser detection device 102 can pre-store the laser line width value collected at the focus position, and use it as the target line width threshold to compare with the laser line width in the sample image currently collected in real time to determine the target line width difference between the laser line width and the target line width threshold.
[0081] The laser detection device 102 may pre-store a preset relationship between the line width difference and the displacement amount. The relationship between the line width difference and the displacement amount may be obtained by the laser detection device 102 using a data fitting method corresponding to the original laser form of the laser detection device itself, and fitting the laser line width difference collected by the laser detection device itself and the displacement interval corresponding to the laser line width difference.
[0082] Based on the known relationship between the line width difference and the displacement, laser detection device 102 can determine the target displacement corresponding to the target line width difference currently being collected in real time. Laser detection device 102 can then drive the motor based on the target displacement to control Z-axis translation stage 106 to move laser detection device 102 to the focus position corresponding to the target displacement, thereby achieving focusing of laser detection device 102.
[0083] In one embodiment, the laser detection device may include, but is not limited to, a laser, a microscope objective lens, a filter, and an image sensor. The laser may be used to emit laser light. The microscope objective lens may be used to form a magnified real image of the sample. The filter may be used to eliminate stray light. The image sensor may be used to convert laser light information into image information using laser imaging technology.
[0084] Optionally, in some embodiments, since the focusing operation and detection operation of the laser detection device are usually performed simultaneously, the light in the detection light path used to detect the sample may enter the focusing light path used to focus the device, so a bandpass filter that conforms to the spectral characteristics of the laser can be used to eliminate stray light.
[0085] For example, the laser detection device can be a laser displacement sensor. As shown in FIG2 , a block diagram of the structure of a laser displacement sensor 200 is provided, comprising: a laser 202, a reflector 204, a microscope objective 206, a filter 208, and an image sensor 210. The reflector 204 is used to adjust the laser beam emitted by the laser 202 so that it enters the surface of a sample 220 perpendicularly. The microscope objective 206 is parallel to the sample 220. The filter 208 is set at an angle parallel to the image sensor 210, and the optical path between the filter 208 and the image sensor 210 is perpendicular.
[0086] The laser displacement sensor 200 can emit a laser line through a laser 202, which passes through a reflector 204 (although only one reflector 204 is shown in FIG2 , any number of reflectors 204 can be provided according to user requirements in actual application scenarios) and a microscope objective 206 to project the laser line onto the surface of a sample 220. The laser information reflected from the surface of the sample 220 is then input into an image sensor 210 through the microscope objective 206, the reflector 204, and the filter 208. The image sensor 210 converts the received laser information into a sample image of the sample 220, and performs focusing analysis based on the sample image to implement a method for determining target displacement provided in this application.
[0087] In one embodiment, as shown in FIG3 , a method for determining target displacement is provided, which is described by taking the method applied to the laser detection device 102 in FIG1 as an example, and includes the following steps S302 to S308 .
[0088] Step S302: receiving a sample image collected in real time.
[0089] Exemplarily, the laser detection device can emit laser to the sample in response to a focus command triggered by the user or a focus command triggered by its own timing, and receive laser information reflected from the sample surface, and use the received laser information to perform imaging processing to obtain the current real-time sample image.
[0090] Step S304 : determining a target line width difference between the laser line width in the sample image and a target line width threshold.
[0091] The target line width threshold may be a laser line width value collected by a laser detection device at a focus position.
[0092] Optionally, in some embodiments, sample images at different positions can be collected by adjusting the distance between the laser detection device and the sample stage multiple times, and the clarity of the sample images at different positions can be compared to determine the clearest sample image. The position where the laser detection device takes the clearest sample image is used as the focusing position, and the maximum laser line width value of the laser line in the clearest sample image is stored in the memory of the laser detection device as the target line width threshold.
[0093] Exemplarily, a processor chip is deployed in the laser detection device to implement the data processing operations described in each embodiment of the present application using the processor chip. A target line width threshold may be pre-stored in the laser detection device. The laser detection device may perform contour extraction processing on the sample image to obtain the laser line in the sample image. The maximum line width value on the laser line (usually the maximum value at the center position of the laser line) is taken as the laser line width in the sample image. The laser line width in the sample image and the target line width threshold are operated and processed to determine the target line width difference between the laser line width in the sample image and the target line width threshold.
[0094] Step S306 : determining a target displacement corresponding to the target line width difference according to a preset relationship between the line width difference and the displacement.
[0095] Among them, the relationship between the line width difference and the displacement can be obtained by fitting the laser line width difference collected by the laser detection device and the displacement interval corresponding to the laser line width difference using a data fitting method corresponding to the original laser shape of the laser detection device.
[0096] The original laser morphology may represent the morphology of the laser light emitted by the laser detection device, such as a linear morphology or a nonlinear morphology. Optionally, in some embodiments, the data fitting method corresponding to the linear morphology may include, but is not limited to, any one or more of a variety of linear fitting methods, such as gradient descent fitting, stochastic gradient descent fitting, or regularized linear regression. In other embodiments, the data fitting method corresponding to the nonlinear morphology may include, but is not limited to, any one or more of a variety of nonlinear fitting methods, such as least squares fitting, Bayesian fitting, and curve fitting.
[0097] For example, a preset relationship between line width difference and displacement may be pre-programmed into the laser detection device. By substituting the target line width difference corresponding to the sample image obtained in step S304 into the known relationship between line width difference and displacement, the target displacement corresponding to the target line width difference may be determined.
[0098] Step S308: moving to a focus position according to the target displacement.
[0099] For example, the laser detection device can control the motor operation based on the target displacement to move the laser in the Z-axis direction a distance equal to the target displacement to reach the focus position and achieve focus. The laser detection device can then use the sample image captured at the focus position as the image for subsequent sample detection and analysis.
[0100] In the above-mentioned method for determining the target displacement, a sample image collected in real time is received; a target line width difference between the laser line width in the sample image and a target line width threshold is determined, where the target line width threshold is the laser line width value collected by the laser detection device at the focus position; a target displacement corresponding to the target line width difference is determined based on a preset relationship between the line width difference and the displacement, and the relationship between the line width difference and the displacement is obtained by fitting the laser line width difference collected by the laser detection device and the displacement interval corresponding to the laser line width difference using a data fitting method corresponding to the original laser morphology of the laser detection device; and the target displacement corresponding to the current real-time collection position can be quickly determined by moving to the focus position according to the target displacement. This can improve the efficiency of determining the target displacement and the focusing efficiency of the laser detection device.
[0101] In addition, by adopting the method for determining the target displacement amount provided in the present application, by adopting a data fitting method corresponding to the original laser morphology of the laser detection device, the laser line width difference collected by the laser detection device and the displacement interval corresponding to the laser line width difference are fitted to obtain the relationship between the laser line width and the displacement amount corresponding to the laser detection device. The relationship between the fitted line width difference and the displacement amount can also be made more consistent with the hardware structure characteristics of the laser detection device itself, thereby helping to improve the subsequent determination accuracy of the target displacement amount based on the relationship between the line width difference and the displacement amount.
[0102] Optionally, in some embodiments, as shown in FIG4A , in a sample image received by the laser detection device, the grayscale value of the pixels on the laser line is higher than the grayscale value of the other pixels in the same sample image. Therefore, the laser detection device can use the grayscale threshold corresponding to the laser line to extract the laser line in the sample image. For example, as shown in FIG4B , step S304 can include the following steps S402 to S408. Among them:
[0103] Step S402: grayscale the sample image to obtain a grayscale image of the sample image.
[0104] For example, the laser detection device can read the component values of each pixel in the sample image on the red, green and blue color channels, that is, the RGB value. The grayscale value of the pixel is determined based on the RGB value of the pixel. For example, any one of the R value / G value / B value can be used as the grayscale value; or the average of the R value, G value, and B value can be used as the grayscale value; or the R value / G value / B value can be weighted based on the channel weights corresponding to the red, green and blue color channels, and the sum of the R' value, G' value, and B' value obtained after the weighted processing is used as the grayscale value. The grayscale value of each pixel is used to replace the RGB value of each pixel in the sample image to grayscale the sample image and obtain a grayscale image of the sample image.
[0105] Step S404 : binarizing the grayscale image using a preset grayscale threshold to obtain a binarized image of the sample image.
[0106] For example, a grayscale threshold corresponding to the laser line determined based on the laser imaging characteristics may be pre-stored in the laser detection device. The grayscale threshold corresponding to the laser line is used to perform binarization processing on the grayscale image obtained in step S402, and pixels in the grayscale image with grayscale values less than the grayscale threshold are determined as background pixels not on the laser line, and the grayscale values of the background pixels are reset to a first threshold (usually 0). Pixels in the grayscale image with grayscale values greater than the grayscale threshold are determined as target pixels on the laser line, and the grayscale values of the target pixels are reset to a second threshold (usually 255), thereby obtaining a binary image of the sample image.
[0107] Step S406 : determining the laser line in the sample image according to the image contour information in the binarized image.
[0108] For example, the laser detection device can process the binary image using morphological opening and closing operations (such as dilation, erosion, or opening operations) to remove noise from the binary image. Contour extraction is performed on the binary image after noise removal, and a connected area consisting of multiple pixels with the same grayscale value is used as the area where the laser line is located, thereby obtaining image contour information corresponding to the laser line in the sample image. The grabcut algorithm (an image segmentation method based on graph cutting) is used to perform contour extraction on the extracted image contour information again to obtain the laser line in the sample image.
[0109] Step S408 , performing calculation processing on the laser line width of the laser line and the target line width threshold to obtain a target line width difference.
[0110] Exemplarily, the laser detection device can use the maximum line width value of the laser line determined in step S406 as the laser line width of the laser line in the sample image, and perform calculation processing on it with the target line width threshold at the focus position to obtain the target line width difference between the laser imaging at the current real-time acquisition position and the focus position.
[0111] Optionally, in some embodiments, the laser linewidth difference and the displacement interval corresponding to the laser linewidth difference described in the above embodiments may be acquired by a laser detection device from different positions according to a certain motion pattern. For example, the laser detection device may acquire data according to a motion pattern of moving in the same direction along the Z-axis by equal displacement intervals each time, or may acquire data according to a motion pattern of sequentially moving in the same direction along the Z-axis by distances of 1 mm, 3 mm, 5 mm, and so on, or may acquire data according to a motion pattern of moving up and down along the Z-axis at a constant speed, thereby obtaining the laser linewidth difference at different positions relative to the target linewidth threshold, and the displacement interval at different positions relative to the focus position.
[0112] In one embodiment, as shown in FIG5 , a method for fitting the relationship between line width difference and displacement is provided, including the following steps S502 to S506 .
[0113] Step S502 : obtaining a plurality of sample image samples collected at equal displacement intervals, and determining the laser center point in each sample image sample and the laser line width difference relative to the target line width threshold.
[0114] Exemplarily, the laser detection device can move a distance of equal displacement interval (for example, 1 micron, 5 microns or 10 microns, etc.) each time to collect sample image samples at different positions. Accordingly, the smaller the displacement interval of collecting sample image samples, the higher the accuracy of the relationship between the laser line width and the displacement amount obtained based on the subsequent fitting of the sample image samples. The laser detection device can refer to the laser line width determination method provided in the above embodiment to determine the maximum laser line width value in the sample image sample. The maximum laser line width value in each sample image sample and the target line width threshold are processed to obtain the laser line width difference of each sample image sample relative to the target line width threshold. The center point of the laser line with the largest laser line width value in each sample image sample is used as the laser center point in the sample image sample. Thus, the laser center point of each sample image sample and the laser line width difference relative to the target line width threshold are obtained.
[0115] Step S504: determining the original laser shape according to the mapping result of the laser center point on the coordinate system.
[0116] The coordinate system may represent an image coordinate system of the laser detection device. For example, an image coordinate system may be constructed with the upper left corner of the laser imaging image as the origin, the horizontal rightward direction as the positive direction of the X axis, and the vertical downward direction as the positive direction of the Y axis.
[0117] For example, the laser detection device may map the laser center point in each sample image to a corresponding position in the coordinate system to obtain a mapping result of the laser center point. Based on the distribution of the mapping result of the laser center point of each sample image in the coordinate system (e.g., a linear distribution or a nonlinear distribution), the original laser shape of the laser detection device may be determined.
[0118] In step S506, a data fitting method corresponding to the original laser morphology is used to fit the laser line width difference corresponding to each sample image sample and the displacement interval between each sample image sample to obtain the relationship between the line width difference and the displacement.
[0119] Exemplarily, the laser detection device may employ a data fitting method corresponding to the original laser morphology determined in step S504 to construct a quantitative relationship model between the linewidth difference and the displacement. For example, when the original laser morphology is linear, a linear fitting method corresponding to the linear morphology may be employed, with the linewidth difference as the independent variable and the displacement as the dependent variable, to construct a linear equation between the linewidth difference and the displacement. Alternatively, when the original laser morphology is nonlinear, a nonlinear fitting method corresponding to the nonlinear morphology may be employed to construct a quadratic, cubic, or polynomial equation, etc., between the linewidth difference and the displacement.
[0120] Since each sample image is acquired at equal displacement intervals, the displacement intervals between each pair of sample image samples at adjacent acquisition positions can be considered the change in the displacement of the laser detection device between adjacent acquisition positions relative to the focus position. Based on the laser linewidth differences corresponding to each pair of sample image samples, the change in the linewidth difference between adjacent acquisition positions relative to the focus position of the laser detection device can be determined. By studying the relationship between the change in linewidth difference and the change in displacement at adjacent acquisition positions, the model parameters for the aforementioned quantitative relationship model between linewidth difference and displacement can be fitted. This allows the relationship between linewidth difference and displacement to be determined.
[0121] In this embodiment, the laser center points in multiple sample image samples collected at equal displacement intervals are mapped to a coordinate system to determine the original laser form of the laser detection equipment, and a data fitting method corresponding to the original laser form is adopted to construct a quantitative relationship model between the line width difference and the displacement. The laser line width difference in each sample image sample and the displacement interval between each sample image sample are used to learn the relationship between the change in the laser line width difference and the change in the displacement, so as to fit the model parameters in the quantitative relationship model and determine the relationship between the line width difference and the displacement. This can improve the fitting efficiency and accuracy of the relationship between the line width difference and the displacement.
[0122] In one embodiment, the original laser morphology may include a nonlinear morphology. As shown in FIG6 , the above step S506 may further include the following steps S602 to S610 . In which:
[0123] Step S602: adopting a polynomial fitting method corresponding to the nonlinear morphology: constructing a polynomial fitting relationship between the laser line width difference and the displacement interval at a preset order through a pre-trained deep learning model.
[0124] For example, a pre-trained deep learning model, such as a convolutional neural network model, may be deployed in the laser detection device. The pre-trained deep learning model may store a quantitative relationship model of a preset order. For example, when the preset order is second order, the pre-trained deep learning model may store a quantitative relationship model of a quadratic function or a system of quadratic equations.
[0125] Laser detection equipment can adopt a polynomial fitting method corresponding to the nonlinear morphology: the laser line width difference extracted from each sample image sample and the displacement interval between each sample image sample are input into a pre-trained deep learning model, and the pre-trained deep learning model is used to construct a polynomial fitting relationship between the laser line width difference and the displacement interval at a preset order based on the quantitative relationship characteristics at a preset order.
[0126] Step S604 : acquiring a verification image captured at a preset displacement from the focus position, and determining a verification line width difference between the laser line width in the verification image and a target line width threshold.
[0127] The verification image may represent a sample image captured by a laser detection device at a known position.
[0128] For example, the laser detection device can acquire a verification image at a preset displacement from the focal position. Referring to the laser linewidth determination method provided in the above embodiment, the maximum laser linewidth in the verification image can be extracted. The laser linewidth in the verification image is then compared with a target linewidth threshold to obtain a verification linewidth difference corresponding to the verification image.
[0129] Step S606 : determining a verification displacement corresponding to the verification line width difference according to a polynomial fitting relationship of a preset order.
[0130] Step S608 : generating a fitting accuracy corresponding to a polynomial fitting relationship of a preset order according to the verified displacement and the preset displacement.
[0131] For example, the laser detection device may substitute the verification linewidth difference determined in step S604 into the polynomial fitting relationship of the preset order constructed in step S602 to obtain a verification displacement corresponding to the verification linewidth difference. Using the loss function of the deep learning model pre-trained in step S602, the verification displacement and the preset displacement are processed to generate a fitting accuracy corresponding to the polynomial fitting relationship of the preset order obtained in step S602.
[0132] Step S610 : determining the relationship between the line width difference and the displacement according to the comparison result between the fitting accuracy and the preset threshold.
[0133] Exemplarily, a preset threshold value related to the model accuracy of the pre-trained deep learning model may be stored in the laser detection device. The fitting accuracy generated in step S608 is compared with the preset threshold value. When the fitting accuracy is higher than the preset threshold value, the polynomial fitting relationship of the preset order obtained in step S602 can be directly determined as the relationship between the line width difference and the displacement of the laser detection device. When the fitting accuracy is lower than the preset threshold value, the loss function in step S608 can be used to perform reverse error propagation on the pre-trained deep learning model to adjust the model parameters in the deep learning model and generate a new polynomial fitting relationship. Until the fitting accuracy of the new polynomial fitting relationship is greater than the preset threshold value.
[0134] In this embodiment, a polynomial fitting relationship corresponding to the nonlinear morphology is adopted, and a pre-trained deep learning model is used to fit and construct the line width difference and displacement of the laser detection equipment imaging relative to the focus position. The polynomial fitting relationship at a preset order is used, and the verification image collected at a known position is used to detect the fitting accuracy of the polynomial fitting relationship generated by the deep learning model, thereby determining the relationship between the line width difference and the displacement that the laser detection equipment can use in the real-time acquisition stage, which can improve the fitting accuracy of the line width difference and the displacement of the laser detection equipment with nonlinear morphology.
[0135] In one embodiment, the preset order may be any one selected from a plurality of orders, which may include but are not limited to first order, second order, third order, fourth order, etc.
[0136] The above step S610 can also be implemented in the following manner:
[0137] When the fitting accuracy corresponding to the preset order is less than the preset threshold, a polynomial fitting relationship between the laser linewidth difference and the displacement interval at the remaining orders is constructed through the deep learning model. The remaining orders can represent any order different from the preset order among multiple orders;
[0138] When the fitting accuracy corresponding to the polynomial fitting relationship under other orders meets the preset threshold, the polynomial fitting relationship under other orders is used as the relationship between the line width difference and the displacement.
[0139] For example, when the fitting accuracy corresponding to a preset order is less than a preset threshold, the laser detection device can select any order different from the preset order from multiple orders as the remaining order to be fitted, and input the quantitative relationship models of the remaining orders into the pre-trained deep learning model to cover the quantitative relationship model of the preset order. The processed deep learning model refers to the fitting operation of the polynomial fitting relationship for the preset order provided in the above embodiment to construct a polynomial fitting relationship for the laser linewidth difference and displacement interval for the remaining orders currently being fitted.
[0140] Using the verification line width difference corresponding to the verification image and the preset displacement between the acquisition position and the focus position of the verification image, and referring to the fitting accuracy determination method provided in the above embodiment, fitting accuracies corresponding to the polynomial fitting relationships of the remaining orders can be generated. When the fitting accuracies of the remaining orders meet the preset threshold, the polynomial fitting relationships of the remaining orders obtained from the current fitting can be used as the relationship between the line width difference and the displacement of the laser detection device.
[0141] Optionally, in other embodiments, when the fitting accuracy of the remaining orders is still less than the preset threshold, the above operation can be repeated to select another order from the multiple orders to estimate the polynomial fitting relationship, until the fitting accuracy of the polynomial fitting relationship obtained by fitting satisfies the preset threshold.
[0142] In this embodiment, by selecting different orders to estimate the polynomial fitting relationship when the fitting accuracy does not meet the preset threshold, the fitting accuracy of the polynomial fitting relationship for the nonlinear laser detection device can be improved.
[0143] In one embodiment, the original laser morphology may include a linear morphology.
[0144] As shown in FIG7 , the above step S506 may further include the following steps S702 to S706 .
[0145] Step S702 : dividing the plurality of sample image samples into upper defocused samples and lower defocused samples according to the positional relationship between the laser center point and the focus center point.
[0146] The focus center point is the center point of the laser collected by the laser detection device at the focus position.
[0147] For example, the laser detection device can determine the positional relationship between the laser center point and the focus center point by comparing the coordinates of the laser center point in each sample image sample with the coordinates of the focus center point in the sample image captured by the laser detection device at the focus position. Sample image samples in which the laser center point is above the focus center point are classified as upper defocus samples. Sample image samples in which the laser center point is below the focus center point are classified as lower defocus samples.
[0148] In step S704, a linear fitting method corresponding to the linear morphology is used to perform linear fitting on the laser line width difference and displacement interval of the upper defocus sample to obtain the upper defocus relationship, and a linear fitting is performed on the laser line width difference and displacement interval of the lower defocus sample to obtain the lower defocus relationship.
[0149] Step S706 : Using the upper defocus relationship and the lower defocus relationship as the relationship between the line width difference and the displacement.
[0150] Exemplarily, the laser detection equipment can adopt a linear fitting method corresponding to the linear form. For example, a quantitative relationship model can be constructed with a linear equation or a group of linear equations, and the laser line width difference and the corresponding displacement interval corresponding to the sample image sample are input into the quantitative relationship model to fit the model parameters, thereby determining the linear relationship between the line width difference and the displacement amount.
[0151] Linear fitting is performed on the laser line width difference corresponding to the upper defocus sample and the displacement interval between the laser line width differences corresponding to the upper defocus sample to obtain the upper defocus relationship between the line width difference and the displacement; linear fitting is performed on the laser line width value corresponding to the lower defocus sample and the displacement interval corresponding to the lower defocus sample to obtain the lower defocus relationship between the line width difference and the displacement.
[0152] In this embodiment, by adopting a regional fitting method for the laser detection equipment in a linear form, the upper defocus relationship between the line width difference and the displacement is obtained by fitting for the case where the laser center point is above the focusing center point, and the lower defocus relationship between the line width difference and the displacement is obtained by fitting for the case where the laser center point is below the focusing center point. This can improve the relationship fitting accuracy for the laser detection equipment in a linear form.
[0153] In one embodiment, based on the relationship between the line width difference and the displacement in the linear form shown in FIG7 , the above step S306 can also be implemented in the following manner:
[0154] When the laser center position in the sample image is above the focus center point, the target displacement corresponding to the target line width difference is determined according to the upper defocus relationship;
[0155] When the center position of the laser in the sample image is below the focus center point, the target displacement corresponding to the target line width difference is determined according to the lower defocus relationship.
[0156] For example, when the center of the laser beam in a sample image captured in real time by the laser detection device is above the focal point, it can be determined that the laser detection device needs to be moved downward to the focal position. The upper defocus relationship obtained by fitting in step S704 is used to determine a target displacement corresponding to the target line width difference of the sample image. Based on the target displacement, the Z-axis stage is moved downward a corresponding distance to move the laser detection device to the focal position.
[0157] Accordingly, when the laser center is below the focal point, it can be determined that the laser detection device needs to be moved upward to the focal position. The lower defocus relationship obtained by fitting in step S704 is used to determine the target displacement corresponding to the current laser detection device. Based on the target displacement, the Z-axis translation stage is moved upward a corresponding distance to move the laser detection device to the focal position.
[0158] In this embodiment, by utilizing the laser center position in the sample image acquired in real time by the laser detection device, it is determined whether the current acquisition position of the laser detection device is the upper defocus area or the lower defocus area, and then the target displacement is determined by using the known linear relationship between the line width difference and the displacement in the corresponding area. According to the target displacement, the laser detection device is controlled to move to the focusing position to achieve focusing, which can improve the accuracy of determining the target displacement and the focusing accuracy of the laser detection device.
[0159] In one embodiment, as shown in FIG8 , a method for determining a target displacement is provided, including the following steps S802 to S818 .
[0160] Step S802 : obtaining a plurality of sample image samples collected at equal displacement intervals, and determining the laser center point in each sample image sample and the laser line width difference relative to the target line width threshold.
[0161] For example, in the early relationship fitting stage, the laser detection device can obtain multiple sample image samples collected by itself at equal displacement intervals. Each sample image sample is grayscaled and binarized, and then the contour of the processed binary image is extracted to obtain the laser line in each sample image sample. The point with the largest laser line width value in the laser line is used as the laser center point. The maximum laser line width in the laser line is calculated and processed with the target line width threshold collected by the laser detection device at the focus position to obtain the laser line width difference of each sample image sample relative to the target line width threshold.
[0162] Step S804: determining the original laser shape according to the mapping result of the laser center point on the coordinate system.
[0163] Exemplarily, in the early relationship fitting stage, the laser detection device can determine that its original laser shape is a nonlinear shape based on the mapping result of the laser center point in each sample image sample on the coordinate system, and execute the following steps S806 and S810; or determine that its original laser shape is a linear shape, and execute the following steps S808 to S810.
[0164] In step S806, a polynomial fitting method corresponding to the nonlinear morphology is used to construct a polynomial fitting relationship between the laser line width difference and the displacement interval at different orders through a pre-trained deep learning model.
[0165] For example, during the initial relationship fitting phase, the laser detection equipment can employ a polynomial fitting method corresponding to the nonlinear morphology. Using a pre-trained deep learning model, starting from the lowest order, quantitative relationship models for the laser linewidth difference and displacement interval at different orders are sequentially constructed. The model parameters of the quantitative relationship model are fitted using the changes in the laser linewidth difference at adjacent acquisition positions and the changes in the displacement from the focus position, thereby obtaining a polynomial fitting relationship for the laser linewidth difference and displacement interval at different orders.
[0166] Step S808 : Based on the positional relationship between the laser center point and the focus center point, a linear fitting method corresponding to the linear form is adopted to perform linear fitting on the upper defocus sample and the lower defocus sample respectively.
[0167] For example, in the early relationship fitting stage, the laser detection equipment can adopt a linear fitting method corresponding to the linear form, and perform linear fitting on the laser line width difference and displacement interval of the upper defocus sample in which the laser center point is above the focusing center point to obtain the upper defocus relationship between the line width difference and the displacement amount; and perform linear fitting on the laser line width difference and displacement interval of the lower defocus sample in which the laser center point is below the focusing center point to obtain the lower defocus relationship between the line width difference and the displacement amount.
[0168] Step S810 , determining the relationship between the line width difference and the displacement amount based on a verification image collected at a preset displacement amount from the focus position.
[0169] For example, the laser detection device may acquire a verification image captured at a preset displacement from the focus position and determine a verification line width difference between the laser line width in the verification image and a target line width threshold at the focus position. Based on the relationship obtained by fitting in step S806 or step S808, a verification displacement corresponding to the verification line width difference is determined. Using the verification displacement and the preset displacement, a fitting accuracy corresponding to the relationship obtained by fitting in step S806 or step S808 is generated. Based on a comparison of the fitting accuracy with a preset threshold, a relationship between the line width difference and the displacement is determined.
[0170] Optionally, in some embodiments, when the fitting accuracy is less than a preset threshold, reverse error propagation can be performed on the relationship fitted in step S806 or step S808 to adjust the model parameters in the quantitative relationship model and refit the relationship between the laser line width difference and the displacement interval.
[0171] Alternatively, in other embodiments, when the fitting accuracy is less than a preset threshold, the original laser morphology may be misjudged. In this case, the relationship between the laser linewidth difference and the displacement interval can be refitted using a method opposite to the previous data fitting method. For example, if the fitting accuracy obtained using a polynomial fitting method corresponding to a nonlinear morphology is less than a preset threshold, a linear fitting method corresponding to a linear morphology can be refitted. The reverse is also true.
[0172] Alternatively, in other embodiments, a computer device such as a host computer or an industrial computer connected to the laser detection device may be used to perform the operations of steps S802 to S810 to calibrate the relationship between the line width difference and the displacement corresponding to the hardware structure of the laser detection device. The calibrated relationship between the line width difference and the displacement is burned into the processor chip of the laser detection device through a programmable logic device, such as a field programmable gate array (FPGA), so that the laser detection device can directly use the known relationship between the line width difference and the displacement to quickly focus during the real-time acquisition phase.
[0173] Step S812: receiving the sample image collected in real time, and determining the laser center position and laser line width in the sample image.
[0174] Illustratively, during the real-time acquisition phase, the laser detection device may receive a sample image acquired in real time, and determine the laser center position and laser line width in the sample image with reference to the laser line width and laser center point extraction operations provided in the above embodiments.
[0175] Step S814: determining the moving direction according to the positional relationship between the focus center point and the laser center position, and determining the target line width difference according to the target line width threshold and the laser line width.
[0176] For example, during the real-time acquisition phase, when the laser center is above the focal center, the laser detection device can be determined to be moving in a downward direction; and when the laser center is below the focal center, the laser detection device can be determined to be moving in an upward direction. The target line width threshold and the laser line width are processed to determine a target line width difference between the target line width threshold and the laser line width.
[0177] Step S816 , determining a target displacement corresponding to the target line width difference according to a preset relationship between the line width difference and the displacement.
[0178] Step S818: Move to the focus position according to the target displacement.
[0179] For example, the laser detection device can use the relationship between the line width difference and the displacement determined in step S810 to generate a target displacement corresponding to the target line width difference obtained in step S814. The motor is controlled based on the target displacement to move the target displacement in the direction determined in step S814 to reach the focus position and achieve focus.
[0180] In this embodiment, in the early relationship fitting stage, the original laser shape is preliminarily judged as linear or nonlinear based on the mapping result of the laser center point on the coordinate system. In the linear form, linear fitting is performed on the upper defocus sample and the lower defocus sample respectively. In the nonlinear form, different orders are selected through the deep learning model for polynomial fitting, so as to obtain the relationship between the line width difference and the displacement that matches the laser detection equipment. In the real-time acquisition stage, the known relationship is directly used to quickly determine the target displacement required for the laser detection equipment to focus. This can improve the efficiency and accuracy of determining the target displacement, thereby achieving the technical effect of rapid focusing of the laser detection equipment.
[0181] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0182] Based on the same inventive concept, embodiments of the present application further provide a target displacement determination device for implementing the target displacement determination method described above. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more target displacement determination device embodiments provided below can be found in the above-mentioned limitations of the target displacement determination method and will not be further elaborated here.
[0183] In one embodiment, as shown in FIG9 , a target displacement determination device 900 is provided, which is applied to a laser detection device and includes: an image acquisition module 902 , a difference determination module 904 , a displacement calculation module 906 , and a device focus module 908 , wherein:
[0184] The image acquisition module 902 is used to receive sample images collected in real time.
[0185] The difference determination module 904 is used to determine the target line width difference between the laser line width in the sample image and the target line width threshold, where the target line width threshold is the laser line width value collected by the laser detection device at the focus position.
[0186] The displacement calculation module 906 is used to determine the target displacement corresponding to the target line width difference based on the relationship between the preset line width difference and the displacement, wherein the relationship between the line width difference and the displacement is obtained by fitting the laser line width difference and the displacement interval corresponding to the laser line width difference through a data fitting method; the laser line width difference is collected by the laser detection device; and the data fitting method is a data fitting method corresponding to the original laser shape of the laser detection device.
[0187] The device focus module 908 is used to move to a focus position according to the target displacement.
[0188] In one embodiment, the target displacement determination device 900 further includes a relationship fitting module. The relationship fitting module includes: a sample acquisition unit, configured to acquire multiple sample image samples collected at equal displacement intervals, and determine the laser center point in each sample image sample and the laser line width difference relative to the target line width threshold; a morphology determination unit, configured to determine the original laser morphology based on the mapping result of the laser center point on the coordinate system; and a relationship fitting unit, configured to use a data fitting method corresponding to the original laser morphology to fit the laser line width difference corresponding to each sample image sample and the displacement interval between each sample image sample, thereby obtaining a relationship between the line width difference and the displacement amount.
[0189] In one embodiment, the original laser morphology includes a nonlinear morphology. The target displacement determination device 900 also includes a nonlinear fitting module. The nonlinear fitting module is further used to: adopt a polynomial fitting method corresponding to the nonlinear morphology: construct a polynomial fitting relationship between the laser linewidth difference and the displacement interval at a preset order through a pre-trained deep learning model; obtain a verification image collected at a preset displacement from the focus position, and determine the verification linewidth difference between the laser linewidth in the verification image and the target linewidth threshold; determine the verification displacement corresponding to the verification linewidth difference based on the polynomial fitting relationship at a preset order; generate a fitting accuracy corresponding to the polynomial fitting relationship at a preset order based on the verification displacement and the preset displacement; and determine the relationship between the linewidth difference and the displacement based on the comparison result of the fitting accuracy and the preset threshold.
[0190] In one embodiment, the preset order is any one selected from a plurality of orders. The relationship fitting unit is further configured to, when the fitting accuracy corresponding to the preset order is less than a preset threshold, construct a polynomial fitting relationship between the laser line width difference and the displacement interval at the remaining orders through a deep learning model, where the remaining orders may represent any order different from the preset order among the plurality of orders; and when the fitting accuracy corresponding to the polynomial fitting relationship at the remaining orders satisfies the preset threshold, use the polynomial fitting relationship at the remaining orders as the relationship between the line width difference and the displacement.
[0191] In one embodiment, the original laser morphology includes a linear morphology. The target displacement determination device 900 also includes a linear fitting module. The linear fitting module is further used to: divide the multiple sample image samples into upper defocus samples and lower defocus samples according to the positional relationship between the laser center point and the focus center point, where the focus center point is the laser center point collected by the laser detection device at the focus position; adopt a linear fitting method corresponding to the linear morphology to perform linear fitting on the laser line width difference and displacement interval of the upper defocus sample to obtain an upper defocus relationship, and perform linear fitting on the laser line width difference and displacement interval of the lower defocus sample to obtain a lower defocus relationship; and use the upper defocus relationship and the lower defocus relationship as the relationship between the line width difference and the displacement.
[0192] In one embodiment, the displacement calculation module 906 is also used to determine the target displacement corresponding to the target line width difference according to the upper defocus relationship when the center position of the laser in the sample image is above the focus center point; when the center position of the laser in the sample image is below the focus center point, determine the target displacement corresponding to the target line width difference according to the lower defocus relationship.
[0193] In one embodiment, the difference determination module 904 is also used to grayscale the sample image to obtain a grayscale image of the sample image; binarize the grayscale image using a preset grayscale threshold to obtain a binary image of the sample image; determine the laser line in the sample image based on the image contour information in the binarized image; and perform calculations on the laser line width of the laser line and the target line width threshold to obtain a target line width difference.
[0194] Each module in the target displacement determination device 900 may be implemented in whole or in part by software, hardware, or a combination thereof. Each module may be embedded in or independent of a processor in a computer device in the form of hardware, or may be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.
[0195] In one embodiment, a laser detection device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0196] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.
[0197] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0198] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0199] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.
[0200] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0201] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.
Claims
1. A method for determining a target displacement, characterized in that: Applied to laser detection equipment, the method comprises: receiving a sample image acquired in real time; Determine a target line width difference between a laser line width in the sample image and a target line width threshold, wherein the target line width threshold is a laser line width value collected by the laser detection device at a focus position; According to a preset relationship between a line width difference and a displacement, a target displacement corresponding to the target line width difference is determined, wherein the relationship between the line width difference and the displacement is obtained by fitting the laser line width difference and the displacement interval corresponding to the laser line width difference through a data fitting method; the laser line width difference is collected by the laser detection device; and the data fitting method is a data fitting method corresponding to the original laser form of the laser detection device; The focus position is moved according to the target displacement.
2. The method according to claim 1, characterized in that: The original laser morphology includes a nonlinear morphology; the fitting method of the relationship between the line width difference and the displacement includes: A polynomial fitting method corresponding to the nonlinear morphology is adopted, and a polynomial fitting relationship between the laser line width difference and the displacement interval at a preset order is constructed through a pre-trained deep learning model; Acquire a verification image collected at a preset displacement from the focus position, and determine a verification line width difference between a laser line width in the verification image and the target line width threshold; Determining a verification displacement corresponding to the verification line width difference according to the polynomial fitting relationship under the preset order; Generating a fitting accuracy corresponding to a polynomial fitting relationship under the preset order according to the verification displacement and the preset displacement; According to the comparison result of the fitting accuracy and the preset threshold, the relationship between the line width difference and the displacement is determined.
3. The method according to claim 2, characterized in that The preset order is any order selected from multiple orders; Determining the relationship between the line width difference and the displacement according to the comparison result between the fitting accuracy and the preset threshold value includes: When the fitting accuracy corresponding to the preset order is less than the preset threshold, a polynomial fitting relationship between the laser line width difference and the displacement interval at other orders is constructed by the deep learning model, and the other orders represent any order different from the preset order among the multiple orders; When the fitting accuracy corresponding to the polynomial fitting relationship under the remaining orders meets the preset threshold, the polynomial fitting relationship under the remaining orders is used as the relationship between the line width difference and the displacement.
4. The method according to claim 3, characterized in that The method further comprises: When the fitting accuracy of the remaining orders is still less than the preset threshold, another remaining order is selected from the multiple orders to infer the polynomial fitting relationship until the fitting accuracy of the polynomial fitting relationship obtained by fitting meets the preset threshold.
5. The method according to claim 1, characterized in that The fitting method of the relationship between the line width difference and the displacement includes: Acquire multiple sample image samples collected at equal displacement intervals, determine the laser center point in each sample image sample and the laser line width difference relative to the target line width threshold; According to the mapping result of the laser center point on the coordinate system, the original laser shape is determined; The data fitting method corresponding to the original laser morphology is used to fit the laser line width difference corresponding to each sample image sample and the displacement interval between two sample image samples to obtain the relationship between the line width difference and the displacement.
6. The method according to claim 1, characterized in that The original laser shape includes a linear shape; the fitting method of the relationship between the line width difference and the displacement includes: According to the positional relationship between the laser center point and the focus center point, the plurality of sample image samples are divided into upper defocus samples and lower defocus samples, wherein the focus center point is the laser center point collected by the laser detection device at the focus position; A linear fitting method corresponding to the linear morphology is used to calculate the laser line width difference and position of the upper defocused sample. The upper defocus relationship is obtained by linear fitting based on the displacement interval, and the lower defocus relationship is obtained by linear fitting based on the laser line width difference and the displacement interval of the lower defocus sample; The upper defocus relationship and the lower defocus relationship are used as the relationship between the line width difference and the displacement.
7. The method according to claim 6, characterized in that The method of dividing the plurality of sample image samples into upper defocused samples and lower defocused samples according to the positional relationship between the laser center point and the focus center point comprises: The sample image samples whose laser center point is above the focus center point are divided into upper defocused samples; The sample image samples where the laser center point is below the focus center point are classified as lower defocused samples.
8. The method according to claim 6, characterized in that Determining a target displacement corresponding to the target line width difference according to a preset relationship between the line width difference and the displacement includes: When the center position of the laser in the sample image is above the focus center point, determining a target displacement corresponding to the target line width difference according to the upper defocus relationship; When the center position of the laser in the sample image is below the focus center point, the target displacement corresponding to the target line width difference is determined according to the lower defocus relationship.
9. The method according to any one of claims 1 to 8, characterized in that The step of determining a target line width difference between a laser line width in the sample image and a target line width threshold comprises: Performing grayscale processing on the sample image to obtain a grayscale image of the sample image; Using a preset grayscale threshold to perform binarization processing on the grayscale image to obtain a binarized image of the sample image; Determining the laser line in the sample image according to the image contour information in the binary image; The laser line width of the laser line and the target line width threshold are processed by calculation to obtain the target line width difference.
10. The method according to claim 9, characterized in that: The step of using a preset grayscale threshold to perform binarization processing on the grayscale image to obtain a binarized image of the sample image includes: Determine pixels in the grayscale image whose grayscale values are less than the grayscale threshold as background pixels that are not on the laser line; Reset the grayscale value of the background pixel to the first threshold; Determine the pixel points in the grayscale image whose grayscale values are greater than the grayscale threshold as the target pixel points on the laser line; The grayscale value of the target pixel is reset to the second threshold value to obtain a binary image of the sample image.
11. The method according to claim 9, characterized in that: The step of determining the laser line in the sample image according to the image contour information in the binary image comprises: The binary image is processed by morphological opening and closing operation to remove the noise in the binary image; The contour of the binary image after noise removal is extracted, and the connected area composed of multiple pixels with the same gray value is taken as the area where the laser line is located, so as to obtain the image contour information corresponding to the laser line in the sample image; The image segmentation algorithm is used to perform contour extraction processing on the extracted image contour information again to obtain the laser line in the sample image.
12. A device for determining a target displacement, characterized in that: Applied to laser detection equipment, the device comprises: An image acquisition module, used for receiving sample images collected in real time; a difference determination module, used to determine a target line width difference between the laser line width in the sample image and a target line width threshold, wherein the target line width threshold is a laser line width value collected by the laser detection device at a focus position; A displacement calculation module, for determining a target displacement corresponding to the target line width difference according to a preset relationship between the line width difference and the displacement, wherein the relationship between the line width difference and the displacement is obtained by fitting the laser line width difference and the displacement interval corresponding to the laser line width difference through a data fitting method; the laser line width difference is collected by the laser detection device; and the data fitting method is a data fitting method corresponding to the original laser form of the laser detection device; The device focusing module is used to move to the focusing position according to the target displacement.
13. A laser detection device, comprising a processor and a memory, wherein a computer program is stored in the memory, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 11 are implemented.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.
15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.
Citation Information
Patent Citations
Automatic focusing method used for image plane digital holographic microscopic measurement
CN106502074A
Method for detecting emergent laser rays of laser level based on machine vision
CN106546263A
On-line image analysis-based focusing method of laser direct writing system
CN106970507A
Calibration method and calibration device of line structured light measurement system, and system
CN112797915A
Bridge modal recognition method and system based on laser stripe center tracking
CN112906095A