Method and device for measuring thickness variation of target object
The Z-axis focus is adjusted by obtaining the change in image clarity through a microscope, and the thickness of the target object is indirectly measured, which solves the problem of high-precision non-contact measurement in the existing technology and realizes highly flexible and high-precision thickness measurement.
Patent Information
- Application Number
- CN202510821644.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-19
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2045-06-19
AI Technical Summary
Existing thickness measurement methods cannot meet the needs of high-precision, non-contact measurement, especially in the measurement of sub-micron precision and complex samples. Contact sensors may damage samples and laser confocal sensors have limited test range at high resolution.
The current frame image and the previous frame image of the reference object are obtained through a microscope, the change in clarity is calculated, the Z axis of the microscope is adjusted to maintain focus, and the thickness change is indirectly measured based on the change in clarity. The thickness change of the target object is inferred from the change in image clarity.
It achieves high-precision, non-contact measurement, improves measurement flexibility and accuracy, and can capture tiny thickness changes, surpassing the spatial resolution limitations of traditional microscopes.
Smart Images

Figure CN120403460B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a method and device for measuring thickness variation of a target object. Background Art
[0002] Thickness / height measurement is an essential component of materials science and engineering applications. Traditional contact measurement methods, such as contact sensors, can meet basic measurement requirements to a certain extent. However, their inherent contact characteristics require direct contact with the object being measured. This can interfere with the surface condition of the object being measured and may even cause mechanical damage, especially for soft or delicate materials. Furthermore, the resolution of contact sensors is mostly above the micron level, limiting their application in high-precision measurement applications, particularly where submicron accuracy is required. Furthermore, some samples require specific atmospheres for testing, making contact sensors inappropriate. Consequently, laser confocal sensors, another common method for measuring thickness variation, offer improved resolution, but this sacrifices measurement range for high resolution. In high-resolution mode, the limited measurement range of laser confocal sensors makes them unsuitable for samples with a wide range of thickness variations, limiting their application in measuring complex samples. Consequently, existing thickness / height measurement methods have limitations and cannot meet the demands of high-precision, non-contact measurement. Summary of the Invention
[0003] In order to overcome the deficiencies of the prior art, the present invention provides a method and device for measuring the thickness variation of a target object to be measured, thereby achieving high-precision, non-contact measurement.
[0004] A first aspect of the present application provides a method for measuring a thickness variation of a target object, the method comprising:
[0005] Acquire a current frame image and a previous frame image of a reference object, and calculate a change in clarity between the current frame image and the previous frame image, wherein the current frame image and the previous frame image are acquired through a microscope;
[0006] According to the clarity change amount and a preset threshold, adjusting the microscope Z axis of the microscope so that the microscope focuses on the reference object;
[0007] The thickness change of the target object is calculated according to the movement distance of the Z axis of the microscope according to the clarity change.
[0008] In an optional implementation, the calculating the definition change between the current frame image and the previous frame image includes:
[0009] Obtaining a first clarity score of the current frame image and a second clarity score of the previous frame image;
[0010] determining a clarity score difference between the first clarity score and the second clarity score;
[0011] The clarity score difference is normalized to obtain the clarity change.
[0012] In an optional embodiment, it is characterized in that the method further comprises:
[0013] Obtaining a best-focused image of the reference object, and determining a clarity score corresponding to the best-focused image as a highest clarity score;
[0014] Obtaining a blurred focused image of the reference object when the microscope has a defocus distance equal to the depth of field of the objective lens used by the microscope, and determining a clarity score corresponding to the blurred focused image as a minimum clarity score;
[0015] Acquire a first reference object image of the reference object in different defocus states to obtain a reference object image set;
[0016] calculating a third clarity score for each first reference object image in the reference object image set;
[0017] fitting a functional relationship between a clarity change rate and a height change rate according to the highest clarity score, the lowest clarity score, and the third clarity score;
[0018] The functional relationship between the definition change rate and the height change rate is determined as a definition-height mapping relationship.
[0019] In an optional embodiment, it is characterized in that adjusting the Z axis of the microscope according to the clarity change and a preset threshold so that the microscope focuses on the reference object includes:
[0020] Determining the height change corresponding to the clarity change according to the clarity-height mapping relationship;
[0021] Comparing the height change with the preset threshold;
[0022] When the height change is greater than the preset threshold, determining to adjust the Z axis of the microscope;
[0023] After controlling the Z-axis of the microscope to move a preset step length in a first direction, acquiring a second reference object image of the reference object after the movement, and calculating a fourth clarity score of the second reference object image;
[0024] When the fourth clarity score increases, it is determined that the thickness change direction of the target object is the same as the first direction, and the Z axis of the microscope is controlled to move according to the first direction to focus on the reference object;
[0025] When the fourth clarity score decreases, the Z-axis of the microscope is controlled to move in a second direction, and the operation of acquiring a second reference object image of the moved reference object is performed, where the second direction is opposite to the first direction.
[0026] In an optional embodiment, the calculating the thickness change of the target object according to the clarity change and the movement distance of the microscope Z axis includes:
[0027] When it is determined that the height change is less than the preset threshold, determining the thickness change according to the height change;
[0028] When it is determined that the height change is greater than the preset threshold, obtaining the moving distance of the microscope Z axis;
[0029] The thickness variation is determined according to the height variation and the moving distance of the microscope Z axis.
[0030] In an optional embodiment, determining the thickness variation according to the height variation and the movement distance of the microscope Z axis includes:
[0031] determining a first movement distance of the microscope Z axis in the first direction and a second movement distance in the second direction;
[0032] Determine a total Z-axis movement distance of the microscope Z-axis according to the first movement distance and the second movement distance;
[0033] The thickness variation is determined according to the total Z-axis movement distance and the height variation.
[0034] In an optional embodiment, the preset threshold is an adjustable parameter set according to system characteristic parameters, and the system characteristic parameters include the clarity-height mapping relationship and the minimum movable resolution of the microscope Z axis.
[0035] In an optional embodiment, the preset threshold conforms to the linear relationship interval of the clarity-height mapping relationship, and the preset threshold is greater than the minimum resolution of the z-axis.
[0036] In an optional embodiment, before obtaining the current frame image and the previous frame image of the reference object, the method further includes: placing the reference object at the center of the test area, placing the target object under the reference object in contact with the lower surface of the reference object; and aligning the reference object with the microscope to set the current focus reference of the microscope, so that the microscope obtains the current frame image based on the current focus reference.
[0037] The second aspect of the present application provides a device for measuring the thickness change of a target object to be measured, which is used to place the target object to be measured and a reference object, and includes a relatively fixed lower base and a movable upper cover. The reference object is arranged on the upper cover and is in contact with the target object to be measured, and is displaced as the thickness of the target object to be measured changes.
[0038] A third aspect of the present application provides an electronic device, comprising 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 steps of the method for measuring the thickness change of the target object are implemented.
[0039] A fourth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-mentioned method for measuring the thickness variation of the target object.
[0040] In summary, the method and device for measuring the thickness change of the target object to be measured provided by the present application use non-contact imaging under a microscope to indirectly measure the thickness by analyzing the change in image clarity, without the need for physical contact with the sample. When the clarity of the image of the reference object at the previous moment and the image of the reference object at the current moment change, the Z-axis position of the microscope is dynamically adjusted according to the clarity change and the preset threshold to maintain focus. The Z-axis displacement and the height change corresponding to the clarity change are used to reversely infer the thickness change of the target object to be measured, and the thickness measurement is converted into displacement measurement to realize non-contact measurement, thereby improving the measurement accuracy and flexibility. In addition, the subtle change trend of image clarity can be used to sensitively capture the thickness change of the object to be measured, and the measurement accuracy is higher than the spatial resolution capability determined by the depth of field of a traditional electron microscope. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 1 is a schematic structural diagram of a device for measuring thickness variation of a target object shown in an embodiment of the present application;
[0042] Figure 2 1 is a flow chart of a method for measuring thickness variation of a target object shown in an embodiment of the present application;
[0043] Figure 3It is a structural diagram of an electronic device shown in an embodiment of the present application. DETAILED DESCRIPTION
[0044] The present invention will be further described below with reference to the accompanying drawings and examples.
[0045] The following will clearly and completely describe the concept, specific structure and technical effects of the present invention in combination with the embodiments and drawings, so as to fully understand the purpose, characteristics and effects of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention. In addition, all the connection / connection relationships involved in the patent do not refer to the direct connection of components, but refer to the fact that a better connection structure can be formed by adding or reducing connection accessories according to the specific implementation situation. The various technical features in the invention can be combined interactively without conflicting with each other.
[0046] Reference Figure 1 , which is a schematic structural diagram of a device for measuring the thickness variation of a target object shown in an embodiment of the present application.
[0047] The device for measuring the thickness variation of the target object to be measured is used to place the target object to be measured and the reference object, and cooperate with the microscope system to collect the focal length change caused by the displacement of the reference object to indirectly measure the thickness variation of the target object to be measured. The device for measuring the thickness variation of the target object to be measured has a relatively fixed lower base and a movable upper cover, the upper cover is provided with a sealed transparent window, and the lower base contains a rigid component that remains stationary during the thickness variation measurement process. In addition, the target object to be measured and the reference object are placed in the device, the reference object is provided on the upper cover, and the target object to be measured is placed under the reference object and contacts the lower surface of the reference object. As the thickness of the target object to be measured changes, that is, expands and contracts, the target object moves up and down.
[0048] In some embodiments, the device for measuring the thickness variation of the target object can be placed on a temperature control platform, or a temperature control system can be integrated into the lower part of the sealed cavity.
[0049] In some embodiments, the present application also provides a thickness variation measurement system for a target object to be measured, and the system may include a thickness variation measurement device for the target object to be measured and a microscope, for collecting a reference object image of a reference object, and transmitting the reference object image to an electronic device, so that the electronic device determines the thickness variation of the target object to be measured through the reference object image. The microscope may be a digital microscope or an optical microscope, which is not limited in the present application. The microscope may include a high numerical aperture (NA) objective lens, for example, NA=0.8, and the depth of field DOF of the objective lens used in the microscope is obtained according to the NA. In addition, the microscope also includes a high-precision Z-axis motor, wherein the stepping accuracy can be 20 nanometers, supporting precise adjustment of small thickness changes.
[0050] Wherein, the target object to be measured refers to the subject whose thickness change needs to be measured. In some embodiments, the target object to be measured can be a material, and the corresponding thickness change refers to the volume expansion change during heating or stress. In other embodiments, the target object to be measured can be a battery electrode material, and the corresponding thickness change refers to the thickness change during electrochemical charging and discharging. Before measuring the thickness change, manual or automatic focusing is required to align the microscope with a reference object above the target object to be measured, where the reference object is located in the center of the test area.
[0051] In order to facilitate understanding of the inventive concept of the present application, the target object to be measured in the embodiments of the present application is explained by taking an electrode as an example to monitor the dynamic changes in the thickness of the electrode during the charging and discharging process of the battery.
[0052] In some embodiments, the rigid component includes a bottom rigid component and an upper rigid component. The bottom rigid component is fixed to a lower base and can be connected to a pressure sensor. The inner surface is flat and conductive, ensuring full contact with the lower surface of the battery electrode. The upper rigid component is free to move vertically, with the bottom contacting the upper surface of the battery electrode and the top serving as a reference object. Furthermore, high-precision guide rails or linear bearings can be used to ensure that the upper component moves only in the vertical direction to prevent tilting. The electrode (such as a lithium-ion battery electrode) is clamped between the two rigid components, and a slight preload (e.g., 1N to 5N) is applied to ensure contact but not restrict expansion. The reference object is then aligned using the center field of view of a microscope.
[0053] Reference Figure 2 1 is a flow chart of a method for measuring a thickness variation of a target object to be measured according to an embodiment of the present application. The method for measuring a thickness variation of a target object to be measured includes the following steps.
[0054] S21 , obtaining a current frame image and a previous frame image of a reference object, and calculating a definition change between the current frame image and the previous frame image.
[0055] The current frame image and the previous frame image are acquired via a microscope. In some embodiments, the microscope can capture an image of the reference object at the current moment, referred to as the current frame image; similarly, the microscope also captured an image of the reference object at the moment before the current moment, referred to as the previous frame image. When the microscope captures the reference object image, the reference object image is actively or passively transmitted to the electronic device in real time. After acquiring the current frame image and the previous frame image, the electronic device can calculate the change in clarity between the current frame image and the previous frame image.
[0056] In an optional implementation, the calculating the definition change between the current frame image and the previous frame image includes:
[0057] Obtaining a first clarity score of the current frame image and a second clarity score of the previous frame image;
[0058] determining a clarity score difference between the first clarity score and the second clarity score;
[0059] The clarity score difference is normalized to obtain the clarity change.
[0060] In some embodiments, the electronic device first determines a clarity score for the current frame image and a clarity score for the previous frame image. For ease of distinction, the clarity score for the current frame image is referred to as the first clarity score, and the clarity score for the previous frame image is referred to as the second clarity score. The electronic device may evaluate the clarity score based on the texture details or edge information strength of the reference object image, for example, based on image gradients, image frequency components, and edge variations. In embodiments of the present application, the clarity score is quantified by image gradient values or pixel intensity changes. Typically, while maintaining imaging system parameters, changes in image clarity primarily reflect changes in focus position. Specifically, the electronic device may utilize a clarity evaluation algorithm, such as the Sobel gradient method or the Laplace operator method, to first calculate the horizontal and vertical gradients of the reference object region in the current frame image. These gradients are then used to calculate the gradient magnitudes of the corresponding pixels. The gradient magnitudes of all pixels are then summed to determine the first clarity score for the current frame image. Similarly, the second clarity score may be determined using the same method as for determining the first clarity score.
[0061] After determining the second clarity score of the previous image frame and the first clarity score of the current image frame, the clarity score difference between the first and second clarity scores can be calculated, where clarity score difference = first clarity score - second clarity score. The clarity scores are then normalized to obtain the clarity change (in percentage form), also known as the clarity change percentage. Here, clarity change = (clarity score difference / second clarity score) × 100%. Normalization unifies values of varying magnitudes into a specific range (e.g., 0% to 100%) to facilitate subsequent comparisons and calculations. For example, assuming the second clarity score is 100 and the first clarity score is 90, then the clarity score difference = |first clarity score - second clarity score| = |90 - 100| = 10, and the clarity change = clarity score difference / second clarity score × 100% = 10 / 100 × 100% = 10%.
[0062] To facilitate understanding of the inventive concept of this application, this application provides an embodiment using a tool code example, the code is as follows:
[0063] # Calculate the percentage change in clarity
[0064] def calculate_clearance(previous_score, current_score):
[0065] if previous_score == 0:
[0066] return 0# Or directly return a maximum value, such as 100%, depending on actual needs
[0067] change = abs(current_score - previous_score)
[0068] change_percentage = (change / previous_score) * 100
[0069] return change_percentage
[0070] In some embodiments, when acquiring a reference object image (including a previous frame image and a current frame image), the electronic device may pre-process the reference object image, for example, first converting the reference object image into a black and white image to reduce the amount of calculation, and then using CUDA to perform Sobel convolution and gradient accumulation in parallel to increase the calculation speed.
[0071] S22 , adjusting the Z axis of the microscope according to the clarity change and a preset threshold value so that the microscope focuses on the reference object.
[0072] In some embodiments, when a change in sharpness is obtained, a corresponding change in height can be determined, and the corresponding change in height can be compared with a preset threshold. When the change in height is determined to be greater than the preset threshold, the microscope's z-axis is adjusted to refocus the microscope on the reference object. Specifically, the preset threshold falls within a linear interval of the sharpness-height mapping relationship, and the preset threshold is greater than the minimum z-axis resolution.
[0073] In an optional embodiment, the method further comprises:
[0074] Obtaining a best-focused image of the reference object, and determining a clarity score corresponding to the best-focused image as a highest clarity score;
[0075] Obtaining a blurred focused image of the reference object when the microscope has a defocus distance equal to the depth of field of the objective lens used by the microscope, and determining a clarity score corresponding to the blurred focused image as a minimum clarity score;
[0076] Acquire a first reference object image of the reference object in different defocus states to obtain a reference object image set;
[0077] calculating a third clarity score for each first reference object image in the reference object image set;
[0078] fitting a functional relationship between a clarity change rate and a height change rate according to the highest clarity score, the lowest clarity score, and the third clarity score;
[0079] The functional relationship between the definition change rate and the height change rate is determined as a definition-height mapping relationship.
[0080] In some embodiments, the electronic device may pre-construct a clarity-height mapping relationship. When the clarity change is obtained in step S21, the clarity change may be converted based on the clarity-height mapping relationship into a height change of the reference object. Specifically, by placing the reference object at the optimal focus position of the microscope, the clearest image of the reference object, i.e., the optimal focus image, is obtained through the microscope. After the optimal focus image is obtained, the defocus distance of the microscope is adjusted so that it is equal to the depth of field (depth of field edge) of the objective lens used. When the defocus distance is equal to the depth of field of the objective lens used, an image of the reference object, i.e., a blurred focus image, is obtained, which is relatively blurred. When the electronic device obtains the optimal focus image and the blurred focus image, it may perform clarity scoring on the optimal focus image and the blurred focus image according to the same embodiment as described above for calculating the clarity score. The clarity score corresponding to the optimal focus image is referred to as the highest clarity score, and the clarity score corresponding to the blurred focus image is referred to as the lowest clarity score.
[0081] Furthermore, a microscope is used to capture reference images of the reference object at different defocus states (referred to as first reference images for ease of distinction), thereby obtaining a set of reference image images. The reference object can be moved up and down by different, known heights to simulate different thicknesses that may be encountered in actual measurements. The reference object is placed in a corresponding image acquisition area of the microscope, and the known height variations are adjusted to capture first reference image images at different defocus states, thereby forming a set of reference image images. The electronic device, having captured the set of reference image images, determines a clarity score for each first reference image in the set of reference image images, similarly to the method for calculating the clarity score described above. This is referred to as a third clarity score. Next, a functional relationship between the clarity change rate and the height change rate is fitted based on the highest clarity score, the lowest clarity score, and the third clarity score. For example, a linear regression or polynomial regression method can be used to analyze the trend of the clarity score as it changes with height to obtain a mathematical function expression that describes the corresponding relationship between the clarity change rate and the height change rate, which is then determined as a clarity-height mapping relationship. Through the clarity-height mapping relationship, the electronic device can determine the height change of the reference object corresponding to the clarity change between the current frame image and the previous frame image.
[0082] In other embodiments, when the clarity change is obtained, the clarity change can be directly compared with a new preset threshold value. When it is determined that the clarity change is greater than the new preset threshold value, the microscope Z axis of the microscope is adjusted so that the microscope focuses on the reference object. Specifically, the electronic device can obtain the depth of field of the objective lens used by the microscope and the minimum movable resolution of the microscope Z axis, wherein the minimum movable resolution of the microscope Z axis is its minimum controllable vertical displacement accuracy (for example, 0.02μm), and the depth of field of the objective lens used by the microscope refers to the depth of field range of the objective lens currently in use (for example, 0.6μm). Among them, the preset threshold value is an adjustable parameter set according to the system characteristic parameters, including the clarity-height mapping relationship and the minimum movable resolution of the microscope Z axis. Then, a clarity change threshold value (hereinafter referred to as the new preset threshold value) is determined based on the depth of field of the objective lens used by the microscope and the minimum movable resolution of the microscope Z axis. Specifically, the new preset threshold value is determined by the following formula:
[0083] New preset threshold = minimum movable resolution / depth of field of the objective lens used.
[0084] When the clarity change is calculated, the height change corresponding to the clarity change is compared with the new preset threshold. If the clarity change is greater than the clarity change threshold, it means that the thickness change of the target object has exceeded the threshold, and the microscope Z axis needs to be adjusted to refocus the reference object. Specifically, the first clarity score and the second clarity score are compared. When it is determined that the first clarity score is higher than the second clarity score, it means that the clarity of the reference object has increased, the focus has deviated from the current value, and the target object has expanded. The microscope Z axis can be adjusted to move upward, the reference object can be refocused, and the distance the microscope Z axis moves upward can be determined. The thickness change of the target object due to expansion can be determined. When it is determined that the first clarity score is lower than the second clarity score, the clarity of the reference object has decreased, the focus has moved away, and the target object has shrunk. The microscope Z axis can be adjusted to move downward, the reference object can be refocused, and the distance the microscope Z axis moves downward can be determined. The thickness change of the target object due to contraction can be determined. For example, assuming that the minimum resolution of the microscope Z-axis movement is 0.1 μm and the depth of field of the objective lens used in the microscope is 0.6 μm, the clarity change threshold = 0.1 / 0.6 = 1 / 6. When the clarity change is greater than 1 / 6, it means that the focus has changed slightly, and the microscope Z-axis needs to be adjusted for refocusing.
[0085] To facilitate understanding of the inventive concept of this application, this application provides an embodiment using a tool code example, the code is as follows:
[0086] # Autofocus algorithm
[0087] def autofocus_z_axis(frames, z_resolution, dof):
[0088] threshold = z_resolution / dof / 6 # Definition change threshold (1 / 6 change)
[0089] previous_score = sobel_gradient(frames[0])# Clarity score of the previous frame
[0090] for i in range(1, len(frames)):
[0091] current_score = sobel_gradient(frames[i])
[0092] # Calculate the percentage change in clarity
[0093] param = calculate_clearance(previous_score, current_score)
[0094] # Determine whether it exceeds the new preset threshold
[0095] if param>= threshold:# The clarity change exceeds the new preset threshold, triggering Z-axis adjustment
[0096] if current_score>previous_score:
[0097] move_z_axis('up')# If the clarity increases, adjust upwards
[0098] else:
[0099] move_z_axis('down')# If the clarity decreases, adjust downward
[0100] previous_score = current_score # Update the clarity score of the previous frame
[0101] It should be noted that the preset threshold and the new preset threshold can be automatically adjusted according to actual changes in the microscope objective lens and the electrode thickness.
[0102] In an optional embodiment, adjusting the Z-axis of the microscope according to the clarity change and a preset threshold so that the microscope focuses on the reference object includes:
[0103] Determining the height change corresponding to the clarity change according to the clarity-height mapping relationship;
[0104] Comparing the height change with the preset threshold;
[0105] When the height change is greater than the preset threshold, determining to adjust the Z axis of the microscope;
[0106] After controlling the Z-axis of the microscope to move a preset step length in a first direction, acquiring a second reference object image of the reference object after the movement, and calculating a fourth clarity score of the second reference object image;
[0107] When the fourth clarity score increases, it is determined that the thickness change direction of the target object is the same as the first direction, and the Z axis of the microscope is controlled to move according to the first direction to focus on the reference object;
[0108] When the fourth clarity score decreases, the Z-axis of the microscope is controlled to move in a second direction, and the operation of acquiring a second reference object image of the moved reference object is performed, where the second direction is opposite to the first direction.
[0109] In some embodiments, when a change in sharpness is acquired, the electronic device can input the change in sharpness into a sharpness-height mapping to output a corresponding change in height. If the change in height is determined to be greater than a preset threshold, it is determined that the microscope's Z-axis needs to be adjusted. When it is determined that the microscope's Z-axis needs to be adjusted, the microscope is first controlled to move in a first direction (e.g., downward) according to a preset step size (e.g., 0.1 μm). After the microscope's Z-axis has moved to the preset step size, the microscope reacquires an image of the reference object, referred to as a second reference object image, and transmits the second reference object image to the electronic device. After acquiring the second reference object image, the electronic device determines a sharpness score for the newly acquired reference object image based on the aforementioned exemplary method for calculating a sharpness score, referred to as a fourth sharpness score. The fourth sharpness score is then compared with the first sharpness score. If the fourth sharpness score is determined to be higher, it can be determined that the direction of thickness change of the target object is the same as the direction of movement of the microscope's Z-axis, i.e., the first direction. The microscope's Z-axis is then controlled to maintain its current direction of movement and continue to move in the first direction to refocus the reference object. When it is determined that the fourth clarity score is reduced, it can be determined that the thickness change of the target object to be measured is inconsistent with the movement direction of the microscope Z axis, and the microscope Z axis is controlled to move according to a second direction opposite to the first direction, and moves to a preset step size to achieve refocusing of the reference object. When the microscope Z axis moves in the second direction to refocus, the thickness change of the target object to be measured is calculated based on the movement distance of the microscope Z axis. The first direction can be either a downward direction or an upward direction. When the first direction is the downward direction, the second direction is the upward direction; when the second direction is the upward direction, the second direction is the downward direction.
[0110] S23, calculating the thickness change of the target object according to the clarity change and the moving distance of the microscope Z axis.
[0111] In some embodiments, the electronic device can determine whether the Z axis of the microscope has moved. When it is determined that the Z axis of the microscope has not moved, the electronic device can directly determine the corresponding height change based on the clarity change of the microscope, and determine the thickness change of the target object based on the height change. That is, after determining the height change of the reference object based on the clarity-height mapping relationship, the electronic device can determine the thickness change of the target object based on the height change of the reference object. Since the reference object is in contact with the target object and the reference object is set on the upper surface of the target object, when it is determined that the height of the reference object changes upward, it is determined that the thickness of the target object changes upward. When it is determined that the height of the reference object changes downward, it is determined that the thickness of the target object changes downward, and the corresponding thickness change is equal to the height change of the reference object. For example, assuming that the height of the reference object changes upward by 0.5μm, the thickness of the target object also changes upward by 0.5μm accordingly.
[0112] In some embodiments, when the Z-axis of the microscope is adjusted to move according to the height change corresponding to the clarity change and a preset threshold, the electronic device can obtain the movement distance of the Z-axis of the microscope, and determine the thickness change of the target object to be measured based on the height change corresponding to the clarity change and the movement distance of the Z-axis of the microscope. Specifically, when it is determined that the Z-axis of the microscope has moved, the electronic device can determine whether the Z-axis of the microscope has moved upward or downward, and how much the movement distance is, and send the movement data, including the movement direction and movement distance, to the electronic device. The electronic device can then determine the thickness change of the target object to be measured based on the movement data. Specifically, the movement direction of the Z-axis of the microscope is determined, and the first movement distance of the Z-axis of the microscope in the first direction and the second movement distance in the second direction are obtained. By calculating the total Z-axis movement distance of the first movement distance and the second movement distance, the total Z-axis movement distance = |first movement distance - second movement distance|. For example, assuming that the Z axis of the microscope first moves in a first direction (for example, downward), the first movement distance is 0.1 μm, and then moves in a second direction (for example, upward), the second movement distance is 0.3 μm, then the total Z axis movement distance of the microscope Z axis is 0.2 μm downward.
[0113] When determining the total movement distance of the microscope's Z axis, the thickness change of the target object is determined based on the sum of the total movement distance and the height change corresponding to the clarity change, that is, thickness change = total movement distance + height change.
[0114] In some embodiments, after determining the real-time thickness change of the target object, such as a battery, the electronic device can output a real-time thickness change-time curve and support data export (CSV / Excel format), which can be used for subsequent battery performance analysis and failure research.
[0115] In an optional embodiment, the method further comprises:
[0116] When the thickness change cannot be determined based on the clarity change, obtaining features with different height features in the reference object, wherein the number of features with different height features is an integer greater than or equal to 3, and the feature heights of the features with different heights are determined by the depth of field of the objective lens used by the microscope or the minimum resolution of the microscope's Z-axis movement;
[0117] The thickness variation is determined based on the second sharpening variation of the features of different heights.
[0118] In order to facilitate the distinction between the difference in the amount of change in clarity, the amount of change in clarity between the current frame image and the previous frame image is referred to as the first amount of change in clarity. In some embodiments, the reference object includes a feature object with different height features, the number of features of different height features is an integer greater than or equal to 3, and the feature height of the height features of different heights can be determined by the depth of field of the objective lens used by the microscope or the minimum resolution of the microscope Z-axis movement. Specifically, when the minimum resolution of the microscope Z-axis movement is greater than the depth of field of the objective lens used by the microscope, the feature height of the different height features is set according to the depth of field of the objective lens used by the microscope, for example, it is set to the value corresponding to the depth of field of the objective lens used by the microscope or its multiple; and when the minimum resolution of the microscope Z-axis movement is less than the depth of field of the objective lens used by the microscope, the feature height of the different height features is set according to the minimum resolution corresponding to the minimum resolution of the microscope Z-axis movement, for example, it is set to the value corresponding to the minimum resolution of the microscope Z-axis movement or its multiple. It should be noted that the multiple setting can be either an integer multiple or a decimal multiple to ensure that the change in the microscope Z-axis focal length can reflect the height change of the sample.
[0119] For example, assuming that the depth of field of the objective lens used in the microscope is 0.6μm and the minimum resolution of the Z-axis movement of the microscope is 1.5μm, the feature height is set according to the depth of field of the objective lens used in the microscope. When the number of features is 3, the feature height can be set to -0.6μm, 0μm and 0.6μm; assuming that the depth of field of the objective lens used in the microscope is 0.6μm and the minimum resolution of the Z-axis movement of the microscope is 0.5μm, the feature height is set according to the minimum resolution of the Z-axis of the microscope. When the number of features is 5, the feature height can be set to, -1.0μm, -0.5μm, 0μm, 0.5μm and 1.0μm.
[0120] Because the features have different heights, in this embodiment, the middle height feature among the different height features is referred to as the 0-height feature, with a feature height of 0 μm. When measuring the thickness change of the target object, the microscope focuses on the middle height feature among the different height features, namely the 0-height feature, and sets the clarity corresponding to the 0-height feature as the focus reference (recorded as "0 position"), so that the microscope can capture the reference object image based on this focus reference.
[0121] When it is determined that the thickness change of the target object cannot be determined based on the first clarity change, the electronic device obtains a reference object image including each of the different height features, including the previous frame image and the current frame image, according to the same embodiment as described above. Then, based on the previous frame image and the current frame image, the electronic device determines the clarity score corresponding to each of the different height features. For ease of distinction, the clarity score of each of the different height features in the feature of the current frame image is referred to as the fifth clarity score, and the clarity score of each of the different height features in the feature of the previous frame image is referred to as the sixth clarity score. Specifically, according to the same embodiment as described above for calculating the first clarity score, the electronic device can use a clarity evaluation algorithm, such as the Sobel gradient method or the Laplace operator method, to first calculate the horizontal gradient and vertical gradient corresponding to the different height features in the current frame image. Then, the gradient amplitude of each pixel corresponding to the different height features in the current frame image is determined based on the horizontal gradient and vertical gradient. Then, the gradient amplitude of all pixels corresponding to the different height features in the current frame image is summed to determine the fifth clarity score corresponding to the different height features in the current frame image and the sixth clarity score.
[0122] After determining the fifth clarity score and the sixth clarity score, the electronic device determines the clarity change of the features of the different height features based on the fifth clarity score and the sixth clarity score, which is called the second clarity change, to determine the thickness change of the target object according to the second clarity change. Specifically, when it is determined that the clarity of the lower height feature among the different height features, that is, the first height feature, has increased, it indicates that the focus has deviated from the current value and the target object has expanded. In this case, the Z axis of the microscope can be adjusted to move upward, the 0 height feature can be refocused, and the distance the Z axis of the microscope has moved upward can be determined. In this case, the thickness change of the target object due to expansion can be determined. When it is determined that the clarity of the higher height feature among the different height features, that is, the second height feature, has increased, it indicates that the focus has moved away and the target object has shrunk. In this case, the Z axis of the microscope can be adjusted to move downward, the 0 height feature can be refocused, and the distance the Z axis of the microscope has moved downward can be determined. In this case, the thickness change of the target object due to contraction can be determined.
[0123] See Figure 3As shown, the embodiment of the present application shows a schematic diagram of the structure of an electronic device 3. In a preferred embodiment, the electronic device 3 includes a memory 31, at least one processor 32 and at least one communication bus 33.
[0124] Those skilled in the art should know that Figure 3 The structure shown is only an illustrative embodiment. The structure of the electronic device 3 can adopt a bus, star or other topology, and hardware and software modules can be increased or decreased, or the physical layout of each component can be adjusted according to actual needs.
[0125] In some embodiments, the electronic device 3 may include a processing unit for performing image analysis and thickness change calculations, with hardware including but not limited to a microprocessor (CPU), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a digital signal processor (DSP), and an embedded processor. The electronic device 3 may also include a terminal device with human-computer interaction capabilities, such as a personal computer, tablet computer, or smartphone, enabling interactive operations via a keyboard, mouse, touch screen, or voice input device.
[0126] Each of the methods, apparatuses, computer-readable storage media, and electronic devices described herein can be implemented using various software and hardware implementations. For example, the module division is merely a functional illustration; in actual implementation, the modules can be physically integrated, split, or reassembled as needed. The connections between the modules can be direct coupling or achieved through electrical, mechanical, or other physical connections.
[0127] The functional modules can be implemented in hardware or in a computing device via software modules. When implemented as a software product and sold or used separately, they can be stored in a computer-readable storage medium. When executed by a processor, the computer program implements all or part of the steps of the method described herein. The aforementioned storage media includes, but is not limited to, media capable of storing program code, such as USB flash drives, mobile hard drives, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical disks.
[0128] It should be noted that, for ease of description, the above method embodiment adopts the expression of a series of action combinations, but the execution order of each step is not limited thereto, and the order can be adjusted or executed in parallel according to actual needs. In addition, those skilled in the art should understand that the embodiments described in the specification are only preferred embodiments and are not limitations of the present invention, and the functions and modules involved do not have to be fully implemented. The above is a specific description of the preferred implementation of the present invention, but the invention is not limited to the embodiments. Those skilled in the art can also make various equivalent modifications or replacements without violating the spirit of the present invention, and these equivalent modifications or replacements are all included in the scope defined by the claims of this application.
Claims
1. A method for measuring thickness variation of a target object, characterized in that: The method comprises: Acquire a current frame image and a previous frame image of a reference object, and calculate a change in clarity between the current frame image and the previous frame image, wherein the current frame image and the previous frame image are acquired through a microscope; the reference object is placed above the target object to be measured and in contact with the upper surface of the target object; According to the clarity change and a preset threshold, adjusting the microscope Z axis of the microscope so that the microscope focuses on the reference object; the preset threshold conforms to the linear relationship interval of the clarity-height mapping relationship, and the preset threshold is greater than the minimum resolution of the z axis; including: determining the height change corresponding to the clarity change according to the clarity-height mapping relationship; comparing the height change with the preset threshold; and determining to adjust the microscope Z axis when the height change is greater than the preset threshold; Calculating a thickness change of the target object according to the clarity change and the movement distance of the microscope Z axis; The method also includes: obtaining a best-focused image of the reference object, and determining the clarity score corresponding to the best-focused image as the highest clarity score; obtaining a blurred focused image of the reference object when the microscope is at a defocus distance equal to the depth of field of the objective lens used by the microscope, and determining the clarity score corresponding to the blurred focused image as the lowest clarity score; obtaining first reference object images of the reference object in different defocus states to obtain a reference object image set; calculating a third clarity score for each first reference object image in the reference object image set; fitting a functional relationship between a clarity change rate and a height change rate based on the highest clarity score, the lowest clarity score, and the third clarity score; and determining the functional relationship between the clarity change rate and the height change rate as the clarity-height mapping relationship.
2. The method for measuring the thickness variation of a target object according to claim 1, wherein: The calculating of the definition change between the current frame image and the previous frame image includes: Obtaining a first clarity score of the current frame image and a second clarity score of the previous frame image; determining a clarity score difference between the first clarity score and the second clarity score; The clarity score difference is normalized to obtain the clarity change.
3. The method for measuring thickness variation of a target object according to claim 1, wherein: The adjusting the Z axis of the microscope according to the clarity change and a preset threshold so that the microscope focuses on the reference object includes: After controlling the Z-axis of the microscope to move a preset step length in a first direction, acquiring a second reference object image of the reference object after the movement, and calculating a fourth clarity score of the second reference object image; When the fourth clarity score increases, it is determined that the thickness change direction of the target object is the same as the first direction, and the Z axis of the microscope is controlled to move according to the first direction to focus on the reference object; When the fourth clarity score decreases, the Z-axis of the microscope is controlled to move in a second direction, and the operation of acquiring a second reference object image of the moved reference object is performed, where the second direction is opposite to the first direction.
4. The method for measuring thickness variation of a target object according to claim 3, wherein: Calculating the thickness change of the target object according to the clarity change and the movement distance of the microscope Z axis includes: When it is determined that the height change is less than the preset threshold, determining the thickness change according to the height change; When it is determined that the height change is greater than the preset threshold, obtaining the moving distance of the microscope Z axis; The thickness variation is determined according to the height variation and the moving distance of the microscope Z axis.
5. The method for measuring thickness variation of a target object according to claim 4, wherein: Determining the thickness variation according to the height variation and the moving distance of the microscope Z axis includes: determining a first movement distance of the microscope Z axis in the first direction and a second movement distance in the second direction; Determine a total Z-axis movement distance of the microscope Z-axis according to the first movement distance and the second movement distance; The thickness variation is determined according to the total Z-axis movement distance and the height variation.
6. The method for measuring thickness variation of a target object according to claim 1, wherein: The preset threshold is an adjustable parameter set according to system characteristic parameters, and the system characteristic parameters include the clarity-height mapping relationship and the minimum movable resolution of the microscope Z axis.
7. The method for measuring thickness variation of a target object according to claim 1, wherein: Before obtaining the current frame image and the previous frame image of the reference object, the method also includes: placing the reference object at the center of the test area, placing the target object under the reference object in contact with the lower surface of the reference object; aligning the reference object with the microscope to set the current focus reference of the microscope, so that the microscope obtains the current frame image based on the current focus reference.
8. The method for measuring thickness variation of a target object according to claim 1, wherein: A device for measuring the thickness variation of a target object is provided. The device is used to place the target object and the reference object, and includes a relatively fixed lower base and a movable upper cover. The reference object is arranged on the upper cover and contacts the target object, and is displaced as the thickness of the target object changes.
Citation Information
Patent Citations
Microscope automatic focusing method based on deep learning and image processing
CN117970595A
Real-time thickness measuring method and thickness measuring device
CN119648772A