Method for obtaining stray light gray value, auto-focusing processing method and system

By adjusting the distance between the microscope objective and the light reflection point or adding an extinction component, combined with theoretical spot area and gray value correction methods, the problem of stray light interference in defocus calculation was solved, improving the accuracy of autofocus and the precision of spot images.

CN120353017BActive Publication Date: 2025-10-21HEFEI I TEK OPTOELECTRONICS CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510864224.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-26
Publication Date
2025-10-21
Estimated Expiration
2045-06-26

AI Technical Summary

Technical Problem

In active autofocus technology based on laser spot, stray light interferes with the calculation of defocus direction and distance, leading to focusing failure. Especially when the defocus distance is far or the surface reflectivity of the object being measured is low, the intensity of stray light is close to the intensity of the light signal, affecting the accuracy of the defocus amount calculation.

Method used

By adjusting the distance or reflection angle between the microscope objective and the light reflection point, the light can be made to exceed the focusing range, or an extinction component can be added to the outside of the microscope objective to eliminate light reflection; the theoretical spot area of ​​the microscope objective at different height positions along the axis is calculated, and the gray value of the actual spot image is extracted to correct the spot image of the object under test, so as to reduce the influence of stray light.

Benefits of technology

It improves the accuracy of defocus calculation and the precision of spot image, reduces the impact of stray light on the defocus calculation result, and ensures the accuracy of the autofocus process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120353017B_ABST
    Figure CN120353017B_ABST
Patent Text Reader

Abstract

The application discloses a stray light gray value acquisition method and an automatic focusing processing method and system, and relates to the field of automatic focusing. The method is applied to a microscopic automatic focusing device, and comprises adjusting the distance between a microscopic objective lens and a reflection point corresponding to light passing through the microscopic objective lens, or the reflection angle of the light, so that the adjusted distance or reflection angle exceeds the focusable range of the microscopic objective lens; or adding an extinction component outside the microscopic objective lens to eliminate the light passing through the microscopic objective lens; calculating the theoretical light spot area formed by stray light on the surface of a first sensor at different axial height positions of the microscopic objective lens; and extracting the gray value corresponding to the theoretical light spot area in the actual light spot image of the microscopic objective lens at the different axial height positions, so as to correct the light spot image of a to-be-measured object and reduce the influence of stray light on the calculation result of the defocus amount. Therefore, the influence of stray light reflected from the surface of the microscopic objective lens on the calculation of the defocus amount is reduced, and the accuracy of the calculation of the defocus amount is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of autofocus, and in particular relates to a stray light grayscale value acquisition method, an autofocus processing method and a system. Background Art

[0002] Active autofocus technology based on laser spot technology adds a lens-object distance sensing optical path to the conventional imaging optical path. A laser beam of a specific shape is projected onto the surface of the object to be measured, and a focus sensor captures the laser spot reflected back from the surface. The lens's defocus is then calculated by analyzing the shape of the laser spot reflected from the surface. This defocus value is then used to control the movement of the autofocus mechanism to achieve autofocus.

[0003] The light beam used for defocus sensing needs to be converged onto the surface of the object to be measured through the objective lens. In order to effectively separate the defocus sensing beam and the imaging beam, there needs to be a certain distance between the two in wavelength. As a result, the defocus sensing beam is generally outside the high transmittance wavelength range of the objective lens. For example, the high transmittance range of a conventional microscope objective lens in the visible light band is 400-700nm, while the wavelength of the defocus sensing beam is 785nm. Therefore, a portion of the light energy will inevitably return directly to the focus sensor due to the reflection effect of the lens on the upper surface of the microscope objective lens, forming stray light. When the defocus distance is far, or the reflectivity of the surface of the object to be measured is very low, the intensity of the light signal used to sense the distance returned from the surface of the object to be measured is close to the intensity of the stray light. At this time, the stray light will interfere with the calculation of the defocus direction and distance, resulting in focusing failure.

[0004] Therefore, a stray light grayscale value acquisition method or an auto-focus processing method is urgently needed to reduce the adverse effects of stray light in the laser spot. Summary of the Invention

[0005] The present invention provides a stray light grayscale value acquisition method, an autofocus processing method and a system to solve the above technical problems.

[0006] To achieve the above objectives, the present invention proposes the following technical solutions:

[0007] In a first aspect of the present application, a method for obtaining a stray light grayscale value is provided, which is applied to a microscopic autofocus device based on a laser spot. The method comprises:

[0008] Adjusting the distance between the microscope objective lens and the reflection point corresponding to the light after passing through the microscope objective lens, or the reflection angle of the light at the reflection point, so that the adjusted distance or reflection angle exceeds the focusable range of the microscope objective lens; or adding a light extinction component outside the microscope objective lens to eliminate the light passing through the microscope objective lens; wherein the light is any one of the light beams provided by the laser unit in the microscopic autofocus device;

[0009] Calculating theoretical spot areas formed by stray light on the surface of the first sensor at different axial heights of the microscope objective lens; wherein the stray light is formed by a semi-elliptical spot incident on the upper surface of the microscope objective lens and reflected by the surface of the microscope objective lens; and the intersection of the major axis and the semi-minor axis of the semi-elliptical spot incident on the upper surface of the objective lens is on the optical axis of the microscope objective lens;

[0010] The grayscale value of each pixel in the theoretical spot area of ​​the actual spot image of the microscope objective at different axial heights is extracted and used to correct the spot image of the object to be measured to reduce the influence of stray light on the defocus calculation result.

[0011] Optionally, the semi-elliptical spot incident on the upper surface of the microscope objective is formed by a parallel light beam diverging along the curvature direction of the cylindrical lens; wherein the divergence angle of the semi-elliptical spot is determined according to the vertical distance between the incident position of the light beam and the optical axis of the cylindrical lens.

[0012] Optionally, the theoretical light spot area is the light spot area displayed on the first sensor after the outer contour of the semi-elliptical light spot incident on the upper surface of the microscope objective lens is reflected by the upper surface of the microscope objective lens;

[0013] Based on the divergence angle of the light at each position of the upper surface of the microscope lens when the semi-elliptical spot is incident on the microscope lens at different axial positions, the trajectory of the outer contour of the semi-elliptical spot incident on the upper surface of the microscope lens is determined.

[0014] Optionally, after calculating theoretical spot areas formed by stray light on the surface of the first sensor at different axial heights of the microscope objective lens, the method further includes:

[0015] Based on the theoretical light spot area and the actual light spot image at different height positions of the microscope objective lens, a first light spot area is determined; wherein the first light spot area is the light spot area in the actual light spot image at a certain height position except the theoretical light spot area.

[0016] Optionally, also include:

[0017] Determining a theoretical light spot area based on the grayscale value within the first light spot area;

[0018] The determination process of the theoretical spot area includes the following steps:

[0019] Dividing the first light spot area into at least one sub-area, and analyzing the centroid coordinates of each divided sub-area;

[0020] Adjusting the height position of the microscope objective lens along the optical axis, and analyzing the centroid coordinates of each sub-area within the first light spot area at the height position;

[0021] Determine whether the sum of the changes in the centroid positions of each sub-area in the first light spot area at different height positions is within the allowable error range; if so, eliminate the influence of the first light spot area on the grayscale value in the theoretical light spot area; if not, expand the theoretical light spot area at different height positions based on the expansion coefficient to obtain a new theoretical light spot area.

[0022] Optionally, the process of acquiring the theoretical light spot area includes:

[0023] Analyze the angle between the reflected light and the optical axis of the microscope lens after each light beam at the outer contour trajectory of the semi-elliptical spot on the upper surface of the microscope lens is reflected by the microscope lens surface;

[0024] Based on the angle between the reflected light and the optical axis of the microscope objective lens and the focal length of the focusing lens, the vertical distance between the light spot on the first sensor where the light beam converges after passing through the focusing lens and the light spot in the quasi-focus state is analyzed;

[0025] Curve fitting is used to fit the outer contour light spot position set on the first sensor at different axial positions of the microscope objective lens to form a closed theoretical light spot area.

[0026] Optionally, the extinction component includes an extinction box, an analyzer and an optical rotation component;

[0027] The light beam passing through the microscope objective lens sequentially passes through the polarizer and the optical rotation component and enters the incident hole of the extinction box to prevent the light reflected by the inner wall of the extinction box from entering the microscope objective lens.

[0028] In a second aspect of the present application, an auto-focus processing method is provided, comprising:

[0029] Acquire a spot image of the object to be measured, and based on the stray light grayscale value acquisition method described in the first aspect, acquire the grayscale value within the theoretical spot area at the current height position of the microscope objective lens;

[0030] Subtracting the grayscale value within the theoretical light spot area from the light spot image to correct the light spot image;

[0031] The defocus amount is calculated according to the corrected spot image, and the motor is controlled to drive the microscope objective lens to move along the axial direction according to the defocus amount.

[0032] In a third aspect of the present application, an autofocus processing system is provided, comprising:

[0033] A device adjustment module, configured to adjust the distance between the microscope objective lens and a reflection point corresponding to a light ray passing through the microscope objective lens, or the reflection angle of the light ray at the reflection point, so that the adjusted distance or reflection angle exceeds the focusable range of the microscope objective lens; or to add a light extinction component to the outside of the microscope objective lens to eliminate the light ray passing through the microscope objective lens; wherein the light ray is any one of the light beams provided by the laser unit in the microscopic autofocus device;

[0034] A light spot calculation module is used to calculate the theoretical light spot area formed by stray light on the surface of the first sensor at different axial height positions of the microscope objective lens; wherein the stray light is formed by a semi-elliptical light spot incident on the upper surface of the microscope objective lens and reflected by the surface of the microscope objective lens; the intersection of the major axis and the semi-minor axis of the semi-elliptical light spot incident on the upper surface of the objective lens is on the optical axis of the microscope objective lens;

[0035] Gray value extraction module, used to extract the gray value of each pixel point in the theoretical spot area in the actual spot image at different axial height positions of the microscope objective lens;

[0036] The correction drive module is used to obtain the spot image of the object to be measured at the current axial height position, use the grayscale value in the theoretical spot area at the current axial height position to correct the spot image of the object to be measured, and calculate the defocus amount based on the corrected spot image to control the motor to drive the microscope objective lens to move along the axial direction.

[0037] In a fourth aspect of the present application, a computer-readable storage medium is provided, comprising a computer program, which, when executed by a processor, implements the stray light grayscale value acquisition method as described in the first aspect or the autofocus processing method as described in the second aspect.

[0038] The beneficial effects of this application are as follows:

[0039] The present application provides a method for obtaining stray light grayscale values, which is applied to a microscopic autofocus device based on a laser spot. The method includes: adjusting the distance between a microscope objective lens and the reflection point corresponding to the light after passing through the microscope objective lens, or the reflection angle of the light at the reflection point, so that the adjusted distance or reflection angle exceeds the focusable range of the microscope objective lens; or adding a light extinction component to the outside of the microscope objective lens to eliminate the light passing through the microscope objective lens; calculating the theoretical light spot area formed by stray light on the surface of a first sensor at different axial height positions of the microscope objective lens; extracting the grayscale value of each pixel point in the theoretical light spot area from the actual light spot image of the microscope objective lens at different axial height positions, and using it to correct the light spot image of the object to be measured to reduce the influence of stray light on the defocus calculation result. In this way, the influence of stray light reflected from the surface of the microscope objective lens on the defocus calculation is reduced, and the accuracy of the defocus calculation is improved.

[0040] The present invention adjusts the light emitted by the microscope objective lens so that it exceeds the focusable range of the autofocus device or utilizes an extinction component to absorb the light passing through the microscope objective lens, thereby preventing the light emitted by the microscope objective lens from re-entering the microscope objective lens after reflection and presenting a light spot on the first sensor. This avoids the influence of the light emitted by the microscope objective lens on the stray light spot area, so as to accurately obtain the stray light formed by the light reflected by the surface of the microscope objective lens at different height positions, thereby ensuring the accuracy of the light spot pattern corresponding to the calibrated object to be measured.

[0041] The present invention analyzes the optical path of an autofocus device and derives the coverage area of ​​a semi-elliptical light beam after passing through a cylindrical lens on the upper surface of a microscope objective lens, thereby determining the polar angle and azimuth angle of the outer contour trajectory of a light spot on the upper surface of the microscope objective lens. In combination with reflection conditions at different positions, the present invention analyzes the angle between the reflected light reflected by the surface of the microscope objective lens and the optical axis, so as to determine the position on the first sensor where the light converges after passing through a focusing lens based on the angle between the reflected light and the optical axis. The present invention can determine the set of outer contour light spot positions on the first sensor, thereby laying a foundation for determining a theoretical light spot area on the first sensor.

[0042] The present invention adopts a curve fitting method to fit the position set of the outer contour spot formed by the semi-elliptical spot on the first sensor and the position set of the light beam at the major axis of the semi-elliptical spot reflected on the first sensor, so as to form a closed theoretical spot area, so that the theoretical spot area of ​​the stray light is converted into the actual spot image of the stray light, so as to facilitate the determination of the grayscale value corresponding to the theoretical spot area from the actual spot image of the stray light, and to analyze the stray light formed by the microscope objective lens to the greatest extent possible, thereby improving the acquisition accuracy of the stray light in the theoretical spot area and ensuring the accuracy of the defocus correction.

[0043] The present invention determines the grayscale value in the first light spot area and the grayscale value in the theoretical light spot area to determine the degree of influence of the grayscale value in the first light spot area on the grayscale value in the theoretical light spot area, and then readjusts the theoretical light spot area to increase the proportion of stray light falling in the theoretical light spot area, thereby improving the accuracy of the correction result of the grayscale value of stray light in the spot image of the object to be measured.

[0044] The present invention adopts an extinction component, and can adjust the distance between the microscope objective lens and the extinction component according to the magnification of the microscope objective lens, so that the light beam emitted by the microscope objective lens completely passes through the incident hole of the rectangular extinction box to enter the extinction component. The arrangement of the extinction component prevents the reflected light beam from entering the microscope objective lens, thereby avoiding the influence of the light beam emitted by the microscope objective lens on the actual light spot image after reflection, improving the accuracy of stray light in the actual light spot image, and reducing the interference of the light spot reflected on the surface of the object to be measured or other reflective objects on the actual light spot image of the stray light. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0046] Figure 1 This is a schematic diagram of the optical path structure of an existing microscopic autofocus device provided by the present application;

[0047] Figure 2 This is a flow chart of a method for obtaining stray light grayscale values ​​provided by this application;

[0048] Figure 3 This is a flowchart of an auto-focus processing method provided by this application;

[0049] Figure 4 This is a structural diagram of an autofocus processing system provided by the present application;

[0050] Figure 5 This is a flow chart of another method for obtaining stray light grayscale values ​​provided by the present application;

[0051] Figure 6 is a schematic diagram of the reflection of a light beam on the surface of a microscope objective lens provided by the present application;

[0052] Figure 7 This is a structural diagram of an electronic device provided by this application. DETAILED DESCRIPTION

[0053] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are 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.

[0054] Optical microscopes use lenses to magnify the surface of an object under test. To obtain a meaningful image, the microscope objective (i.e., the objective lens assembly or objective lens in this application) must be precisely focused on the sample surface. However, the depth of field of high-magnification microscopes is generally only a few microns, and microscope operators often need to spend a considerable amount of time manually adjusting the distance between the objective lens and the object under test to achieve focus. Microscope autofocus technology uses feedback signals to calculate the current defocus of the objective lens and converts it into a motion signal for the motor. This motor drives the objective lens to move, automating the focusing process.

[0055] Laser spot-based microscopic autofocusing solutions are a type of active focusing technology. This technology calculates the defocus of the object under test by calculating the laser spot shape (including its center of mass, radius, and curvature). Based on this defocus, the objective lens's movement direction and distance are controlled to ensure the distance between the objective lens and the object's surface falls within the lens' depth of field, thereby achieving autofocus. For example, in the microscopic autofocusing solutions provided in Chinese patents CN114994896A or CN118584643A, the defocus is calculated by calculating the offset between the laser spot's real-time center of mass and a reference center of mass, thereby achieving autofocus for the microscope objective.

[0056] like Figure 1 As shown, the present application provides a schematic diagram of the optical path structure of a microscopic autofocus device based on a laser spot in the prior art. The optical principle is described as follows:

[0057] The laser unit emits a parallel laser beam (i.e., a collimated beam). This parallel laser beam is modulated by a cylindrical lens into an asymmetric beam that diverges in the direction of curvature and is collimated in the non-curvature direction. The asymmetric beam loses half its energy when it passes through a baffle and propagates only on one side of the optical axis, forming a semi-elliptical beam. After being reflected by a reflector, a first beam splitter, and a second beam splitter, it enters the microscope objective, where it converges onto the surface of the object under test.

[0058] The laser beam reflected from the surface of the object to be measured passes through the microscope objective lens, the second beam splitter, and the first beam splitter before being focused by the focusing lens onto the surface of the first sensor, forming a laser spot. The first sensor captures the image of the spot reflected from the surface of the object to be measured. The first sensor is the focus sensor of this application, which is used in the microscopic autofocus device to obtain the laser spot and calculate the defocus value.

[0059] The image processing unit calculates the defocus amount according to the shape of the laser spot in the spot image, and converts the defocus amount into a control signal of the driving unit, so that the driving unit drives the microscope objective lens to move and realize automatic focusing.

[0060] The illumination light source, the third beam splitter, the second beam splitter and the microscope objective lens form a coaxial illumination light path; the tube lens, the second sensor and the microscope objective lens form an imaging light path; the second sensor is used to collect the focused surface image of the object to be measured.

[0061] Preferably, the driving unit can be a driving device such as an electric motor, so as to achieve precise movement control of the microscope objective lens.

[0062] However, for laser beams, a portion of the light energy is reflected by the lens on the surface of the objective lens group and directly returns to the autofocus sensor, forming stray light, which affects the accuracy of the defocus amount calculated based on the laser spot. In order to reduce the adverse effects of stray light in the laser spot, such as Figure 2 As shown, the present application proposes a method for obtaining stray light grayscale values, which is applied to a microscopic autofocus device based on a laser spot, comprising the following steps:

[0063] Step S201: Adjust the distance between the microscope objective lens and the reflection point corresponding to the light after passing through the microscope objective lens, or adjust the reflection angle of the light at the reflection point, so that the adjusted distance or reflection angle exceeds the focusable range of the microscope objective lens; or add a light extinction component outside the microscope objective lens to eliminate the light passing through the microscope objective lens. The light is any light beam provided by the laser unit in the microscopic autofocus device.

[0064] Specifically, the microscopic autofocus device is adjusted so that the light beam passing through the microscope objective lens cannot be reflected back to the first sensor surface. The reflection point of the light beam represents the intersection between the light beam after passing through the microscope objective lens and the interface. Typically, this reflection point is the intersection between the light beam and the surface of the object being measured.

[0065] Specifically, the driving unit drives the microscope objective lens to move away from the object to be measured or toward the object to be measured, so that the distance between the reflection position of the light beam passing through the microscope objective lens on the surface of the object to be measured or the surface of other objects and the microscope objective lens exceeds the focusable range, so that the light beam reflected by the surface of the object to be measured cannot present a spot image on the first sensor, ensuring that the laser spot falling on the surface of the first sensor is formed by stray light reflected by the surface of the microscope objective lens.

[0066] Alternatively, in step 1, the object to be measured can be set as a lens with a smooth surface and tilted at a certain angle so that the reflection angle of the light reflected from the surface of the object to be measured does not fall within the focusable range of the microscope objective lens, so that the reflected light beam from the surface of the object to be measured cannot present a light spot image on the first sensor. It should be noted that in actual work, when the distance or reflection angle exceeds the focusable range of the microscope objective lens, there may still be a very small amount of light beam passing through the microscope objective lens and returning to the first sensor. Since the energy of this part of the reflected light beam is extremely weak and cannot form an effective pixel signal, the influence of this part of the light beam can be ignored in the present application scheme.

[0067] Alternatively, a light extinction component can be added below the outer side of the microscope objective lens to absorb the light beam passing through the microscope objective lens, preventing it from being reflected back to the microscope objective lens and, therefore, preventing it from appearing as a light spot on the first sensor. For example, the light extinction component can be a black light-absorbing material applied to the surface of the object to be measured to absorb the light beam passing through the microscope objective lens.

[0068] Based on the above configuration, the vast majority of the light beams that pass through the microscope objective lens cannot return to the first sensor. Of course, in actual operation, there may still be a very small amount of light beams that pass through the microscope objective lens and return to the first sensor, which can be ignored in the present application solution.

[0069] Step S202: Calculate theoretical spot areas formed by stray light on the surface of the first sensor at different axial heights of the microscope objective lens.

[0070] The stray light is formed by a semi-elliptical light spot incident on the upper surface of the microscope objective lens and reflected by the surface of the microscope objective lens. The intersection of the major axis and the semi-minor axis of the semi-elliptical light spot incident on the upper surface of the objective lens is on the optical axis of the microscope objective lens.

[0071] In one implementation, the laser unit emits a circular, parallel laser beam. After passing through a cylindrical lens, the beam diverges in the direction of the lens's curvature and does not diffuse in the axial direction, forming an elliptical light spot. The elliptical light spot is half-blocked by a baffle, forming a semi-elliptical light spot. The semi-elliptical light spot is reflected by the surface of the microscope objective lens and converged by the focusing lens to form an actual light spot image on the first sensor. The light beam in this application is composed of multiple light rays. Specifically, the parallel laser beam is composed of multiple parallel light rays, which have a certain divergence angle after being modulated by the cylindrical lens.

[0072] The intersection of the major axis and the semi-minor axis of the semi-elliptical spot incident on the upper surface of the objective lens is on the optical axis of the microscope objective lens. Combined with the setting of exceeding the focusable range in step S201, it can be seen that the theoretical spot area and actual spot image at different axial positions of the microscope objective lens obtained in step S202 are both formed by stray light reflected from the surface of the microscope objective lens.

[0073] Relative to the actual spot image, the theoretical spot area is obtained based on the analysis of parameters such as the beam divergence angle in the semi-elliptical spot, the polar angle of the position where the semi-elliptical spot falls on the upper surface of the microscope objective, the optical path between the laser unit and the microscope objective surface in the microscope autofocus device, the focal length of the cylindrical lens, and the semi-axis distance in the semi-elliptical spot, so as to obtain the theoretical spot area at different axial positions of the microscope objective.

[0074] In one implementation, the semi-elliptical spot incident on the upper surface of the microscope objective is formed by a parallel light beam diverging along the curvature of the cylindrical lens without axial diffusion. The divergence angle of each ray in the semi-elliptical spot is determined by the vertical distance between the incident position of each ray and the optical axis of the cylindrical lens. In other words, the divergence angle of each ray in the semi-elliptical spot is determined by the vertical distance between the position of the ray on the cylindrical surface of the cylindrical lens and the optical axis of the cylindrical lens, as well as the focal length of the cylindrical lens.

[0075] The height variation of the microscope objective lens along the optical axis is adjusted so that the theoretical light spot formed by the semi-elliptical light spot on the first sensor changes with the height variation of the microscope objective lens along the optical axis. The corresponding theoretical light spot areas on the first sensor at different heights of the microscope objective lens along the optical axis are derived.

[0076] The theoretical light spot area is the light spot area that appears on the first sensor after the light beam incident on the outer contour of the upper surface of the microscope objective lens is reflected by the upper surface of the microscope objective lens.

[0077] Based on the divergence angle of the light at each position of the upper surface of the microscope objective lens when the semi-elliptical light spot is incident on the microscope objective lens at different axial positions, the contour trajectory of the semi-elliptical light spot incident on the upper surface of the microscope objective lens is determined.

[0078] Furthermore, by adjusting the height variation of the microscope objective lens along the optical axis, the first sensor collects and stores spot images of stray light at different heights. These spot images are actual spot images. At this point, because step S201 sets the distance from the reflection position of the light after passing through the microscope objective lens to the microscope objective lens beyond the focusable range, the light beam passing through the microscope objective lens is minimized from being reflected back to the first sensor from the surface of the object under test, thereby reducing interference with stray light on the upper surface of the microscope objective lens at different heights.

[0079] Step S203: Extract the grayscale value of each pixel in the theoretical spot area from the actual spot image of the microscope objective lens at different axial heights. This value is used to correct the spot image of the object under test to reduce the impact of stray light on the defocus calculation result. Specifically, during the microscopic autofocus process, the spot image of the object under test is corrected, and the defocus calculation is performed based on the corrected spot image to control the motor driving the objective lens in the axial direction. The spot image of the object under test represents the laser spot image reflected from the surface of the object under test and is used to calculate the defocus.

[0080] The actual light spot image and theoretical light spot area at the same height position of the microscope objective are extracted. According to the theoretical light spot area at the height position, the grayscale value corresponding to the theoretical light spot area is screened out from the actual light spot image to obtain the grayscale value of the light reflected by the upper surface of the microscope objective in the theoretical light spot area at the height position.

[0081] Based on this, the grayscale value of the light reflected by the upper surface of the microscope objective lens in the theoretical light spot area at each height position of the microscope objective lens is obtained.

[0082] Therefore, the grayscale value in the theoretical spot area of ​​the microscope objective lens at different height positions can be used to correct the spot image of the object to be measured at the same height position, and the defocus amount is calculated based on the corrected spot image to control the motor to drive the objective lens to move in the axial direction.

[0083] When the autofocus device focuses on the object to be measured, it adjusts the height position of the microscope objective lens in the direction of the optical axis. The light beam emitted by the microscope objective lens is reflected by the surface of the object to be measured, and then sequentially reflected by the microscope objective lens, the second beam splitter, and the first beam splitter. It is then converged by the focusing lens onto the surface of the first sensor, forming a spot image of the object to be measured. Based on the grayscale value corresponding to the theoretical spot area at the height position, the grayscale value within the theoretical spot area corresponding to the spot image of the object to be measured at the height position is corrected. The corrected grayscale value is equal to the grayscale value of each position within the theoretical spot area corresponding to the spot image of the object to be measured minus the grayscale value corresponding to each position within the theoretical spot area.

[0084] The laser unit can be a semicircular parallel laser, a circular parallel laser or a point laser. If it is a point laser, a collimating lens is required to ensure that the laser unit emits a parallel laser beam to obtain a parallel beam.

[0085] This application also provides an automatic focus processing method, such as Figure 3 As shown, the method includes the following steps:

[0086] Step S301 : obtaining a light spot image of the object to be measured, and obtaining the grayscale value in the theoretical light spot area at the current height position of the microscope objective lens based on the aforementioned stray light grayscale value obtaining method.

[0087] Step S302: subtract the grayscale value in the theoretical light spot area from the light spot image to correct the light spot image.

[0088] Step S303: Calculate the defocus amount according to the corrected spot image, and control the motor to drive the microscope objective lens to move along the axial direction according to the defocus amount.

[0089] This application also provides an automatic focus processing system, such as Figure 4 As shown, the system includes:

[0090] Device adjustment module 401 is configured to adjust the distance between the microscope objective lens and the reflection point corresponding to the light beam after passing through the microscope objective lens, or the reflection angle of the light beam at the reflection point, so that the adjusted distance or reflection angle exceeds the focusable range of the microscope objective lens; or to add a light extinction component to the outside of the microscope objective lens to eliminate the light beam that passes through the microscope objective lens. The light beam is any one of the light beams provided by the laser unit in the microscopic autofocus device.

[0091] The light spot calculation module 402 is configured to calculate the theoretical light spot area formed by stray light on the surface of the first sensor at different axial heights of the microscope objective lens. The stray light is formed by a semi-elliptical light spot incident on the upper surface of the microscope objective lens and reflected from the surface of the microscope objective lens. The intersection of the major axis and the semi-minor axis of the semi-elliptical light spot incident on the upper surface of the objective lens is on the optical axis of the microscope objective lens.

[0092] The grayscale value extraction module 403 is used to extract the grayscale value of each pixel point in the theoretical light spot area in the actual light spot image at different axial height positions of the microscope objective lens.

[0093] The correction drive module 404 is used to obtain the spot image of the object to be measured at the current axial height position, use the grayscale value in the theoretical spot area at the current axial height position to correct the spot image of the object to be measured, and calculate the defocus amount based on the corrected spot image to control the motor to drive the microscope objective lens to move along the axial direction. Example 1

[0094] like Figure 5 As shown, the stray light grayscale value acquisition method of the present application is applied to a microscopic autofocus device based on a laser spot, and may further include the following steps:

[0095] Step S201: Adjust the distance between the microscope objective lens and the reflection point corresponding to the light after passing through the microscope objective lens, or adjust the reflection angle of the light at the reflection point, so that the adjusted distance or reflection angle exceeds the focusable range of the microscope objective lens; or add a light extinction component outside the microscope objective lens to eliminate the light passing through the microscope objective lens. In other words, adjust the micro-autofocus device so that the light beam passing through the microscope objective lens cannot be reflected back to the first sensor surface.

[0096] The above-mentioned exceeding the focusable range of the autofocus device includes two situations. Specifically, the distance along the optical axis of the microscope objective lens exceeds the acceptable distance range and the angle between the reflected light and the optical axis is greater than the aperture angle. When the focusable range is exceeded, the reflected light beam at the reflection position cannot present a spot image on the first sensor.

[0097] The driving unit drives the microscope objective lens to move away from the object to be measured or toward the object to be measured, so that the distance between the reflection position of the light beam passing through the microscope objective lens on the surface of the object to be measured and the microscope objective lens exceeds the focusable range, so that the light beam reflected by the surface of the object to be measured cannot present a spot image on the first sensor.

[0098] When the light beam emitted from the microscope objective lens hits a smooth surface, the angle between the reflected light and the optical axis is greater than the aperture angle of the microscope objective lens, so that the reflected light beam cannot enter the microscope objective lens, and thus cannot present a spot image on the first sensor.

[0099] Step S202: Calculate theoretical spot areas formed by stray light on the surface of the first sensor at different axial heights of the microscope objective lens, wherein the stray light is formed by a semi-elliptical spot incident on the upper surface of the microscope objective lens and reflected by the surface of the microscope objective lens.

[0100] After passing through the cylindrical lens, the circular parallel laser beam diverges in the direction of the cylindrical lens's curvature and does not diffuse along the axial direction, forming an elliptical spot. Passing through the baffle, half of the energy is lost, forming a semi-elliptical spot. Alternatively, a baffle is placed in front of the laser unit to form a semi-circular parallel laser beam. After passing through the cylindrical lens, the beam diverges in the direction of the cylindrical lens's curvature and does not diffuse along the axial direction. The baffle acts to form a semi-elliptical spot.

[0101] After a parallel light beam passes through a cylindrical lens, the divergence angle of each ray is β = arctan(S / |f|), where S represents the vertical distance between the beam's position on the cylindrical surface and the cylindrical lens's optical axis. 0 ≤ S ≤ r, r represents the spot radius of the circular laser beam parallel to the internal light, and f represents the focal length of the cylindrical lens. Because cylindrical lenses have a diffusing effect, they are negative cylindrical lenses. f = -R' / (2n-2), where R' is the radius of curvature of the cylindrical lens and n is the refractive index of the cylindrical lens material.

[0102] For a fixed autofocus device, the values ​​of the parameters r, f, R' and n are fixed and easy to obtain.

[0103] After the elliptical light spot is blocked by the baffle, a semi-elliptical light spot is formed. After the semi-elliptical light spot is reflected by the surface of the microscope objective lens and converged by the focusing lens, a theoretical light spot area is formed on the first sensor.

[0104] The elliptical light spot or semi-elliptical light spot after passing through the cylindrical lens is blocked by the baffle, and only the semi-elliptical light source on one side along the long axis direction is retained. The long axis of the semi-elliptical light spot is the length of the light spot after the radius of the circular laser is diverged by the cylindrical lens, and the short axis of the semi-elliptical light spot is the radius of the semicircular laser or circular laser.

[0105] Considering that the semi-elliptical spot is projected in the plane perpendicular to the objective lens optical axis, if the center of the major axis of the semi-elliptical spot is taken as the origin (a0, b0), the major axis is taken as the horizontal coordinate x, and the minor axis passing through the origin and perpendicular to the major axis is taken as the vertical coordinate y, the trajectory area of ​​the semi-elliptical spot projected on the surface perpendicular to the objective lens optical axis and tangent to the upper surface of the objective lens is analyzed as follows:

[0106] .

[0107] Where L represents the initial optical path from the focal point of the cylindrical lens to the upper surface of the objective lens.

[0108] The position of the microscope objective lens along the optical axis of the microscope objective lens is adjusted to change the optical path from the focus of the cylindrical lens to the upper surface of the microscope objective lens, so that the track area projected on the surface perpendicular to the optical axis of the microscope objective lens and tangent to the upper surface of the microscope objective lens changes. Based on the track area under the initial optical path, it is deduced that when the microscope objective lens moves △h along the optical axis, the track area of ​​the semi-elliptical spot projected on the plane perpendicular to the optical axis of the microscope objective lens and tangent to the upper surface of the microscope objective lens is as follows:

[0109] ;

[0110] △h is expressed as the position change of the microscope objective lens at the current position relative to the initial position in the direction of the microscope objective lens optical axis, wherein △h has directionality. When the microscope objective lens moves upward relative to the surface of the object to be measured, △h is greater than 0. When the microscope objective lens moves downward relative to the surface of the object to be measured, △h is less than 0.

[0111] When the distance between the microscope objective and the surface of the object to be measured changes, the area corresponding to the projection of the semi-elliptical light spot on the upper surface of the microscope objective after passing through the cylindrical lens changes, and the area where the semi-elliptical light spot falls on the upper surface of the microscope objective changes. Subsequently, after passing through the focusing lens, the corresponding theoretical light spot area on the first sensor changes.

[0112] Furthermore, to obtain the theoretical spot area, we first analyze the coverage area of ​​the semi-elliptical spot on the upper surface of the microscope objective lens as follows: when the microscope objective lens is at the initial height position, the long axis center of the semi-elliptical spot coincides with the axis of the microscope objective lens. The coverage range of the semi-elliptical spot on the upper surface of the microscope objective lens is constructed as follows:

[0113] ,and , where c represents the major axis of the semi-elliptical spot falling on the upper surface of the lens, c=(1+L / f)r, d represents the minor axis of the semi-elliptical spot falling on the upper surface of the lens, d=r, R2 is the spherical radius of the upper surface of the microscope objective lens, θ represents the polar angle of any point on the semi-elliptical spot, and 0≤θ≤π; Expressed as the azimuth angle of any point of the semi-elliptical spot.

[0114] It is understandable that It is expressed as the outer contour trajectory formed by the semi-elliptical spot on the upper surface of the microscope objective lens. The polar angle range of any point on the outer contour of the semi-elliptical spot is: θ2≤θ≤θ1.

[0115] Among them, the polar angle of the major axis endpoint in the outer contour trajectory is , the polar angle of the minor axis endpoint in the outer contour trajectory is According to the outer contour trajectory of the semi-elliptical light spot on the upper surface of the microscope objective lens, the azimuth angle range of any reflection position on the outer contour trajectory of the semicircular light spot can be determined.

[0116] The semi-elliptical light spot is composed of the outer contour trajectory and the long axis of the semi-elliptical light spot. The light beam reflected on the long axis of the semi-ellipse falls on the quasi-focus position of the first image sensor and is straight after passing through the focusing lens. The quasi-focus position is represented as the image position of the object to be measured on the first sensor forming the focused light spot.

[0117] Subsequently, by adjusting the height position change △h of the microscope objective lens in the direction of the optical axis, the coverage range of the semi-elliptical spot falling on the upper surface of the microscope objective lens is expressed as follows: ,and ;

[0118] The polar angle of the major axis endpoint is ; The polar angle of the minor axis endpoint is ;

[0119] The polar angle range of the semi-elliptical spot at this time is: ; It is expressed as the azimuth angle of the semicircular light spot reflected on the upper surface of the microscope objective lens when the height position of the microscope objective lens changes by △h in the direction of the optical axis; θ' is expressed as the polar angle of any point on the semi-elliptical light spot when the height position of the microscope objective lens changes by △h in the direction of the optical axis.

[0120] Based on the above processing, the coverage range falling on the microscope objective lens surface is represented by the aforementioned relationship, which provides a limiting condition for the polar angle of each light ray, so as to facilitate the determination of the theoretical spot area in the subsequent steps.

[0121] Secondly, the process of obtaining the theoretical spot area includes the following steps:

[0122] Step F1: Analyze the angle between each light ray at the outer contour trajectory of the semi-elliptical spot on the upper surface of the microscope objective lens and the optical axis of the microscope objective lens after the light ray is reflected by the upper surface of the microscope objective lens.

[0123] like Figure 6 As shown, both sides of each lens in the microscope objective are spherical, and their curvature radius is known. The light diffused by the cylindrical lens has different exit angles, which makes the exit angle β of the light incident on the upper surface of the microscope objective different. Based on the exit angle β and the polar angle corresponding to the light at the contour trajectory of the microscope objective surface at different height positions, the angle between the reflected light and the optical axis of the objective is determined.

[0124] The angle δ between the light falling on the contour trajectory of the microscope objective surface and the optical axis of the objective lens after being reflected by the microscope objective lens surface is: δ=2θ Δh +β, when R=r, the emission angle β=β max ,θ ΔhIt is expressed as the polar angle corresponding to the light at the contour trajectory of the microscope surface when the height position of the microscope lens changes in the direction of the optical axis △h.

[0125] The angle between the reflected light and the optical axis of the objective lens must satisfy the following requirement: after the light at the contour trajectory of the microscope objective lens surface is reflected by the microscope objective lens surface, the light is reflected by the second beam splitter and the first beam splitter in sequence, and is converged to the first sensor surface by the focusing lens.

[0126] Step F2: Analyze the vertical distance between the light spot on the first sensor and the spot in the quasi-focus state after the light beam is focused by the focusing lens based on the angle between the reflected light and the optical axis of the microscope objective lens and the focal length of the focusing lens.

[0127] Specifically, based on the reflected light corresponding to the light beam at the outer contour trajectory of the upper surface of the microscope objective lens, the angle between the reflected light and the optical axis of the microscope objective lens and the focal length of the focusing lens, the vertical distance from the light spot on the first sensor where the light beam converges after passing through the focusing lens to the light spot in the quasi-focus state is analyzed to determine the outer contour light spot position set on the first sensor.

[0128] The light at the outer contour trajectory of the upper surface of the microscope objective is reflected by the microscope objective surface, and then passes through the focusing lens in front of the first sensor. The convergence distance between the light spot position on the first sensor and the light spot position in the quasi-focus state is: , f1 represents the focal length of the focusing lens in front of the first sensor; δ represents the angle between the light beam at the contour trajectory of the lens surface and the optical axis of the objective lens after being reflected by the upper surface of the lens; M represents the number of pixel rows occupied by the unit physical length in the image corresponding to the first sensor, where the first sensor is located at the focal plane of the focusing lens.

[0129] According to the polar angle and convergence distance of the light beam at the outer contour of the upper surface of the microscope objective lens, the position set of the light at the outer contour of the upper surface of the microscope objective lens reflected on the first sensor is determined, and combined with the position set of the light at the major axis of the semi-elliptical spot reflected on the first sensor, a closed contour trajectory of the light spot image on the first sensor can be constructed.

[0130] Step F3: curve fitting is used to fit the outer contour light spot position set on the first sensor at different axial positions of the microscope objective lens to form a closed theoretical light spot area.

[0131] Specifically, a curve fitting method is used to fit the outer contour spot position set on the first sensor to obtain the spot trajectory on the first sensor at different height positions of the microscope objective lens in the optical axis direction to determine the theoretical spot area.

[0132] Among them, the curve fitting can adopt polynomial curve fitting. Specifically, the polar angle θ range of the light beam at the outer contour trajectory of the upper surface of the microscope objective lens is calibrated using a plurality of equally spaced polar angle θ values ​​to obtain a corresponding number of pixel point position sets. Then, the position set of the aforementioned multiple pixel points is subjected to curve fitting, and the curve formed by fitting is used as the outer contour of the spot image, and the line segment corresponding to the position set of the light reflected on the first sensor at the long axis of the semi-elliptical spot constitutes a closed theoretical spot area. In addition, when the fitted curve is not a closed curve, the beginning and end of the curve can be connected to the ends of the line segment in sequence to form a closed curve as the outer contour of the spot image.

[0133] Through the above step F3, the position information of the light at the outer contour trajectory of the upper surface of the microscope objective lens in the spot image corresponding to the first sensor after passing through the focusing lens can be determined, the position information in the spot image is obtained, and the theoretical spot area of ​​the spot image is obtained by polynomial curve fitting.

[0134] Among them, polynomial curve fitting is a conventional technical means and will not be demonstrated in detail here.

[0135] The height variation of the microscope objective lens along the optical axis is adjusted so that the theoretical light spot formed by the semicircular light spot on the first sensor changes with the height variation of the microscope objective lens along the optical axis, and the corresponding theoretical light spot areas on the first sensor at different heights of the microscope objective lens along the optical axis are derived.

[0136] According to the vertical distance from the light spot on the first sensor to the light spot in the quasi-focus state that is converged by the semi-elliptical spot reflected by the upper surface of the microscope objective lens, the light spot position on the first sensor reflected by the light beam at the outer contour of the upper surface of the microscope objective lens and the light spot position on the first sensor reflected by the light beam at the major axis of the elliptical spot are determined. By using curve fitting, the theoretical closed light spot area on the first sensor is finally determined, thereby establishing the light spot area range on the first sensor of the light beam reflected by the surface of the microscope objective lens at different height positions of the microscope objective lens, and then determining the corresponding theoretical light spot area.

[0137] In the process of acquiring the actual spot image, as the microscope objective lens moves along the optical axis, the height position change of the microscope objective lens along the optical axis is adjusted. During this process, the distance between the reflection position of the light beam emitted from the microscope objective lens after being reflected by the surface of the object to be measured or other objects and the microscope objective lens is always maintained to exceed the focus range, so as to prevent the light beam reflected by the surface of the object to be measured or other objects from passing through the microscope objective lens, the second beam splitter, the first beam splitter, and the focusing lens and converging to the surface of the first sensor. By adjusting the height change of the microscope objective lens along the optical axis, the first sensor collects the spot images of the stray light at different height positions, and the spot images are the actual spot images.

[0138] The actual light spot image includes stray light formed by the light beam reflected from the upper surface of the microscope objective lens, and stray light formed by reflection, refraction and other reasons of the lens inside the microscope objective lens.

[0139] Step S503 : determining an average grayscale value in the theoretical light spot area based on the grayscale values ​​corresponding to the theoretical light spot area in the actual light spot image at different height positions of the microscope objective lens.

[0140] The actual light spot image and theoretical light spot area at the same height position of the microscope objective are extracted. Based on the magnification determined by the microscope objective and focusing lens in the autofocus device, the theoretical light spot area is converted to the light spot area on the image corresponding to the first sensor. Based on the converted light spot area, the actual light spot image is screened to determine the average grayscale value corresponding to the theoretical light spot area in the actual light spot image. It should be noted that if no actual light spot image exists at a certain height position, the known actual light spot image closest to the height position is selected as a replacement, or the average grayscale value of the actual light spot images at two adjacent height positions is calculated and used as a replacement.

[0141] According to the theoretical light spot area at the height position, the grayscale value corresponding to the theoretical light spot area is screened out from the actual light spot image, and the grayscale values ​​within the theoretical light spot area are averaged to obtain the average grayscale value of the light reflected by the upper surface of the microscope objective lens within the theoretical light spot area at the height position.

[0142] Based on this, the average grayscale value of the light reflected by the upper surface of the microscope objective lens in the theoretical light spot area at each height position of the microscope objective lens is obtained.

[0143] Step S504 , using the average grayscale value in the theoretical spot area, correcting the obtained spot image of the object to be measured at the height position, and calculating the defocus amount based on the corrected spot image to control the motor to drive the microscope objective lens to move along the axial direction.

[0144] When the autofocus device focuses on the object to be measured, it adjusts the height position of the microscope objective lens in the direction of the optical axis. After the light emitted by the microscope objective lens is reflected by the surface of the object to be measured, it is reflected by the microscope objective lens, the second beam splitter, and the first beam splitter in sequence, and then converged by the focusing lens onto the surface of the first sensor to form a spot image. Based on the average grayscale value corresponding to the theoretical spot area at the height position, the grayscale value in the theoretical spot area corresponding to the spot image at the height position is corrected. The corrected grayscale value is equal to the grayscale value in the theoretical spot area in the spot image minus the average grayscale value corresponding to the theoretical spot area.

[0145] The defocus amount of the corrected spot image is calculated. The defocus amount calculation adopts the centroid calculation to determine the adjustment distance between the microscope objective lens and the object to be measured, thereby controlling the motor to drive the objective lens to adjust the distance along the axial direction to achieve focus adjustment and reduce the influence of stray light reflected from the upper surface of the microscope objective lens on the accurate calculation of the defocus amount. Example 2

[0146] Correcting the spot image of the object to be measured at each height position involves removing the spot area outside the theoretical spot area from the actual spot image as the first spot area. It is necessary to determine the influence of the grayscale value in the first spot area on the grayscale value in the theoretical spot area.

[0147] Specifically, according to Example 1, theoretical light spot areas and actual light spot areas at different height positions of the microscope objective lens along the optical axis are obtained to determine a first light spot area. The first light spot area is the light spot area corresponding to the actual light spot image at the same position, minus the theoretical light spot area.

[0148] When the microscope objective lens is at the initial height position, the corresponding theoretical light spot area is recorded as A(0). When the microscope objective lens moves a distance △h along the optical axis, the corresponding theoretical light spot area is recorded as A(△h). The theoretical light spot area is the light spot area inferred based on the existing autofocus optical device. When the microscope objective lens is at the initial height position, the actual light spot area collected by the first sensor is recorded as B(0). When the microscope objective lens moves a distance △h along the optical axis, the actual light spot area collected by the first sensor is recorded as B(△h).

[0149] At different height positions of the microscope objective lens, based on the theoretical light spot area corresponding to the height position of the microscope objective lens, a first light spot area C(△h) outside the theoretical light spot area is screened out from the actual light spot area, where C(△h)=B(△h)-A(△h).

[0150] During the focusing process, the microscope objective lens is driven by a motor to move along the optical axis, causing the distance between the light after passing through the cylindrical lens and the objective lens surface to change. The stray light spot finally presented on the first sensor changes with the change of the position of the microscope objective lens. The actual stray light spot image obtained is mainly composed of the spot image corresponding to the theoretical spot area and the spot image corresponding to the first spot area. The first spot area is mainly formed by the combined action of multiple reflections and refractions of light inside the microscope objective lens.

[0151] The method for determining a theoretical light spot area based on the grayscale value within the first light spot area includes the following steps:

[0152] Step W1: Divide the first light spot area into at least one sub-area, and analyze the centroid coordinates of each divided sub-area.

[0153] Specifically, the spot image in the quasi-focus state is extracted, and the position along the length direction of the spot image and half of the spot width is used as the vertical coordinate; the direction perpendicular to the vertical coordinate is used as the horizontal coordinate, and the horizontal coordinate corresponds to the image row.

[0154] The first light spot area C is divided into at least one sub-area. The first light spot area can be divided into one sub-area, two sub-areas or four sub-areas, preferably, two sub-areas or four sub-areas.

[0155] Based on the horizontal coordinate (image row) and grayscale value in each sub-region, calculate the centroid C of each sub-region: ;

[0156] Among them, x1 and x2 are the horizontal coordinate (image row) range of each sub-region, and f(i) is the grayscale value of the pixel.

[0157] Step W2: Adjust the height position of the microscope objective lens along the optical axis, repeat step W1, and analyze the centroid coordinates of each sub-area in the first light spot area at this height position.

[0158] Step W3: Determine whether the sum of the centroid changes of each sub-area within the first light spot area at different heights is within the allowable error range. If so, eliminate the effect of the first light spot area on the grayscale value within the theoretical light spot area. If not, expand the theoretical light spot area at different heights based on the expansion factor q to obtain a new theoretical light spot area.

[0159] Among them, the value range of q is 1.03-1.12, q is empirical data and is not described in detail here. For the theoretical spot area greater than or equal to the allowable error range, the theoretical spot area is expanded by the expansion coefficient q to reduce the influence of the stray light spot in the first spot area on the theoretical spot area. By expanding the theoretical spot area, the distribution of stray light in the first spot area outside the expanded theoretical spot area is reduced, and the influence of the stray light spot in the first spot area on the theoretical spot area is reduced, thereby improving the accuracy of eliminating stray light spots in the spot image of the object to be measured.

[0160] By using a method for determining the grayscale value within the first light spot area, the amount of change in the center of mass position of each sub-area within the first light spot area can be determined to indicate whether the interference of other stray light on the light spot on the first sensor is within an acceptable range after eliminating the stray light reflected from the surface of the objective lens. Based on the determination, the theoretical light spot area is adaptively adjusted to eliminate the influence of the grayscale value within the light spot area outside the theoretical light spot area corresponding to the actual light spot area on the defocus amount calculation, thereby improving the accuracy of the defocus amount calculation. Example 3

[0161] Based on the above embodiment, the present application also provides another method for determining a theoretical light spot area based on the grayscale value within the first light spot area, including the following steps:

[0162] When the microscope objective is at different height positions along the optical axis, the ratio between the sum of the grayscale values ​​on the first light spot area and the sum of the grayscale values ​​in the actual light spot image corresponding to the theoretical light spot area at the height position is analyzed to determine whether the ratio is less than a set threshold. If so, the influence of the first light spot area on the grayscale value in the theoretical light spot area is eliminated; if not, the theoretical light spot area at different height positions is expanded by the expansion coefficient q to obtain a new theoretical light spot area.

[0163] The threshold value is determined according to the experimental accuracy requirements and will not be explained in detail here.

[0164] Specifically, the ratio of the sum of the grayscale values ​​in the first light spot area to the sum of the grayscale values ​​in the theoretical light spot area in the actual light spot image at the height position is obtained. By judging whether the ratio is less than the set threshold, it is used to measure the weight or influence of the sum of the grayscale values ​​in the first light spot area corresponding to the actual light spot image on the sum of the grayscale values ​​in the theoretical light spot area. At the same time, it can also be determined whether the ratio of the sum of the grayscale values ​​in the first light spot area to the sum of the grayscale values ​​in the theoretical light spot area corresponding to the actual light spot image changes with the change of the height position of the microscope objective lens. When the ratio is less than the set threshold as the height position of the microscope objective lens changes, it reflects that the influence of stray light in the first light spot area is small. Example 4

[0165] Based on Example 1, the grayscale values ​​corresponding to the theoretical light spot area in the actual light spot images at different height positions of the microscope objective are extracted, and the grayscale values ​​in the theoretical light spot area are averaged to obtain the average grayscale value.

[0166] Specifically, through the above analysis, the stray light reflected from the upper surface of the microscope objective lens has a small influence on the sum of the grayscale values ​​within the first light spot area and the theoretical light spot area. At different heights of the objective lens, the distribution area of ​​the stray light reflected from the objective lens surface is different. The relationship between the average grayscale value and the area within the light spot area at the first sensor obtained by theoretical calculation is: .

[0167] in, and They respectively represent the average grayscale value corresponding to the area range of the light spot area on the first sensor obtained by theoretical calculation within the actually obtained light spot area B(△h) when the height position change △h1 and △h2 of the microscope objective lens in the direction of the optical axis relative to the initial height position. A(△h1) and A(△h2) respectively represent the area of ​​the light spot area at the first sensor obtained by theoretical calculation when the height position change △h1 and △h2 of the microscope objective lens in the direction of the optical axis relative to the initial height position.

[0168] Therefore, in the solution of the present application, the average grayscale value of the light spot area A(0) at the first sensor and the light spot area B(0) obtained by calculation can be calibrated in advance at the initial height position, and then based on the aforementioned relationship, the average grayscale value corresponding to the light spot area A(△h) at the first sensor obtained by theoretical calculation when the objective lens moves relatively by △h can be analyzed.

[0169] The grayscale values ​​within the light spot area at the first sensor that are actually obtained according to the theoretical light spot area are screened by using the above-mentioned light spot area based on the theory to obtain the grayscale values ​​of the stray light within the theoretical light spot area at different height positions of the objective lens, so that when focusing on the object to be measured, the average grayscale value of the theoretical light spot area corresponding to the height position is screened according to the position height of the objective lens, so as to reduce the influence of the stray light in the image area on the first sensor on the focusing calculation according to the position height of the objective lens when focusing on the object to be measured. Example 5

[0170] In order to eliminate stray light reflected from the surface of the object to be measured, in addition to adjusting the distance between the microscope objective lens and the surface of the object to be measured so that the distance exceeds the focusable range of the microscope objective lens, the present application also provides the following technical means: adding a light extinction component to the microscopic autofocus device to eliminate the light reflected from the surface of the microscope objective lens.

[0171] Specifically, the technical solution provided in this application may further include an extinction assembly in the microscope autofocus device, comprising an extinction box, an analyzer, and an optical rotation assembly. The light beam passing through the microscope objective lens sequentially passes through the analyzer and the optical rotation assembly and enters the entrance aperture of the extinction box, thereby preventing or reducing the light beam from entering the microscope objective lens after being reflected from the inner wall of the extinction box.

[0172] In order to eliminate the interference of stray light analysis on the first sensor caused by light reflected from the surface of the object to be measured, the reflected light corresponding to the light beam passing through the microscope objective lens is eliminated, thereby adding a light extinction component. When the magnification of the microscope objective lens changes, the focus position of the microscope objective lens at different magnifications is analyzed to control the distance between the microscope objective lens and the light extinction component.

[0173] The extinction assembly includes a rectangular extinction box, an incident hole with the same length as the linear light source in the quasi-focus state is opened on the upper part of the rectangular extinction box, so that the light beam corresponding to the linear light source after passing through the microscope objective lens is incident into the rectangular extinction box, and an optical rotation assembly and an analyzer are installed above the incident hole. After the light beam incident from the microscope objective lens passes through the analyzer, polarized light with the same polarization direction as the analyzer is allowed to pass through, and is rotated by a fixed angle by the optical rotation assembly, and enters the rectangular extinction box through the incident hole on the rectangular extinction box, and a light-absorbing medium is distributed on the inner circumference of the rectangular extinction box. At this time, the polarization direction of the linearly polarized light incident through the microscope objective lens is the same as that of the analyzer, so that the analyzer allows the light beam incident through the objective lens to pass through the analyzer.

[0174] Light incident on the objective lens passes through the analyzer and the optical rotation assembly before entering the rectangular extinction box, where it is absorbed by the light-absorbing medium within. Some light reflected from the extinction box passes through the entrance aperture and, after two rotations by the optical rotation assembly, is deflected in a direction different from the polarization direction permitted by the analyzer. This significantly reduces the amount of light reflected from the extinction box that passes through the objective lens and enters the first sensor, improving the accuracy of data collected on stray light reflected from the objective lens surface.

[0175] For a zoom lens, as the magnification of the objective lens is adjusted, the focal length of the objective lens changes. In order to satisfy the requirement that the light beam emitted by the laser passes through the microscope objective lens and the reflected light of the microscope objective lens, the distance between the objective lens and the rectangular extinction box needs to be adjusted. The distance between the microscope objective lens and the incident hole of the rectangular extinction box is equal to the focal length of the objective lens corresponding to the current magnification of the microscope objective lens.

[0176] The magnification of the microscope objective lens after zooming is M1=f0×M0 / f1, f0 represents the focal length under the magnification M0, and f1 represents the focal length under the magnification M1.

[0177] Assume that the laser energy of the light beam from the laser unit after being reflected by the second beam splitter and reaching the infinite conjugate microscope objective is I0, the reflectivity of the infinite conjugate microscope objective to the laser is e1, the reflectivity inside the extinction box is e2, the angle between the light vibration direction of the incident linear polarized light and the polarization direction of the analyzer is a, and the optical rotation component can rotate the light vibration direction by b.

[0178] After passing through the objective lens, the signal light energy I n for:

[0179] The signal light energy I that passes through the analyzer due to the reflection from the extinction box s for:

[0180] ;

[0181] when The device can obtain the best signal-to-noise ratio when a is equal to 0° and b is 45°.

[0182] Wherein, the optical rotation component is a Faraday rotator or a wave plate.

[0183] Preferably, the angle between the vibration direction of the incident linearly polarized light and the polarization direction of the analyzer is 0°, and the rotation angle of the optical rotation component is 45°. The 45° rotation after passing through the optical rotation component causes the light beam reflected by the inner surface of the rectangular extinction box to be rotated by 45° again by the rotation component, so that the linearly polarized light is rotated 90° after passing through the optical rotation component twice and cannot pass through the analyzer, thereby preventing the light beam emitted from the microscope objective lens from passing through the microscope objective lens, the second beam splitter, the first beam splitter and the focusing lens again and converging onto the first sensor, thereby effectively eliminating the influence of other light beams on stray light.

[0184] Based on the same inventive concept, the present application also proposes a computer-readable storage medium, including a computer program, which, when executed by a processor, implements the stray light grayscale value acquisition method or autofocus processing method as described above.

[0185] The present application also provides an electronic device, such as Figure 7 As shown, it includes a processor 701, a communication interface 702, a memory 703 and a communication bus 704, wherein the processor 701, the communication interface 702, and the memory 703 communicate with each other through the communication bus 704.

[0186] Memory 703, used for storing computer programs;

[0187] The processor 701 is configured to implement any of the above-mentioned stray light grayscale value acquisition methods or auto-focus processing methods when executing the program stored in the memory 703 .

[0188] The communication bus mentioned in the electronic device mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used in the figure, but this does not mean that there is only one bus or only one type of bus.

[0189] The communication interface is used for communication between the above electronic device and other devices.

[0190] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.

[0191] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0192] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above 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.

[0193] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A method for obtaining stray light grayscale values, applied to a laser spot-based microscopic autofocus device, characterized in that: The method comprises: Adjusting the distance between the microscope objective lens and the reflection point corresponding to the light after passing through the microscope objective lens, or the reflection angle of the light at the reflection point, so that the adjusted distance or reflection angle exceeds the focusable range of the microscope objective lens; or adding a light extinction component outside the microscope objective lens to eliminate the light passing through the microscope objective lens; wherein the light is any one of the light beams provided by the laser unit in the microscopic autofocus device; Calculating theoretical spot areas formed by stray light on the surface of the first sensor at different axial heights of the microscope objective lens; wherein the stray light is formed by a semi-elliptical spot incident on the upper surface of the microscope objective lens and reflected by the surface of the microscope objective lens; and the intersection of the major axis and the semi-minor axis of the semi-elliptical spot incident on the upper surface of the objective lens is on the optical axis of the microscope objective lens; The grayscale value of each pixel in the theoretical spot area of ​​the actual spot image of the microscope objective at different axial heights is extracted and used to correct the spot image of the object to be measured to reduce the influence of stray light on the defocus calculation result.

2. The method for obtaining stray light grayscale value according to claim 1, wherein: The semi-elliptical spot incident on the upper surface of the microscope objective is formed by the divergence of the parallel light beam along the curvature direction of the cylindrical lens; the divergence angle of the semi-elliptical spot is determined by the vertical distance between the incident position of the light beam and the optical axis of the cylindrical lens.

3. The method for obtaining stray light grayscale value according to claim 1, wherein: The theoretical light spot area is the outer contour of the semi-elliptical light spot incident on the upper surface of the microscope objective lens, and the light spot area displayed on the first sensor after being reflected by the upper surface of the microscope objective lens; Based on the divergence angle of the light at each position of the upper surface of the microscope lens when the semi-elliptical spot is incident on the microscope lens at different axial positions, the trajectory of the outer contour of the semi-elliptical spot incident on the upper surface of the microscope lens is determined.

4. The method for obtaining stray light grayscale value according to claim 1, wherein: After calculating theoretical light spot areas formed by stray light on the surface of the first sensor at different axial heights of the microscope objective lens, the method further includes: Based on the theoretical light spot area and the actual light spot image at different height positions of the microscope objective lens, a first light spot area is determined; wherein the first light spot area is the light spot area in the actual light spot image at a certain height position except the theoretical light spot area.

5. The method for obtaining stray light grayscale value according to claim 4, characterized in that: Also includes: Determining a theoretical light spot area based on the grayscale value within the first light spot area; The determination process of the theoretical spot area includes the following steps: Dividing the first light spot area into at least one sub-area, and analyzing the centroid coordinates of each divided sub-area; Adjusting the height position of the microscope objective lens along the optical axis, and analyzing the centroid coordinates of each sub-area within the first light spot area at the height position; Determine whether the sum of the changes in the centroid positions of each sub-area in the first light spot area at different height positions is within the allowable error range; if so, eliminate the influence of the first light spot area on the grayscale value in the theoretical light spot area; if not, expand the theoretical light spot area at different height positions based on the expansion coefficient to obtain a new theoretical light spot area; wherein the expansion coefficient ranges from 1.03 to 1.

12.

6. The method for obtaining stray light grayscale value according to claim 3, wherein: The process of obtaining the theoretical light spot area includes: Analyze the angle between the reflected light and the optical axis of the microscope lens after each light beam at the outer contour trajectory of the semi-elliptical spot on the upper surface of the microscope lens is reflected by the microscope lens surface; Based on the angle between the reflected light and the optical axis of the microscope objective lens and the focal length of the focusing lens, the vertical distance between the light spot on the first sensor where the light beam converges after passing through the focusing lens and the light spot in the quasi-focus state is analyzed; Curve fitting is used to fit the outer contour light spot position set on the first sensor at different axial positions of the microscope objective lens to form a closed theoretical light spot area.

7. The method for obtaining stray light grayscale value according to claim 1, wherein: The extinction component includes an extinction box, an analyzer and an optical rotation component; The light beam passing through the microscope objective lens sequentially passes through the polarizer and the optical rotation component and enters the incident hole of the extinction box to prevent the light reflected by the inner wall of the extinction box from entering the microscope objective lens.

8. An auto-focus processing method, characterized in that: include: Acquire a spot image of the object to be measured, and based on the stray light grayscale value acquisition method according to any one of claims 1 to 7, acquire the grayscale value within the theoretical spot area at the current height position of the microscope objective lens; In the spot image, subtracting the grayscale value of the theoretical spot area screened out from the actual spot image to correct the spot image; The defocus amount is calculated according to the corrected spot image, and the motor is controlled to drive the microscope objective lens to move along the axial direction according to the defocus amount.

9. An automatic focus processing system, characterized in that: include: A device adjustment module, configured to adjust the distance between the microscope objective lens and a reflection point corresponding to a light ray passing through the microscope objective lens, or the reflection angle of the light ray at the reflection point, so that the adjusted distance or reflection angle exceeds the focusable range of the microscope objective lens; or to add a light extinction component to the outside of the microscope objective lens to eliminate the light ray passing through the microscope objective lens; wherein the light ray is any one of the light beams provided by the laser unit in the microscopic autofocus device; A light spot calculation module is used to calculate the theoretical light spot area formed by stray light on the surface of the first sensor at different axial height positions of the microscope objective lens; wherein the stray light is formed by a semi-elliptical light spot incident on the upper surface of the microscope objective lens and reflected by the surface of the microscope objective lens; the intersection of the major axis and the semi-minor axis of the semi-elliptical light spot incident on the upper surface of the objective lens is on the optical axis of the microscope objective lens; Gray value extraction module, used to extract the gray value of each pixel point in the theoretical spot area in the actual spot image at different axial height positions of the microscope objective lens; The correction drive module is used to obtain the spot image of the object to be measured at the current axial height position, use the grayscale value of the theoretical spot area screened out from the actual spot image at the current axial height position, correct the spot image of the object to be measured, and calculate the defocus amount based on the corrected spot image to control the motor to drive the microscope objective lens to move along the axial direction.

10. A computer-readable storage medium comprising a computer program, characterized in that When the computer program is executed by a processor, the stray light grayscale value acquisition method according to any one of claims 1 to 7 or the autofocus processing method according to claim 8 is implemented.

Citation Information

Patent Citations

  • Microscope automatic focusing system for micro-nano step sample and focusing method thereof

    CN114994896A

  • Automatic laser focusing device and method, electronic equipment and storage medium

    CN118584643A

  • Short-wave infrared lens stray radiation detection method

    CN105547649A

  • Stray light intensity detection method and device, detection terminal and readable storage medium

    CN111609926A