Stray light gray value acquisition method, automatic focusing processing method and system
By adjusting the distance between the microscope and the light reflection point or increasing the extinction component, combined with the theoretical grayscale value correction method of the spot area, the problem of stray light interference defocusing is solved, and the accuracy of autofocus is improved.
Patent Information
- Application Number
- CN202510864224.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2045-06-26
AI Technical Summary
In the automatic focus technology based on laser spots, stray light interferes with the precise calculation of the defocus amount, resulting in the failure of focus.
By adjusting the distance or reflection angle between the microscope and the light reflection point, the light exceeds the focusable range, or adding an extinction component outside the microscope to eliminate light reflection; calculate the theoretical spot area formed by stray light on the sensor surface, and extract the grayscale value in the actual spot image for correction.
The impact of stray light on the calculation of defocus amount is reduced, and the accuracy of defocus amount calculation and the accuracy of the accuracy of the focus processing are improved.
Smart Images

Figure CN120353017A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of autofocus, and particularly relates to a method for obtaining the gray value of stray light, an autofocus processing method and a system. Background Art
[0002] Based on the active autofocus technology of laser spot, an additional lens object distance sensing optical path is added on the basis of the conventional imaging optical path. A laser beam with a specific shape is projected onto the surface of the object to be measured, and the laser spot returned from the surface of the object to be measured is obtained by using a focus sensor. Then, the defocus amount of the lens is deduced by analyzing the shape of the laser spot returned from the surface of the object to be measured, and the movement of the autofocus device is controlled according to the defocus amount to achieve the effect of autofocus.
[0003] The light beam for defocus amount sensing needs to be converged to the surface of the object to be measured through the objective lens. In order to effectively separate the defocus amount sensing light beam and the imaging light beam, there needs to be a certain interval between them in terms of wavelength, resulting in the defocus amount sensing light beam generally being outside the high transmittance wavelength range of the objective lens. For example, the high transmittance range of a conventional visible light band microscope objective lens is 400 - 700nm, while the wavelength of the light beam for defocus amount sensing is 785nm. Therefore, a part of the light energy directly returns to the inside of the focus sensor due to the reflection of the upper surface lens 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 for distance sensing 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, there is an urgent need for a method for obtaining the gray value of stray light or an autofocus processing method to reduce the adverse effects brought by the stray light in the laser spot. Summary of the Invention
[0005] The present invention proposes a method for obtaining the gray value of stray light, an autofocus processing method and a system to solve the above technical problems.
[0006] To achieve the above object, the present invention proposes the following technical solutions: In the first aspect of the present application, a method for obtaining the gray value of stray light is provided, which is applied to a microscope autofocus device based on a laser spot. The method includes: Adjusting the distance between the microscope objective lens and the reflection point corresponding to the light 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 an extinction component outside the microscope objective lens to eliminate the light passing through the microscope objective lens; wherein the light belongs to any one of the light beams provided by the laser unit in the microscope autofocus device; Calculate the theoretical spot area formed by stray light on the surface of the first sensor at different axial height positions of the microscopic objective lens; wherein, the stray light is formed by the reflection of a semi-elliptical spot incident on the upper surface of the microscopic objective lens on the surface of the microscopic objective lens; 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 microscopic objective lens. Extract the gray values of each pixel point in the theoretical spot area in the actual spot image of the microscopic objective lens at different axial height positions, and use them to correct the spot image of the object to be measured, so as to reduce the influence of stray light on the calculation result of the defocus amount.
[0007] Optionally, the semi-elliptical spot incident on the upper surface of the microscopic objective lens is formed by the divergence of a parallel beam 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 beam incident position and the optical axis of the cylindrical lens.
[0008] Optionally, the theoretical spot area is the spot area presented on the first sensor after the outer contour of the semi-elliptical spot incident on the upper surface of the microscopic objective lens is reflected by the upper surface of the microscopic objective lens. Based on the divergence angles of the light rays at different axial positions of the microscopic objective lens when the semi-elliptical spot is incident on each position of the upper surface of the microscopic objective lens, determine the trajectory of the outer contour of the semi-elliptical spot incident on the upper surface of the microscopic objective lens.
[0009] Optionally, after calculating the theoretical spot area formed by stray light on the surface of the first sensor at different axial height positions of the microscopic objective lens, the method further includes: Based on the theoretical spot area and the actual spot image of the microscopic objective lens at different height positions, determine the first spot area; wherein, the first spot area is the spot area in the actual spot image except the theoretical spot area at a certain height position.
[0010] Optionally, it further includes: Based on the gray values in the first spot area, judge the theoretical spot area; Wherein, the judgment process of the theoretical spot area includes the following steps: Divide the first spot area into at least one sub-area, and analyze the centroid coordinates of each sub-area after division; Adjust the height position of the microscopic objective lens along the optical axis direction, and analyze the centroid coordinates of each sub-area in the first spot area at the height position; Judge whether the sum of the centroid position change amounts of each sub-area in the first spot area at different height positions is within the allowable error range; if so, eliminate the influence of the first spot area on the gray values in the theoretical spot area; if not, expand the theoretical spot area at different height positions based on the expansion coefficient to obtain a new theoretical spot area.
[0011] Optionally, the process of obtaining the theoretical spot region includes: Analyze the angles between the reflected rays and the optical axis of the microscopic objective lens for each beam at the outer contour trajectory of the semi-elliptical spot on the upper surface of the microscopic objective lens after reflection from the surface of the microscopic objective lens. Based on the angle between the reflected ray and the optical axis of the microscopic objective lens and the focal length of the focusing lens, analyze the vertical distance from the spot converged on the first sensor by the beam after passing through the focusing lens to the spot in the quasi-focused state. Use curve fitting to fit the set of positions of the outer contour spots on the first sensor at different axial positions of the microscopic objective lens to form a closed theoretical spot region.
[0012] Optionally, the extinction component includes an extinction box, a polarizer, and a polarization rotation component; Among them, the beam passing through the microscopic objective lens sequentially passes through the polarizer and the polarization rotation component and enters the incident hole of the extinction box to prevent the light reflected from the inner wall of the extinction box from entering the microscopic objective lens.
[0013] In the second aspect of the present application, an automatic focusing processing method is provided, including: Obtain the spot image of the object to be measured, and based on the stray light gray value acquisition method described in the first aspect, obtain the gray values within the theoretical spot region at the current height position of the microscopic objective lens. Subtract the gray values within the theoretical spot region from the spot image to correct the spot image. Calculate the defocus amount based on the corrected spot image, and control the motor to drive the microscopic objective lens to move along the axial direction according to the defocus amount.
[0014] In the third aspect of the present application, an automatic focusing processing system is provided, including: A device adjustment module for adjusting the distance between the microscopic objective lens and the reflection point corresponding to the light passing through the microscopic 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 microscopic objective lens; or adding an extinction component outside the microscopic objective lens to eliminate the light passing through the microscopic objective lens; where the light belongs to any one of the beams provided by the laser unit in the microscopic autofocus device; A spot calculation module for calculating the theoretical spot region formed by stray light on the surface of the first sensor at different axial height positions of the microscopic objective lens; where the stray light is formed by the reflection of the semi-elliptical spot incident on the upper surface of the microscopic objective lens from the surface of the microscopic objective lens; 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 microscopic objective lens; A gray value extraction module for extracting the gray values of each pixel point in the theoretical spot region of the actual spot image at different axial height positions of the microscopic objective lens; A calibration driving module, configured to obtain a spot image of a to-be-detected object at a current axial height position, correct the spot image of the to-be-detected object by using the gray values within the theoretical spot area at the current axial height position, and calculate a defocus amount according to the corrected spot image, so as to control a motor to drive a microscopic objective lens to move along the axial direction.
[0015] In a fourth aspect of the present application, a computer-readable storage medium is provided, including a computer program, where when the computer program is executed by a processor, the stray light gray value acquisition method described in the first aspect or the autofocus processing method described in the second aspect is implemented.
[0016] The beneficial effects of the present application are as follows: The present application provides a method for acquiring stray light gray values, which is applied to a microscopic autofocus device based on a laser spot, and includes: adjusting the distance between a microscopic objective lens and a reflection point corresponding to the light passing through the microscopic 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 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 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 values of each pixel point in the theoretical spot area in the actual spot images of the microscopic objective lens at different axial height positions, for correcting the spot image of the to-be-detected object, so as to reduce the influence of stray light on the defocus amount calculation result. Thereby, the influence of the stray light reflected from the surface of the microscopic objective lens on the defocus amount calculation is reduced, and the accuracy of the defocus amount calculation is improved.
[0017] The present invention adjusts the light emitted from the microscopic objective lens to exceed the focusable range of the autofocus device or uses an extinction component to absorb the light passing through the microscopic objective lens, so as to prevent the light emitted from the microscopic objective lens from entering the microscopic objective lens again after reflection and presenting a spot on the first sensor, avoiding the influence of the light emitted from the microscopic objective lens on the stray light spot area, facilitating the accurate acquisition of the stray light formed by the light reflected from the surface of the microscopic objective lens at different height positions, and further ensuring the accuracy of the spot pattern corresponding to the to-be-detected object after correction.
[0018] The present invention analyzes the optical path of the autofocus device, derives the coverage area of the semi-elliptical light beam after the cylindrical lens on the upper surface of the microscopic objective lens to determine the polar angle and azimuth angle at the outer contour track of the spot on the upper surface of the microscopic objective lens, combines the reflection conditions at different positions, analyzes the angle between the reflected light reflected from the surface of the microscopic objective lens and the optical axis, so as to determine the position converging on the first sensor after passing through the focusing lens according to the angle between the reflected light and the optical axis, and can determine the set of the outer contour spot positions on the first sensor, laying a foundation for the determination of the theoretical spot area on the first sensor.
[0019] The present invention uses 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 beam reflected to the first sensor at the major axis of the semi-elliptical spot, forming 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, facilitating the determination of the gray value corresponding to the theoretical spot area from the actual spot image of the stray light, analyzing the stray light formed by the microscope objective to the greatest extent possible, improving the acquisition accuracy of the stray light within the theoretical spot area, and ensuring the accuracy of defocus correction.
[0020] The present invention determines the gray value within the first spot area and the gray value within the theoretical spot area to determine the influence degree of the gray value within the first spot area on the gray value within the theoretical spot area, and then readjusts the theoretical spot area, increasing the proportion of the stray light falling within the theoretical spot area and improving the accuracy of the correction result of the gray value of the stray light in the spot image of the object to be measured.
[0021] The present invention uses an extinction component that can adjust the distance between the microscope objective and the extinction component according to the magnification of the microscope objective, enabling the beam emitted from the microscope objective to completely pass through the incident hole of the rectangular extinction box into the extinction component, and through the setting of the extinction component, preventing the reflected beam from entering the microscope objective, avoiding the influence of the beam emitted from the microscope objective after reflection on the actual spot image, improving the accuracy of the stray light in the actual spot image, and reducing the interference of the reflected spot on the surface of the object to be measured or other reflectors on the actual spot image of the stray light. Description of the Drawings
[0022] The drawings described herein are used to provide a further understanding of the present application and form a part of the present application. The schematic embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation of the present application. In the drawings: Figure 1 is a schematic optical path structure diagram of an existing microscopic autofocus device provided by the present application; Figure 2 is a schematic flow diagram of a method for obtaining the gray value of stray light provided by the present application; Figure 3 is a schematic flow diagram of an autofocus processing method provided by the present application; Figure 4 is a schematic structural diagram of an autofocus processing system provided by the present application; Figure 5 is a schematic flow diagram of another method for obtaining the gray value of stray light provided by the present application; Figure 6 is a schematic diagram of the reflection of the beam on the surface of the microscope objective provided by the present application; Figure 7 It is a schematic structural diagram of an electronic device provided by this application. Specific embodiments
[0023] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, rather than all of them. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of this application.
[0024] The optical microscope magnifies the image of the surface of the object to be measured by means of lens imaging. To obtain a meaningful image, the microscope objective lens (i.e., the objective lens group or objective lens in this application) must be accurately focused on the sample surface. The depth of field of a high-power microscope objective lens is generally only a few micrometers. Operators of the microscope objective lens often need to spend a lot of time manually adjusting the distance between the objective lens and the object to be measured to achieve focusing. The micro-autofocus technology calculates the current defocus amount of the objective lens through a feedback signal, converts it into a motion signal of the motor, and drives the objective lens to move through the motor to automate the focusing process.
[0025] The micro-autofocus scheme based on the laser spot belongs to an active focusing technology. By calculating the morphology of the laser spot (including the centroid, radius, curvature, etc.), the defocus amount of the object to be measured is obtained, and the moving direction and moving distance of the objective lens are controlled according to the defocus amount, so that the distance between the objective lens and the surface of the object to be measured is within the depth of field of the objective lens, thereby achieving the purpose of automatic focusing of the objective lens. For example, in the micro-autofocus schemes provided in Chinese Patent CN114994896A or CN118584643A, by calculating the offset between the real-time centroid of the laser spot and the reference centroid, the defocus amount is obtained, and the purpose of automatic focusing of the microscope objective lens is achieved.
[0026] As Figure 1 shown, this application provides a schematic optical path structure diagram of a micro-autofocus device based on laser spots in the prior art. The optical principle is described as follows: The laser unit emits a parallel laser beam (i.e., a parallel beam). The parallel laser beam is modulated by a cylindrical lens into an asymmetric beam that diverges in the curvature direction of the cylindrical lens and is collimated in the non-curvature direction. Half of the energy of the asymmetric beam is lost through the baffle, and it only propagates on one side of the optical axis, forming a semi-elliptical beam. After being reflected by the mirror, the first beam splitter, and the second beam splitter, it enters the microscope objective lens, and the laser beam is converged to the surface of the object to be measured by the microscope objective lens.
[0027] The laser beam reflected by the surface of the object to be measured passes through the microscopic objective lens, the second beam splitter, and is reflected by the first beam splitter, and then is converged by the focusing lens onto the surface of the first sensor to form a laser spot; the first sensor collects the spot image reflected by the surface of the object to be measured. Among them, the first sensor is the focusing sensor of the present application, and in the microscopic autofocus device, it is used to obtain the laser spot to calculate the defocus amount.
[0028] 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 for the driving unit, so that the driving unit drives the microscopic objective lens to move to achieve autofocus.
[0029] The illumination light source, the third beam splitter, the second beam splitter, and the microscopic objective lens form a coaxial illumination optical path, and the tube lens, the second sensor, and the microscopic objective lens form an imaging optical path. The second sensor is used to collect the surface image of the object to be measured after focusing.
[0030] Preferably, the driving unit can be a driving device such as a motor or a motor to achieve precise movement control of the microscopic objective lens.
[0031] However, for the laser beam, a part of the light energy directly returns to the inside of the autofocus sensor due to the reflection of the surface lens of the objective lens group, forming stray light, which affects the accuracy of the defocus amount calculated based on the laser spot. In order to reduce the adverse effects brought by the stray light in the laser spot, as Figure 2 shown, the present application proposes a method for obtaining the gray value of stray light, which is applied to a microscopic autofocus device based on a laser spot, and includes the following steps: Step S201: Adjust the distance between the microscopic objective lens and the reflection point corresponding to the light passing through the microscopic 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 microscopic objective lens; or add an extinction component outside the microscopic objective lens to eliminate the light passing through the microscopic objective lens. Among them, the light belongs to any one of the beams provided by the laser unit in the microscopic autofocus device.
[0032] That is, by adjusting the microscopic autofocus device, the light beam passing through the microscopic objective lens cannot be reflected back to the surface of the first sensor. The reflection point of the light represents the intersection point between the light passing through the microscopic objective lens and the interface. Usually, this reflection point is the intersection point between the light and the surface of the object to be measured.
[0033] Specifically, the driving unit drives the microscope objective lens to move away from or closer to 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 other object surfaces 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 form a spot image on the first sensor, ensuring that the laser spots falling on the surface of the first sensor are all formed by stray light reflected from the surface of the microscope objective lens.
[0034] Alternatively, in step 1, the object to be measured can also be set as a lens with a smooth surface and tilted at a certain angle, so that the reflection angle of the reflected light on the surface of the object to be measured does not fall within the focusable range of the microscope objective lens, making the reflected light beam on the surface of the object to be measured unable to form a 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 beams passing through the microscope objective lens 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 solution of this application.
[0035] Alternatively, an extinction component is added below the outside of the microscope objective lens to absorb the light beam passing through the microscope objective lens so that it cannot be reflected back to the microscope objective lens and thus cannot form a spot on the first sensor. For example, the extinction component can be a black light-absorbing material laid on the surface of the object to be measured to absorb the light beam passing through the microscope objective lens.
[0036] Based on the foregoing settings, most of the light beams passing through the microscope objective lens cannot return to the first sensor. Of course, in actual work, there may still be a very small amount of light beams passing through the microscope objective lens returning to the first sensor. In this regard, the solution of this application can be ignored.
[0037] Step S202: Calculate the theoretical spot area formed by stray light on the surface of the first sensor at different axial height positions of the microscope objective lens.
[0038] Among them, the stray light is formed by the reflection of a semi-elliptical spot incident on the upper surface of the microscope objective lens on the surface of the microscope objective lens. 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.
[0039] In one implementation, the laser unit emits a circular parallel laser beam. After the beam passes through the cylindrical lens, it diverges in the curvature direction of the lens and does not spread in the axial direction, forming an elliptical spot. After half of the elliptical spot is blocked by the baffle, a semi-elliptical spot is formed. After the semi-elliptical spot is reflected by the surface of the microscope objective lens and converges through the focusing lens, an actual spot image is formed 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, and the light rays have a certain divergence angle after being modulated by the cylindrical lens.
[0040] Among them, the intersection point of the major axis and the minor axis of the semi-elliptical light spot incident on the upper surface of the objective lens is on the optical axis of the microscopic objective lens. Combining with the setting of the out-of-focus range in step S201, it can be known that the theoretical light spot regions and the actual light spot images at different axial positions of the microscopic objective lens obtained in step S202 are both formed by stray light reflected from the surface of the microscopic objective lens.
[0041] Relative to the actual light spot image, the theoretical light spot region is obtained by analyzing parameters such as the beam divergence angle in the semi-elliptical light spot, the polar angle of the position where the semi-elliptical light spot falls on the upper surface of the microscopic objective lens, the optical path between the laser unit and the surface of the microscopic objective lens in the microscopic autofocus device, the focal length of the cylindrical lens, and the semi-axis distance in the semi-elliptical light spot, so as to obtain the theoretical light spot regions at different axial positions of the microscopic objective lens.
[0042] In one implementation, the semi-elliptical light spot incident on the upper surface of the microscopic objective lens is formed by the parallel light beam diverging along the curvature direction of the cylindrical lens and not diffusing along the axial direction. The divergence angle is determined according to the perpendicular distance between the incident position of each light ray and the optical axis of the cylindrical lens. That is, according to the perpendicular distance between the position of the light ray on the cylindrical surface of the cylindrical lens and the optical axis of the cylindrical lens, and the focal length of the cylindrical lens, the divergence angle of each light ray in the semi-elliptical light spot is determined.
[0043] Adjust the height change amount of the microscopic objective lens along the optical axis direction, so that the theoretical light spot formed by the semi-elliptical light spot on the first sensor changes with the height change of the microscopic objective lens along the optical axis direction, and deduce the theoretical light spot regions corresponding to the first sensor at different heights along the optical axis direction of the microscopic objective lens.
[0044] The theoretical light spot region is the light spot region presented on the first sensor after the light beam incident on the outer contour of the upper surface of the microscopic objective lens is reflected by the upper surface of the microscopic objective lens.
[0045] Based on the divergence angles of the light rays at different axial positions of the microscopic objective lens when the semi-elliptical light spot is incident on each position of the upper surface of the microscopic objective lens, determine the contour trajectory of the semi-elliptical light spot incident on the upper surface of the microscopic objective lens.
[0046] In addition, adjust the height change amount of the microscopic objective lens along the optical axis direction. The first sensor collects and saves the light spot images of the stray light at different height positions, and the light spot images are actual light spot images. At this time, since step S201 sets the distance from the reflection position of the light beam after passing through the microscopic objective lens to the microscopic objective lens to exceed the focusable range, it is possible to avoid as much as possible the light beam passing through the microscopic objective lens from being reflected back to the first sensor on the surface of the object to be measured, reducing the interference of the stray light on the upper surface of the microscopic objective lens at different height positions.
[0047] Step S203: Extract the gray values of each pixel in the theoretical spot area of the actual spot image at different axial height positions of the microscopic objective lens, which are used to correct the spot image of the object to be measured, so as to reduce the influence of stray light on the calculation result of the defocus amount. That is, during the microscopic autofocus process, the spot image of the object to be measured is corrected, and the defocus amount is calculated based on the corrected spot image, so as to control the motor to drive the objective lens to move along the axial direction. Among them, the spot image of the object to be measured represents the laser spot image reflected back from the surface of the object to be measured and is used to calculate the defocus amount.
[0048] Extract the actual spot image and the theoretical spot area of the microscopic objective lens at the same height position. According to the theoretical spot area at the height position, screen out the gray values corresponding to the theoretical spot area from the actual spot image, and obtain the gray values of the light reflected by the upper surface of the microscopic objective lens in the theoretical spot area at the height position.
[0049] Based on this, obtain the gray values of the light reflected by the upper surface of the microscopic objective lens in the theoretical spot area at each height position.
[0050] Thus, the gray values in the theoretical spot area of the microscopic 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 obtained, and the defocus amount is calculated based on the corrected spot image, so as to control the motor to drive the objective lens to move along the axial direction.
[0051] When the autofocus device focuses on the object to be measured, adjust the height position of the microscopic objective lens in the optical axis direction. After the light beam emitted by the microscopic objective lens is reflected by the surface of the object to be measured, it is reflected by the microscopic objective lens, the second beam splitter, and the first beam splitter in sequence, and then is converged to the surface of the first sensor by the focusing lens to form the spot image of the object to be measured. Based on the gray values corresponding to the theoretical spot area at the height position, correct the gray values in the theoretical spot area corresponding to the spot image of the object to be measured at the height position. The corrected gray value is equal to the gray value at each position in the theoretical spot area corresponding to the spot image of the object to be measured minus the gray value corresponding to each position in the theoretical spot area.
[0052] Among them, the laser unit can be a semi-circular parallel laser, a circular parallel laser or a point laser. If it is a point laser, in order to ensure that the laser unit emits a parallel laser beam, a collimating lens needs to be configured to obtain a parallel beam.
[0053] This application also provides an autofocus processing method, as Figure 3 shown, and this method includes the following steps: Step S301: Obtain the spot image of the object to be measured, and obtain the gray values in the theoretical spot area of the microscopic objective lens at the current height position based on the aforementioned method for obtaining the gray values of stray light.
[0054] Step S302: Subtract the gray values within the theoretical light spot area from the light spot image to correct the light spot image.
[0055] Step S303: Calculate the defocus amount based on the corrected light spot image, and control the motor to drive the microscopic objective lens to move along the axial direction according to the defocus amount.
[0056] The present application also provides an autofocus processing system, as Figure 4 shown. This system includes: A device adjustment module 401, configured to adjust the distance between the microscopic objective lens and the reflection point corresponding to the light passing through the microscopic 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 microscopic objective lens; or add an extinction component outside the microscopic objective lens to eliminate the light passing through the microscopic objective lens. Wherein, the light belongs to any one of the light beams provided by the laser unit in the microscopic autofocus device.
[0057] A light spot calculation module 402, configured 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 microscopic objective lens. Wherein, the stray light is formed by the reflection of the semi-elliptical light spot incident on the upper surface of the microscopic objective lens on the surface of the microscopic objective lens. The intersection point 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 microscopic objective lens.
[0058] A gray value extraction module 403, configured to extract the gray values of each pixel point in the theoretical light spot area of the actual light spot image of the microscopic objective lens at different axial height positions.
[0059] A correction driving module 404, configured to obtain the light spot image of the object to be measured at the current axial height position, correct the light spot image of the object to be measured by using the gray values within the theoretical light spot area at the current axial height position, calculate the defocus amount based on the corrected light spot image, and control the motor to drive the microscopic objective lens to move along the axial direction. Embodiment 1
[0060] As Figure 5 shown, the method for obtaining the stray light gray value of the present application, which is applied to a microscopic autofocus device based on a laser light spot, may further include the following steps: Step S201: Adjust the distance between the microscopic objective lens and the reflection point corresponding to the light passing through the microscopic 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 microscopic objective lens; or add an extinction component outside the microscopic objective lens to eliminate the light passing through the microscopic objective lens. That is, adjust the microscopic autofocus device so that the light beam passing through the microscopic objective lens cannot be reflected back to the surface of the first sensor.
[0061] The situation where the distance exceeds the focusable range of the autofocus device includes two cases. Specifically, the distance along the optical axis of the microscope objective 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 form a spot image on the first sensor.
[0062] The driving unit drives the microscope objective to move away from the object to be measured or move closer to the object to be measured, so that the distance between the reflection position of the light beam passing through the microscope objective on the surface of the object to be measured and the microscope objective exceeds the focusable range, so that the light beam reflected by the surface of the object to be measured cannot form a spot image on the first sensor.
[0063] When the light beam emitted from the microscope objective irradiates a smooth surface, the angle between the reflected light and the optical axis is greater than the aperture angle of the microscope objective, so that the reflected light beam cannot enter the microscope objective and thus cannot form a spot image on the first sensor.
[0064] Step S202: Calculate the theoretical spot area formed by stray light on the surface of the first sensor at different axial height positions of the microscope objective. Among them, the stray light is formed by the reflection of the semi-elliptical spot incident on the upper surface of the microscope objective on the surface of the microscope objective.
[0065] After the circular parallel laser passes through the cylindrical lens, the light beam diverges in the curvature direction of the cylindrical lens and does not spread in the axial direction, forming an elliptical spot. After passing through the baffle, half of the energy is lost to form a semi-elliptical spot. Or, 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 light beam diverges in the curvature direction of the cylindrical lens and does not spread in the axial direction. After the action of the baffle, a semi-elliptical spot is formed.
[0066] After the parallel light beam passes through the cylindrical lens, the divergence angle β of each light ray = arctan(S / |f|), where S represents the vertical distance between the position of the light beam on the cylindrical surface and the optical axis of the cylindrical lens, 0 ≤ S ≤ r, r represents the spot radius of the circular laser with parallel internal light rays, and f represents the focal length of the cylindrical lens. Since the cylindrical lens has a diffusing effect and belongs to a negative cylindrical lens, f = -R' / (2n - 2), where R' is the curvature radius of the cylindrical lens and n is the refractive index of the material of the cylindrical lens.
[0067] Among them, for a set of fixed autofocus devices, the values of the parameters r, f, R' and n are fixed and easy to obtain.
[0068] After the elliptical spot is blocked by the baffle, a semi-elliptical spot is formed. After the semi-elliptical spot is reflected by the surface of the microscope objective and converges through the focusing lens, a theoretical spot area is formed on the first sensor.
[0069] The elliptical spot or semi-elliptical spot after passing through the cylindrical lens is blocked by the baffle, and only the semi-elliptical light source on one side along the major axis is retained. The major axis of the semi-elliptical spot is the radius of the circular laser and the length of the spot after being diverged by the cylindrical lens, and the minor axis of the semi-elliptical spot is the radius of the semicircular laser or the circular laser.
[0070] 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: .
[0071] Wherein, L represents the initial optical path from the focus of the cylindrical lens to the upper surface of the objective lens.
[0072] 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: ; △h is expressed as the position change of the microscope objective at the current position relative to the initial position in the direction of the microscope objective optical axis, wherein △h has directionality. When the microscope objective moves upward relative to the surface of the object to be measured, △h is greater than 0, and when the microscope objective moves downward relative to the surface of the object to be measured, △h is less than 0.
[0073] 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.
[0074] Furthermore, for obtaining the theoretical spot area, the coverage area of the semi-elliptical spot on the upper surface of the microscope objective is first analyzed as follows: when the microscope objective is at the initial height position, the long axis center of the semi-elliptical spot coincides with the axis of the microscope objective, and the coverage range of the semi-elliptical spot falling on the upper surface of the microscope objective is constructed as follows: ,and , where c represents the major axis of the semi-elliptical light spot falling on the upper surface of the lens, c = (1 + L / f)r, d represents the minor axis of the semi-elliptical light 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 light spot, and 0 ≤ θ ≤ π; It represents the azimuth angle of any point on the semi-elliptical light spot.
[0075] It can be understood that It represents the outer contour trajectory formed by the semi-elliptical light spot on the upper surface of the microscope objective lens. The range of the polar angle of any point on the outer contour of the semi-elliptical light spot is: θ2 ≤ θ ≤ θ1.
[0076] Among them, the polar angle of the major axis endpoint in the outer contour trajectory is , and the polar angle of the minor axis endpoint in the outer contour trajectory is . According to the outer contour trajectory formed by the semi-elliptical light spot on the upper surface of the microscope objective lens, the range of the azimuth angle of any reflection position on the outer contour of the semi-circular light spot can be determined.
[0077] The semi-elliptical light spot is composed of the outer contour trajectory of the semi-elliptical light spot and the major axis. The light beam reflected on the major axis of the semi-ellipse, after passing through the focusing lens, falls at the quasi-focus position on the first image sensor and is in a straight line. The quasi-focus position represents the image position of the measured object forming a focused light spot on the first sensor.
[0078] Subsequently, by adjusting the height position change amount △h of the microscope objective lens in the optical axis direction, the coverage range relationship of the semi-elliptical light spot falling on the upper surface of the microscope objective lens is: , and ; The polar angle of the major axis endpoint is ; The polar angle of the minor axis endpoint is ; At this time, the polar angle range of the semi-elliptical light spot is: ; It represents the azimuth angle of the reflection position of the semi-circular light spot on the upper surface of the microscope objective lens when the height position change amount △h of the microscope objective lens in the optical axis direction; θ' represents the polar angle of any point on the semi-elliptical light spot when the height position change amount △h of the microscope objective lens in the optical axis direction.
[0079] Based on the above processing, the coverage range falling on the surface of the microscope objective lens is represented by the foregoing relationship, providing a limiting condition for the polar angle of each light ray, so as to facilitate the determination of the theoretical light spot area in the subsequent steps.
[0080] Secondly, the process of obtaining the theoretical light spot area includes the following steps: Step F1: Analyze the angles between the reflected rays and the optical axis of the microscopic objective lens for the rays at the outer contour trajectory of the semi-elliptical light spot on the upper surface of the microscopic objective lens after reflection from the upper surface of the microscopic objective lens.
[0081] As Figure 6 shown, both sides of each lens in the microscopic objective lens are spherical surfaces with known radius of curvature. Due to different exit angles of the rays diffused by the cylindrical lens, the exit angles β of the rays incident on the upper surface of the microscopic objective lens are different. Based on the exit angle β and the polar angles corresponding to the rays at the contour trajectory of the microscopic objective lens surface at different height positions, determine the angle between the reflected ray and the optical axis of the objective lens.
[0082] For the rays falling on the contour trajectory of the microscopic objective lens surface, after reflection from the microscopic objective lens surface, the angle δ between the reflected ray and the optical axis of the objective lens is: δ = 2θ Δh + β. When R = r, the exit angle β = β max , θ Δh represents the polar angle corresponding to the ray at the contour trajectory of the microscopic objective lens surface under the change in height position △h of the microscopic objective lens in the optical axis direction.
[0083] The angle between the reflected ray and the optical axis of the objective lens needs to satisfy: After the rays at the contour trajectory of the microscopic objective lens surface are reflected from the microscopic objective lens surface, the rays are successively reflected by the second beam splitter and the first beam splitter and converged by the focusing lens onto the surface of the first sensor.
[0084] Step F2: Based on the angle between the reflected ray and the optical axis of the microscopic objective lens and the focal length of the focusing lens, analyze the vertical distance between the light spot converged onto the first sensor and the light spot in the quasi-focused state after the light beam passes through the focusing lens.
[0085] Specifically, based on the angle between the reflected ray corresponding to the light beam at the outer contour trajectory of the upper surface of the microscopic objective lens and the optical axis of the microscopic objective lens and the focal length of the focusing lens, analyze the vertical distance between the light spot converged onto the first sensor and the light spot in the quasi-focused state after the light beam passes through the focusing lens to determine the set of positions of the outer contour light spots on the first sensor.
[0086] The converging distance between the position of the light spot on the first sensor and the position of the light spot in the quasi-focused state after the ray at the outer contour trajectory of the upper surface of the microscopic objective lens is reflected from the microscopic objective lens surface and passes through the focusing lens in front of the first sensor: , where f1 represents the focal length corresponding to the focusing lens in front of the first sensor; δ represents the angle between the reflected ray and the optical axis of the objective lens after the light beam at the contour trajectory of the lens surface is reflected from the upper surface of the lens; M represents the number of pixel rows occupied by a 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.
[0087] Based on the polar angle and convergence distance of the light beam at the outer contour of the upper surface of the microscope objective, determine the set of positions where the light rays at the outer contour of the upper surface of the microscope objective are reflected onto the first sensor, and combine it with the set of positions where the light rays at the major axis of the semi-elliptical light spot are reflected onto the first sensor, to form a closed contour trajectory of the light spot image on the first sensor.
[0088] Step F3: Use curve fitting to fit the set of positions of the outer contour light spots on the first sensor at different axial positions of the microscope objective to form a closed theoretical light spot region.
[0089] Specifically, use the curve fitting method to fit the set of positions of the outer contour light spots on the first sensor to obtain the light spot trajectories on the first sensor at different height positions in the optical axis direction of the microscope objective, so as to determine the theoretical light spot region.
[0090] Among them, polynomial curve fitting can be used for curve fitting. Specifically, for the range of the polar angle θ of the light beam at the outer contour trajectory of the upper surface of the microscope objective, a set of pixel point positions corresponding to the same number is calibrated using multiple equally spaced polar angle θ values. Then, curve fitting is performed on the set of positions of the foregoing multiple pixel points, and the formed curve is used as the outer contour of the light spot image. Combining it with the line segment corresponding to the set of positions where the light rays at the major axis of the semi-elliptical light spot are reflected onto the first sensor forms a closed theoretical light spot region. In addition, when the fitted curve is not a closed curve, the head and tail ends of the curve can be connected to the two ends of the line segment in sequence to form a closed curve as the outer contour of the light spot image.
[0091] Through the above step F3, the position information of the light rays at the outer contour trajectory of the upper surface of the microscope objective in the light spot image corresponding to the first sensor after passing through the focusing lens can be determined, the position information in the light spot image can be obtained, and polynomial curve fitting is used to obtain the theoretical light spot region of the light spot image.
[0092] Among them, polynomial curve fitting is a conventional technical means and will not be shown in detail here.
[0093] Adjust the height change amount of the microscope objective in the optical axis direction so that the theoretical light spot formed by the semi-circular light spot on the first sensor changes with the height change of the microscope objective in the optical axis direction, and deduce the theoretical light spot regions corresponding to the first sensor at different heights of the microscope objective in the optical axis direction.
[0094] According to the vertical distance between the spot converged on the first sensor by the light reflected from the upper surface of the microscopic objective lens and the spot in the parfocal state, determine the spot position on the first sensor where the light beam reflected from the outer contour of the upper surface of the microscopic objective lens and the spot position on the first sensor where the light beam on the major axis of the elliptical spot is reflected. Then, using curve fitting, finally determine the closed theoretical spot area on the first sensor, thereby establishing the range of the spot area on the first sensor of the light beam reflected from the surface of the microscopic objective lens at different height positions, and further determining the corresponding theoretical spot area.
[0095] During the process of obtaining the actual spot image, as the microscopic objective lens moves along the optical axis to adjust the change in the height position of the microscopic objective lens in the optical axis direction, during this process, it is always ensured that the distance between the reflection position of the light beam emitted from the microscopic objective lens after being reflected by the surface of the object under test or other objects and the microscopic objective lens exceeds the focusable range, so as to prevent the light beam reflected by the surface of the object under test or other objects from converging to the surface of the first sensor after passing through the microscopic objective lens, the second beam splitter, the first beam splitter, and the focusing lens. Adjust the change in the height of the microscopic objective lens along the optical axis direction, and the first sensor collects the spot images of stray light at different height positions, and the spot images are actual spot images.
[0096] Among them, the actual spot image includes the stray light formed by the light beam reflected from the upper surface of the microscopic objective lens, and the stray light formed by the lenses inside the microscopic objective lens due to reflection, refraction, etc.
[0097] Step S503: Based on the gray values corresponding to the theoretical spot area in the actual spot image at different height positions of the microscopic objective lens, determine the average gray value in the theoretical spot area.
[0098] Extract the actual spot image and the theoretical spot area at the same height position of the microscopic objective lens. According to the magnification determined by the microscopic objective lens and the focusing lens in the autofocus device, convert the theoretical spot area to the spot area on the image corresponding to the first sensor, and based on the converted spot area, screen the actual spot image to determine the average gray value corresponding to the theoretical spot area in the actual spot image. It should be added that for a certain height position where there is no actual spot image, the known actual spot image closest to the height position is selected to replace it, or the average value of the gray values of the actual spot images at two adjacent height positions is calculated for replacement.
[0099] According to the theoretical spot area at the height position, screen out the gray values corresponding to the theoretical spot area from the actual spot image, and average the gray values within the theoretical spot area to obtain the average gray value of the light reflected from the upper surface of the microscopic objective lens within the theoretical spot area at the height position.
[0100] Based on this, the average gray value of the light reflected by the upper surface of the microscopic objective lens within the theoretical spot region at each height position of the microscopic objective lens is obtained.
[0101] Step S504: Use the average gray value within the theoretical spot region to correct the spot image of the object to be measured at the obtained height position, and calculate the defocus amount based on the corrected spot image, so as to control the motor to drive the microscopic objective lens to move along the axial direction.
[0102] When the autofocus device focuses on the object to be measured, the height position of the microscopic objective lens in the optical axis direction is adjusted. After the light emitted from the microscopic objective lens is reflected by the surface of the object to be measured, it is reflected by the microscopic 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 gray value corresponding to the theoretical spot region at the height position, the gray value within the theoretical spot region corresponding to the spot image at the height position is corrected. The corrected gray value is equal to the gray value within the theoretical spot region in the spot image minus the average gray value corresponding to the theoretical spot region.
[0103] Calculate the defocus amount for the corrected spot image. The defocus amount calculation uses centroid calculation to determine the adjustment distance between the microscopic objective lens and the object to be measured, so as to control 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 by the upper surface of the microscopic objective lens on the accurate calculation of the defocus amount. Embodiment 2
[0104] Correcting the spot images of the object to be measured at each height position involves removing the spot region outside the theoretical spot region in the actual spot image as the first spot region, and it is necessary to determine the influence of the gray value within the first spot region on the gray value within the theoretical spot region.
[0105] Specifically, according to Embodiment 1, the theoretical spot region and the actual spot region at different height positions of the microscopic objective lens in the optical axis direction are obtained to determine the first spot region. Among them, the first spot region is the spot region corresponding to the spot region of the actual spot image at the same position after removing the theoretical spot region.
[0106] When the microscopic objective lens is at the initial height position, the corresponding theoretical spot region is denoted as A(0). When the microscopic objective lens moves a distance Δh along the optical axis direction, the corresponding theoretical spot region is denoted as A(Δh). The theoretical spot region is the spot region inferred based on the existing autofocus optical device. When the microscopic objective lens is at the initial height position, the actual spot region collected by the first sensor is denoted as B(0). When the microscopic objective lens moves a distance Δh along the optical axis direction, the actual spot region collected by the first sensor is denoted as B(Δh).
[0107] When the microscopic objective lens is at different height positions, based on the theoretical spot area corresponding to the height position of the microscopic objective lens, from the actual spot area, the first spot area C(△h) outside the relative theoretical spot area is selected, and C(△h)=B(△h)-A(△h).
[0108] During the focusing process, the microscopic objective lens is driven by a motor to move along the optical axis direction, so that the distance from the light passing through the cylindrical lens to the surface of the objective lens changes. Finally, the stray light spot presented on the first sensor changes with the position of the microscopic objective lens. The obtained actual spot image of the stray light 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 microscopic objective lens.
[0109] The method for determining the theoretical spot area based on the gray value in the first spot area includes the following steps: Step W1: Divide the first spot area into at least one sub-area, and analyze the centroid coordinates of each sub-area after division.
[0110] Specifically, extract the spot image in the parfocal state. Along the length direction of the spot image and at the position of half of the spot width, it is used as the vertical coordinate; in the direction perpendicular to the vertical coordinate, it is used as the horizontal coordinate, and the horizontal coordinate corresponds to the image row.
[0111] Divide the first spot area C into at least one sub-area. The first spot area can be divided into one sub-area, 2 sub-areas or 4 sub-areas. Preferably, 2 sub-areas or 4 sub-areas.
[0112] Based on the horizontal coordinates (image rows) and gray values in each sub-area, calculate the centroid C of each sub-area: ; where x1 and x2 are the ranges of the horizontal coordinates (image rows) of each sub-area, and f(i) is the gray value of the pixel point.
[0113] Step W2: Adjust the height position of the microscopic objective lens along the optical axis direction, and repeat step W1, and analyze the centroid coordinates of each sub-area in the first spot area at this height position.
[0114] Step W3: Determine whether the sum of the centroid change amounts of each sub-area in the first spot area at different height positions is within the allowable error range. If so, eliminate the influence of the first spot area on the gray value in the theoretical spot area. If not, expand the theoretical spot area at different height positions based on the expansion coefficient q to obtain a new theoretical spot area.
[0115] Among them, the value range of q is 1.03 - 1.12. q is empirical data and will not be specifically described here. For the theoretical spot area above the allowable error range, the theoretical spot area is enlarged by the expansion coefficient q to reduce the influence of stray light spots in the first spot area on the theoretical spot area. By enlarging the theoretical spot area, the distribution of stray light in the first spot area outside the enlarged theoretical spot area is reduced, the influence of stray light spots in the first spot area on the theoretical spot area is reduced, and the accuracy of eliminating stray light spots in the spot image of the object to be measured is improved.
[0116] By the method of determining the gray value in the first spot area, the change amount of the centroid position in each sub-area of the first spot area can be determined, so as to show whether the interference of other stray light on the spot on the first sensor is within an acceptable range after eliminating the stray light reflected from the surface of the objective lens, and based on the determination situation, the theoretical spot area is adaptively adjusted, which can exclude the influence of the gray value in the spot area outside the theoretical spot area corresponding to the actual spot area on the defocus amount calculation, and improve the accuracy of defocus amount calculation. Embodiment 3
[0117] Based on the above embodiments, the present application also provides another method for determining the theoretical spot area based on the gray value in the first spot area, including the following steps: When the micro-objective lens is at different height positions in the optical axis direction, analyze the ratio between the sum of the gray values on the first spot area and the sum of the gray values in the actual spot image corresponding to the theoretical spot area at the height position, and determine whether the ratio is less than the set threshold. If so, eliminate the influence of the first spot area on the gray value in the theoretical spot area; if not, enlarge the theoretical spot area at different height positions by the expansion coefficient q to obtain a new theoretical spot area.
[0118] Among them, the set threshold is determined according to the experimental accuracy requirements and will not be elaborated here.
[0119] Specifically, obtain the ratio between the sum of the gray values in the first spot area and the sum of the gray values in the theoretical spot area in the actual spot image at this height position. By determining whether the ratio is less than the set threshold, it is used to measure the weight or influence degree of the sum of the gray values in the first spot area in the actual spot image corresponding to the sum of the gray values in the theoretical spot area. At the same time, it can also determine whether the ratio between the sum of the gray values in the first spot area and the sum of the gray values in the theoretical spot area in the actual spot image changes with the height position of the micro-objective lens. When the ratio is less than the set threshold with the change of the height position of the micro-objective lens, it reflects that the influence degree of the stray light in the first spot area is small. Embodiment 4
[0120] Based on Embodiment 1, in the actual spot images of the microscopic objective lens at different height positions, the gray values corresponding to the theoretical spot region are extracted, and the average value of the gray values within the theoretical spot region is obtained to get the average gray value.
[0121] Specifically, through the above analysis, the stray light reflected from the upper surface of the microscopic objective lens has little influence on the sum of the gray values within the proportion in the first spot region and the theoretical spot region. At different heights of the objective lens, the distribution area of the stray light reflected from the surface of the objective lens is different. The relationship between the average gray value and the area within the spot region at the first sensor obtained by theoretical calculation is: .
[0122] Wherein, and respectively represent the average gray values corresponding to the area within the spot region on the first sensor obtained by theoretical calculation within the actual obtained spot region B(△h) when the height position change amounts △h1 and △h2 of the microscopic objective lens relative to the initial height position in the optical axis direction. A(△h1) and A(△h2) respectively represent the areas of the spot regions at the first sensor obtained by theoretical calculation when the height position change amounts △h1 and △h2 of the microscopic objective lens relative to the initial height position in the optical axis direction.
[0123] Thus, in the solution of the present application, the spot region A(0) at the first sensor obtained by pre-calibration calculation and the average gray value within the spot region B(0) can be obtained at the initial height position. Then, based on the foregoing relational expression, the average gray value corresponding to the spot region A(△h) at the first sensor obtained by theoretical calculation when the objective lens moves relatively by △h can be analyzed.
[0124] By using the above method to screen the gray values within the actually obtained spot region at the first sensor according to the theoretical spot region, the gray values of the stray light within the theoretical spot region at different height positions of the objective lens can be obtained, so as to reduce the influence of the stray light in the image region on the first sensor on the focusing calculation when focusing on the object to be measured according to the height position of the objective lens by screening the average gray value of the theoretical spot region corresponding to the height position. Embodiment 5
[0125] In order to eliminate the stray light reflected from the surface of the object to be measured, in addition to adjusting the distance between the microscopic objective lens and the surface of the object to be measured so that the distance exceeds the focusable range of the microscopic objective lens, the present application also provides the following technical means: adding an extinction component in the microscopic autofocus device to eliminate the light reflected from the surface of the microscopic objective lens.
[0126] Specifically, the technical solution provided by the present application can also be provided with an extinction component in the microscopic autofocus device. The extinction component includes an extinction box, a polarizer, and a rotation optical component. Among them, the light beam passing through the microscopic objective lens sequentially passes through the polarizer and the rotation optical component and enters the incident hole of the extinction box, so as to avoid or reduce the light beam reflected by the inner wall of the extinction box from entering the microscopic objective lens.
[0127] In order to eliminate the interference of the stray light analysis on the first sensor caused by the light reflected from the surface of the object to be measured, the reflected light corresponding to the light beam passing through the microscopic objective lens is eliminated, so as to add an extinction component. When the magnification of the microscopic objective lens changes, by analyzing the focal position of the microscopic objective lens at different magnifications, the distance between the microscopic objective lens and the extinction component is controlled.
[0128] The extinction component includes a rectangular extinction box. The upper part of the rectangular extinction box is provided with an incident hole having the same length as the line light source in the parfocal state, so that the light beam corresponding to the line light source after passing through the microscopic objective lens is incident into the rectangular extinction box. A rotation optical component and a polarizer are installed above the incident hole. After the light beam incident from the microscopic objective lens passes through the polarizer, the polarized light having the same polarization direction as the polarizer is allowed to pass through, and is rotated by a fixed angle through the rotation optical component, and enters the rectangular extinction box through the incident hole on the rectangular extinction box. And an absorbing medium is distributed on the peripheral side inside the rectangular extinction box. At this time, the polarization direction of the linearly polarized light incident from the microscopic objective lens is the same as that of the polarizer, so the polarizer allows the light beam incident from the objective lens to pass through the polarizer.
[0129] The light incident from the objective lens sequentially passes through the polarizer, and after passing through the rotation optical component, enters the rectangular extinction box and is absorbed by the absorbing medium inside the rectangular extinction box. Part of the light reflected by the extinction box passes through the incident hole and, after being rotated twice by the rotation optical component, the deflection direction of the light is different from the polarization direction allowed by the polarizer, greatly weakening the light reflected by the extinction box from passing through the objective lens and entering the first sensor, and improving the accuracy of obtaining the data of the stray light reflected from the surface of the objective lens.
[0130] 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 light beam emitted by the laser passing through the microscopic objective lens and the reflected light of the microscopic objective lens, the distance between the objective lens and the rectangular extinction box needs to be adjusted. The distance between the microscopic objective lens and the incident hole of the rectangular extinction box is equal to the focal length of the microscopic objective lens corresponding to the current magnification.
[0131] Among them, the magnification M1 of the zoomed microscopic objective lens = f0×M0 / f1, where f0 represents the focal length at the magnification M0, and f1 represents the focal length at the magnification M1.
[0132] Let the laser beam from the laser unit be reflected by the second beam splitter, and the laser energy reaching the infinity conjugate microscope objective be \(I_0\). The reflectivity of the infinity conjugate microscope objective for the laser is \(e_1\), the reflectivity inside the extinction box is \(e_2\), the angle between the vibration direction of the incident linearly polarized light and the polarization direction of the analyzer is \(a\), and the optical rotation component can rotate the vibration direction of the light by \(b\).
[0133] Then, after passing through the objective lens, the signal light energy \(I\) passing through the analyzer n is:
[0134] The signal light energy \(I\) passing through the analyzer caused by reflection in the extinction box s is: ;
[0135] When this device can obtain the best signal-to-noise ratio. Preferably, when \(a = 0^{\circ}\) and \(b = 45^{\circ}\), the effect is the best.
[0136] Among them, the optical rotation component is selected from a Faraday rotator or a wave plate.
[0137] Preferably, the angle between the vibration direction of the incident linearly polarized light and the polarization direction of the analyzer is \(0^{\circ}\), the rotation angle of the optical rotation component is \(45^{\circ}\), and after passing through the optical rotation component, it rotates \(45^{\circ}\), so that the beam reflected by the inner surface of the rectangular extinction box rotates \(45^{\circ}\) again through the rotation component, so that the linearly polarized light rotates \(90^{\circ}\) after passing through the two optical rotation components and cannot pass through the analyzer, thereby preventing the beam emitted from the microscope objective from passing through the microscope objective, the second beam splitter, the first beam splitter and the focusing lens again and converging on the first sensor, effectively eliminating the influence of other beams on the stray light.
[0138] Based on the same inventive concept, this application also proposes a computer-readable storage medium, including a computer program, and when the computer program is executed by a processor, it implements the stray light gray value acquisition method or the autofocus processing method as described above.
[0139] This application embodiment also provides an electronic device, as Figure 7 shown, including a processor 701, a communication interface 702, a memory 703 and a communication bus 704, where the processor 701, the communication interface 702, and the memory 703 complete mutual communication through the communication bus 704, the memory 703 is used to store a computer program; the processor 701 is used to implement any of the above-mentioned stray light gray value acquisition methods or autofocus processing methods when executing the program stored on the memory 703.
[0140] The communication bus mentioned in the above-mentioned electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience in representation, only a thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0141] The communication interface is used for communication between the above-mentioned electronic device and other devices.
[0142] The memory may include a Random Access Memory (RAM), or may also include a Non-Volatile Memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located far from the aforementioned processor.
[0143] The above-mentioned processor may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may 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.
[0144] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as these combinations of technical features do not conflict, they should all be considered as within the scope described in this specification.
[0145] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for obtaining stray light gray scale value, which is applied to a microscopic autofocus device based on a laser spot, is characterized in that The method includes: Adjusting the distance between the microscopic objective lens and the reflection point corresponding to the light passing through the microscopic 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 microscopic objective lens; or adding a light extinction component outside the microscopic objective lens to eliminate the light passing through the microscopic objective lens; wherein, the light belongs to any one of the light beams provided by the laser unit in the microscopic autofocus device; Calculating the theoretical spot area formed by stray light on the surface of the first sensor at different axial height positions of the microscopic objective lens; wherein, the stray light is formed by the reflection of the semi-elliptical spot incident on the upper surface of the microscopic objective lens on the surface of the microscopic objective lens; 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 microscopic objective lens; Extracting the gray values of each pixel point in the theoretical spot area in the actual spot image at different axial height positions of the microscopic objective lens, for correcting the spot image of the object to be measured, so as to reduce the influence of stray light on the calculation result of the defocus amount.
2. The method for obtaining the stray light gray value according to claim 1, wherein The semi-elliptical spot incident on the upper surface of the microscopic objective lens is formed by the 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 light beam incident position and the optical axis of the cylindrical lens.
3. A method for obtaining the stray light gray value according to claim 1, characterized in that The theoretical spot area is the spot area presented on the first sensor after the outer contour of the semi-elliptical spot incident on the upper surface of the microscopic objective lens is reflected by the upper surface of the microscopic objective lens; Based on the divergence angles of the light beams at different axial positions of the microscopic objective lens when the semi-elliptical spot is incident on each position of the upper surface of the microscopic objective lens, determining the trajectory of the outer contour of the semi-elliptical spot incident on the upper surface of the microscopic objective lens.
4. A method for obtaining the stray light gray value according to claim 1, characterized in that After calculating the theoretical spot area formed by stray light on the surface of the first sensor at different axial height positions of the microscopic objective lens, the method further includes: Determining the first spot area based on the theoretical spot area and the actual spot image at different height positions of the microscopic objective lens; wherein, the first spot area is the spot area other than the theoretical spot area in the actual spot image at a certain height position.
5. A method for obtaining the stray light gray value according to claim 4, characterized in that, It further includes: Judging the theoretical spot area based on the gray values in the first spot area; Wherein, the judging process of the theoretical spot area includes the following steps: Dividing the first spot area into at least one sub-area, and analyzing the centroid coordinates of each divided sub-area; Adjusting the height position of the microscopic objective lens along the optical axis direction, and analyzing the centroid coordinates of each sub-area in the first spot area at the height position; Judging whether the sum of the centroid position change amounts of each sub-area in the first spot area at different height positions is within the allowable error range; if so, eliminating the influence of the first spot area on the gray values in the theoretical spot area; if not, expanding the theoretical spot area at different height positions based on the expansion coefficient to obtain a new theoretical spot area.
6. The method for obtaining the stray light gray value according to claim 3, characterized in that, The obtaining process of the theoretical spot area includes: Analyzing the included angle between the reflected light and the optical axis of the microscopic objective lens after each light beam at the outer contour trajectory of the semi-elliptical spot on the upper surface of the microscopic objective lens is reflected by the surface of the microscopic objective 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, analyze the vertical distance from the spot converged on the first sensor after the light beam passes through the focusing lens to the spot in the parfocal state. Using curve fitting, fit the set of outer contour spot positions on the first sensor at different axial positions of the microscope objective lens to form a closed theoretical spot region.
7. A method for obtaining the stray light gray value according to claim 1, characterized in that The extinction component includes an extinction box, a polarizer, and a polarization rotation component. Among them, the light beam passing through the microscope objective lens sequentially passes through the polarizer and the polarization rotation component and enters the incident hole of the extinction box to prevent the light reflected from the inner wall of the extinction box from entering the microscope objective lens.
8. An autofocus processing method, characterized in that, Including: Obtain the spot image of the object to be measured, and based on the stray light gray value acquisition method described in any one of claims 1-7, obtain the gray value within the theoretical spot region at the current height position of the microscope objective lens. Subtract the gray value within the theoretical spot region from the spot image to correct the spot image. 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.
9. An autofocus processing system, characterized in that, Including: The device adjustment module is used to adjust the distance between the microscope objective lens and the reflection point corresponding to the light 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 add an extinction component outside the microscope objective lens to eliminate the light passing through the microscope objective lens; among them, the light belongs to any one of the light beams provided by the laser unit in the microscope autofocus device. The spot calculation module is used to calculate the theoretical spot region formed by stray light on the surface of the first sensor at different axial height positions of the microscope objective lens; among them, the stray light is formed by the reflection of the semi-elliptical spot incident on the upper surface of the microscope objective lens on the surface of the microscope objective lens; 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 gray value extraction module is used to extract the gray values of each pixel point in the theoretical spot region of the actual spot image at different axial height positions of the microscope objective lens. The correction driving module is used to obtain the spot image of the object to be measured at the current axial height position, use the gray value within the theoretical spot region at the current axial height position to correct the spot image of the object to be measured, 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.
10. A computer-readable storage medium, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the stray light gray value acquisition method described in any one of claims 1-7 or the autofocus processing method described in claim 8.
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
Method and device for testing stray light
CN114112330A
Cited By
Industrial focusing method, device and equipment and storage medium
CN120630432A
Laser spot image processing method, automatic focusing method and medium
CN120786191A
A laser spot image processing method, an automatic focusing method and a medium
CN120786191B