An adaptive focusing and focus lock control method and system

By using adaptive focusing and focus-locking control methods, multi-position images of the sample are acquired, and sharpness judgment and target point fitting are performed. This solves the imaging blur problem caused by uneven sample thickness or surface unevenness, and achieves clear imaging across the entire area.

CN120881411BActive Publication Date: 2026-06-23NANJING PURUIXIMA INSTR CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511224438.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-29
Publication Date
2026-06-23
Estimated Expiration
2045-08-29

AI Technical Summary

Technical Problem

During the focusing process, traditional microscopes often suffer from uneven sample thickness or surface roughness, resulting in some areas being clear while the overall image remains blurry.

Method used

By controlling the focal plane to move along a direction perpendicular to the initial axis, multiple initial images tangent to the sample are acquired, segmented and sharpness judged, target sub-images are determined, target point spatial information is fitted to obtain the target plane, and the focal plane is driven to overlap with the target plane.

Benefits of technology

It achieves clear imaging of the entire sample area, ensures focal plane consistency, covers larger-sized planar samples, and improves imaging quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120881411B_ABST
    Figure CN120881411B_ABST
Patent Text Reader

Abstract

The application provides a self-adaptive focusing and locking control method and system, and belongs to the technical field of control. The self-adaptive focusing and locking control method and system are provided in the embodiment of the application. The target plane is fitted through target point space information, and the focal plane is driven to rotate or translate. The actual surface of the sample can be automatically matched. Based on the target point distribution calculation of the sub-image group, larger size plane samples can be covered. Through the mode of regional fitting and re-integration, the consistency of the focal plane of the whole plane is ensured, clear imaging of the whole region of the sample is realized, and the problem of local unclarity caused by single focusing is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of control technology, and in particular to an adaptive focusing and lock-in control system. Background Technology

[0002] Image acquisition devices, such as microscopes, use a lens system to focus sample details onto an image sensor (such as a CCD / CMOS).

[0003] When a sample has a certain thickness, or when the sample surface is uneven or tilted, traditional microscopes tend to produce a phenomenon where some parts are clear while the whole sample is blurry during focusing, due to the different focal lengths corresponding to different thickness positions or different surface areas. Summary of the Invention

[0004] This application provides an adaptive focusing and focus-locking control method and system to improve the above-mentioned problems.

[0005] To achieve the above objectives, this application adopts the following technical solution:

[0006] The first aspect of this application proposes an adaptive focusing and focus-locking control method applicable to an image acquisition device. The image acquisition device includes an image sensor, a movable focal plane, and a control terminal capable of controlling the movement of the focal plane. The method is executed by the control terminal and includes:

[0007] Control the focal plane to move along an initial axis perpendicular to the focal plane, and acquire M initial images when the focal plane is tangent to the sample;

[0008] M initial images are segmented using the same segmentation rule to form N sub-image groups. Each sub-image group includes M initial sub-images, where the M initial sub-images belonging to the same group are in the same position.

[0009] From the M initial sub-images in each group, a target sub-image is determined. The target sub-image is the clearest sub-image in the corresponding sub-image group.

[0010] A target point is determined on each target sub-image. Based on the initial sub-image and the corresponding sub-image group for each target sub-image, the spatial information of N target points is determined.

[0011] The spatial information of N target points is fitted to obtain the target plane;

[0012] Control the movement of the focal plane to make it overlap with the target plane.

[0013] In conjunction with the first aspect, in some embodiments, controlling the focal plane to move so that the focal plane overlaps with the target plane includes:

[0014] If the target plane is perpendicular to the initial axis, then control the focal plane to move along the initial axis so that the focal plane overlaps with the target plane.

[0015] In conjunction with the first aspect, in some embodiments, controlling the focal plane to move so that the focal plane overlaps with the target plane includes:

[0016] If the target plane is not perpendicular to the initial axis, then obtain the adjustment angle between the focal plane and the target plane;

[0017] Based on adjusting the included angle rotation, the initial axis and focal plane are rotated to make the focal plane parallel to the target plane;

[0018] Control the focal plane to move along the initial axis so that the focal plane overlaps with the target plane.

[0019] In conjunction with the first aspect, in some implementations, a target sub-image is determined from the M initial sub-images of each group, wherein the target sub-image is the clearest sub-image in the corresponding sub-image group, including:

[0020] Obtain the average contrast of the M initial sub-images in the same group, and determine the initial sub-image with the highest average contrast from the M initial sub-images as the target sub-image.

[0021] In conjunction with the first aspect, in some implementations, a target sub-image is determined from the M initial sub-images of each group, wherein the target sub-image is the clearest sub-image in the corresponding sub-image group, including:

[0022] Get M initial sub-images from the same group and input them into a neural network model. The neural network model is used to determine the clearest initial sub-image from the multiple input initial sub-images.

[0023] Based on the output of the neural network model, the target sub-image is determined from the M initial sub-images.

[0024] In conjunction with the first aspect, in some embodiments, M initial sub-images from the same group are acquired, and the M initial sub-images are input into a neural network model. The neural network model is used to determine the clearest initial sub-image from the input multiple initial sub-images, including:

[0025] From N sub-image groups, a target group and multiple auxiliary groups are determined. A sub-image belonging to the target group is adjacent to multiple sub-images belonging to the auxiliary groups from the same initial image. The sub-images belonging to the auxiliary groups are called auxiliary sub-images, and the sub-images belonging to the target group are called center sub-images.

[0026] Multiple auxiliary sub-images from the same initial image are stitched together with a central sub-image to form an auxiliary image;

[0027] Input M auxiliary images into the neural network model.

[0028] In conjunction with the first aspect, in some implementations, a target point is determined on each target sub-image, and based on the initial sub-image and the corresponding sub-image group corresponding to each target sub-image, the spatial information of N target points is determined, including:

[0029] The center point in each target sub-image is used as the target point.

[0030] In conjunction with the first aspect, in some implementations, the spatial information of N target points is fitted to obtain a target plane, including:

[0031] A reference point is determined based on the spatial information of N target points;

[0032] Obtain multiple difference vectors between the coordinates of N target points and the coordinates of the reference point;

[0033] The initial orientation of the target plane is determined based on multiple difference vectors;

[0034] The target plane is determined based on the initial direction and reference point.

[0035] A second aspect of this application discloses an adaptive focusing and focus-locking control system, including an image sensor, a movable focal plane, and a control terminal capable of controlling the movement of the focal plane. The system is configured as follows:

[0036] Control the focal plane to move along an initial axis perpendicular to the focal plane, and acquire M initial images when the focal plane is tangent to the sample;

[0037] M initial images are segmented using the same segmentation rule to form N sub-image groups. Each sub-image group includes M initial sub-images, where the M initial sub-images belonging to the same group are in the same position.

[0038] From the M initial sub-images in each group, a target sub-image is determined. The target sub-image is the clearest sub-image in the corresponding sub-image group.

[0039] A target point is determined on each target sub-image. Based on the initial sub-image and the corresponding sub-image group for each target sub-image, the spatial information of N target points is determined.

[0040] The spatial information of N target points is fitted to obtain the target plane;

[0041] Control the movement of the focal plane to make it overlap with the target plane.

[0042] In conjunction with the second aspect, in some implementations, the system is configured as follows:

[0043] Controlling the movement of the focal plane to make it overlap with the target plane includes:

[0044] If the target plane is perpendicular to the initial axis, then control the focal plane to move along the initial axis so that the focal plane overlaps with the target plane.

[0045] In conjunction with the second aspect, in some implementations, the system is configured as follows:

[0046] Controlling the movement of the focal plane to make it overlap with the target plane includes:

[0047] If the target plane is not perpendicular to the initial axis, then obtain the adjustment angle between the focal plane and the target plane;

[0048] Based on adjusting the included angle rotation, the initial axis and focal plane are rotated to make the focal plane parallel to the target plane;

[0049] Control the focal plane to move along the initial axis so that the focal plane overlaps with the target plane.

[0050] In conjunction with the second aspect, in some implementations, the system is configured as follows:

[0051] From the M initial sub-images in each group, a target sub-image is determined. The target sub-image is the clearest sub-image in the corresponding sub-image group, including:

[0052] Obtain the average contrast of the M initial sub-images in the same group, and determine the initial sub-image with the highest average contrast from the M initial sub-images as the target sub-image.

[0053] In conjunction with the second aspect, in some implementations, the system is configured as follows:

[0054] From the M initial sub-images in each group, a target sub-image is determined. The target sub-image is the clearest sub-image in the corresponding sub-image group, including:

[0055] Get M initial sub-images from the same group and input them into a neural network model. The neural network model is used to determine the clearest initial sub-image from the multiple input initial sub-images.

[0056] Based on the output of the neural network model, the target sub-image is determined from the M initial sub-images.

[0057] In conjunction with the second aspect, in some implementations, the system is configured as follows:

[0058] Obtain M initial sub-images from the same group and input them into a neural network model. The neural network model is used to determine the clearest initial sub-image from the multiple input initial sub-images, including:

[0059] From N sub-image groups, a target group and multiple auxiliary groups are determined. A sub-image belonging to the target group is adjacent to multiple sub-images belonging to the auxiliary groups from the same initial image. The sub-images belonging to the auxiliary groups are called auxiliary sub-images, and the sub-images belonging to the target group are called center sub-images.

[0060] Multiple auxiliary sub-images from the same initial image are stitched together with a central sub-image to form an auxiliary image;

[0061] Input M auxiliary images into the neural network model.

[0062] In conjunction with the second aspect, in some implementations, the system is configured as follows:

[0063] A target point is determined on each target sub-image. Based on the initial sub-image and the corresponding sub-image group for each target sub-image, the spatial information of N target points is determined, including:

[0064] The center point in each target sub-image is used as the target point.

[0065] In conjunction with the second aspect, in some implementations, the system is configured as follows:

[0066] The spatial information of N target points is fitted to obtain the target plane, including:

[0067] A reference point is determined based on the spatial information of N target points;

[0068] Obtain multiple difference vectors between the coordinates of N target points and the coordinates of the reference point;

[0069] The initial orientation of the target plane is determined based on multiple difference vectors;

[0070] The target plane is determined based on the initial direction and reference point.

[0071] A third aspect of this invention provides an electronic device, which includes:

[0072] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method proposed in the first aspect of the present invention.

[0073] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described in the first aspect of the present invention.

[0074] In summary, the above methods and systems have the following technical effects:

[0075] This application proposes an adaptive focusing and focus-locking control method and system. First, the focal plane is controlled to move along an initial axis perpendicular to the focal plane, and multiple initial images are acquired when the focal plane is tangent to the sample. Then, the initial images are segmented using the same segmentation rule. From each group of M initial sub-images, a target sub-image is determined. The target sub-image is the clearest sub-image in the corresponding sub-image group. Next, a target point is determined on each target sub-image. Based on the initial sub-image and the corresponding sub-image group for each target sub-image, the spatial information of N target points is determined. Then, the spatial information of the N target points is fitted to obtain the target plane. Finally, the focal plane is controlled to move so that it overlaps with the target plane. The adaptive focusing and focus-locking control method and system proposed in this application, by fitting the target plane with the target point spatial information and driving the focal plane to rotate or translate, can automatically match the actual surface of the sample. Based on the target point distribution calculation of the sub-image group, it can cover larger-sized planar samples. By using a regional fitting and then integration method, the consistency of the focal plane across the entire plane is ensured, achieving clearer imaging of the entire sample area. Attached Figure Description

[0076] Figure 1 This is a flowchart illustrating an adaptive focusing and focus-locking control method proposed in an embodiment of this application. Detailed Implementation

[0077] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0078] This application proposes an adaptive focusing and focus-locking control method applicable to image acquisition devices. For example, the image acquisition device can be an optical microscope; however, in other embodiments, it can also be other devices with an optical focal plane, such as scanners or industrial cameras, etc., which are not limited in this application. An optical microscope is used as an example in this application.

[0079] For example, an image acquisition device includes an image sensor, a movable focal plane, and a control terminal that controls the movement of the focal plane. It is understood that the control terminal can move the focal plane by moving an optical structure; of course, in other embodiments, it can also control the movement of a structure such as a stage carrying the sample to be observed.

[0080] This application proposes an adaptive focusing and focus-locking control method, applicable to control terminals. Please refer to [link / reference needed]. Figure 1 The method includes steps S101-S106:

[0081] S101: Control the focal plane to move along an initial axis perpendicular to the focal plane, and acquire M initial images when the focal plane is tangent to the sample.

[0082] Understandably, with a microscope, when the depth of field of the objective lens is large, only the focal plane can be displayed. However, when the sample to be observed has a certain thickness, such as microstructures like cells or chips, traditional equipment can only acquire a clear image of the portion tangent to the focal plane in a single focusing attempt.

[0083] Therefore, in this embodiment, by sampling at multiple locations, clear image information of the sample at different focusing depths is obtained, providing complete data support for subsequent full-plane analysis.

[0084] S102: Divide the M initial images into N sub-image groups using the same segmentation rule, so that the M initial images form N sub-image groups. Each sub-image group includes M initial sub-images, wherein the M initial sub-images belonging to the same group are in the same position.

[0085] Understandably, the M initial images can be segmented according to the same preset segmentation rules (such as grid division) to decompose the overall image into local sub-regions, thereby enabling independent sharpness analysis of different locations of the samples and avoiding the dominant influence of single-region features on the overall judgment.

[0086] For example, a 5×5 grid segmentation rule can be used to divide each initial image into 25 sub-regions (N=25).

[0087] The images are categorized into 25 sub-image groups based on their spatial location, with each group containing 8 sub-images (each from the same grid position of the 8 initial images).

[0088] S103: Determine a target sub-image from the M initial sub-images in each group. The target sub-image is the clearest sub-image in the corresponding sub-image group.

[0089] Understandably, for each sub-image group, the image with the highest clarity is selected from the M sub-images as the target sub-image.

[0090] Specifically, in this embodiment, the average contrast of M initial sub-images in the same group can be obtained, and the initial sub-image with the highest average contrast can be determined as the target sub-image from the M initial sub-images.

[0091] Of course, judging sharpness by contrast is only one implementation method. In other implementation methods, it may be to obtain, for example, the mean of the Laplacian operator that reflects edge sharpness, or other values ​​that can characterize sharpness. This application does not limit this method.

[0092] In other embodiments, image sharpness can also be determined using a neural network to adapt to low-contrast samples such as biological cells.

[0093] For example, M initial sub-images from the same group can be obtained and input into a neural network model. The neural network model is used to determine the clearest initial sub-image from the multiple input initial sub-images. Then, based on the output of the neural network model, the target sub-image is determined from the M initial sub-images.

[0094] In this embodiment, a sharpness evaluation model based on convolutional neural networks (CNN) can be used.

[0095] As an example, the network structure includes an input layer, a feature extraction layer, a classification layer, and training data. The input layer receives a single sub-image. The feature extraction layer contains multiple convolutional blocks, each consisting of a convolutional layer, a BatchNorm layer, a ReLU activation function, and a max-pooling layer, progressively extracting sharpness-related features such as edges and textures from the sub-image. The classification layer contains fully connected layers that output a sharpness score for the sub-image, exemplified by a score from 0 to 100, with higher scores indicating greater sharpness.

[0096] The training data consists of sample sub-images containing different degrees of blur, labeled with their sharpness tags. The model parameters are optimized through backpropagation. The sharpness tags can be rated by professionals, and there are no restrictions on this.

[0097] Understandably, deep neural networks can capture subtle sharpness features of sub-images, and compared to traditional contrast methods, they are more accurate in judging the sharpness of low-texture, weak-edge samples, such as biological slices and smooth metal surfaces.

[0098] In other implementations, to reduce the risk of missing local features, contextual information from adjacent sub-images can be introduced, which solves problems such as local noise interference and insufficient texture information when judging a single sub-image.

[0099] For example, a target group and multiple auxiliary groups can be determined from N sub-image groups. A sub-image belonging to the target group is adjacent to multiple sub-images belonging to the auxiliary groups from the same initial image. The sub-images belonging to the auxiliary groups are called auxiliary sub-images, and the sub-images belonging to the target group are called center sub-images.

[0100] Then, multiple auxiliary sub-images from the same initial image are concatenated with a central sub-image to form an auxiliary image, and the M auxiliary images are input into the neural network model.

[0101] Understandably, the stitched auxiliary image contains not only the local features of the central sub-image but also environmental information such as texture and edges of its surrounding area. Neural networks can analyze the correlation between the center and its surroundings—for example, whether the surrounding areas also exhibit synchronously clear features when the center is clear—to more accurately determine the true clarity of the central sub-image and avoid being misled by local noise.

[0102] S104: Determine a target point on each target sub-image, and determine the spatial information of N target points based on the initial sub-image and the corresponding sub-image group corresponding to each target sub-image.

[0103] Understandably, a specific point is selected from each target sub-image as the target point. This point represents the representative location of the sample region corresponding to that sub-image. In practice, the center point of the target sub-image is usually chosen as the target point (e.g., the center coordinate of the sub-image's pixel coordinate system), because the center point can stably reflect the center position of the local sample region corresponding to the sub-image, avoiding possible deviations at the edges. For example, if the target sub-image is a 50×50 pixel region, its center point (25,25) pixel position is the target point of that sub-image.

[0104] Then, by combining the source of the target sub-image, i.e. the corresponding initial sub-image and sub-image group, the specific position of each target point in three-dimensional space, i.e. the spatial coordinates, can be calculated to realize the mapping of the spatial coordinates of each sub-image.

[0105] S105: Fit the spatial information of N target points to obtain the target plane.

[0106] Understandably, we can find a plane that minimizes the overall distance from the N target points to that plane, so that the plane can optimally cover all the target points. This plane is the target plane of the sample surface. By locking the focal plane to the target plane, we can ensure that the image sensor can achieve uniform image clarity across the entire sample area.

[0107] For example, the fitting process may include:

[0108] A reference point is determined based on the spatial information of N target points;

[0109] Obtain multiple difference vectors between the coordinates of N target points and the coordinates of the reference point;

[0110] The initial orientation of the target plane is determined based on multiple difference vectors;

[0111] The target plane is determined based on the initial direction and reference point.

[0112] It is understandable that the target points may be discrete due to the slight unevenness of the sample surface, noise, etc., but the fitting process will ignore local interference and find the plane that best represents the average shape.

[0113] In other embodiments, the target coordinates can be substituted into the least squares equations to transform the problem into a matrix eigenvalue problem. For example, a covariance matrix can be constructed, and the plane normal vector (A, B, C) can be obtained by solving for the eigenvector corresponding to the smallest eigenvalue of the matrix. Then, the position parameter D can be calculated by substituting any target coordinates to complete the construction of the plane equation.

[0114] Of course, the standard deviation of the distance from all target points to the fitted plane can then be calculated to evaluate the degree of fit between the plane and the sample surface.

[0115] There are other methods for fitting the spatial information of N target points, which are not specifically limited in this application.

[0116] S106: Control the movement of the focal plane so that it overlaps with the target plane.

[0117] Understandably, if the target plane is perpendicular to the initial axis, the focal plane is controlled to move along the initial axis so that the focal plane overlaps with the target plane.

[0118] If the target plane is perpendicular to the initial axis, then control the focal plane to move along the initial axis so that the focal plane overlaps with the target plane.

[0119] Understandably, by controlling the translation or rotation of the focal plane, the positional and angular deviations between it and the target plane are eliminated, ultimately making the two planes completely coincide in space. At this point, all points on the sample surface are at the same distance from the focal plane, allowing the image sensor to achieve a relatively clear image of the entire sample area.

[0120] This application proposes an adaptive focusing and focus-locking control method. First, the focal plane is controlled to move along an initial axis perpendicular to the focal plane, and multiple initial images are acquired when the focal plane is tangent to the sample. Then, the initial images are segmented using the same segmentation rule. From each group of M initial sub-images, a target sub-image is determined. The target sub-image is the clearest sub-image in the corresponding sub-image group. Next, a target point is determined on each target sub-image. Based on the initial sub-image and the corresponding sub-image group for each target sub-image, the spatial information of N target points is determined. Then, the spatial information of the N target points is fitted to obtain the target plane. Finally, the focal plane is controlled to move so that it overlaps with the target plane. This adaptive focusing and focus-locking control method, by fitting the target plane with the target point spatial information and driving the focal plane to rotate or translate, can automatically match the actual surface of the sample. Based on the target point distribution calculation of the sub-image group, it can cover larger-sized planar samples. By using a regional fitting and then integration method, the consistency of the focal plane across the entire plane is ensured, achieving clearer imaging of the entire sample area.

[0121] Based on the same inventive concept, embodiments of this application also propose an adaptive focusing and focus-locking control system, including an image sensor, a movable focal plane, and a control terminal capable of controlling the movement of the focal plane. The system is configured as follows:

[0122] Control the focal plane to move along an initial axis perpendicular to the focal plane, and acquire M initial images when the focal plane is tangent to the sample;

[0123] M initial images are segmented using the same segmentation rule to form N sub-image groups. Each sub-image group includes M initial sub-images, where the M initial sub-images belonging to the same group are in the same position.

[0124] From the M initial sub-images in each group, a target sub-image is determined. The target sub-image is the clearest sub-image in the corresponding sub-image group.

[0125] A target point is determined on each target sub-image. Based on the initial sub-image and the corresponding sub-image group for each target sub-image, the spatial information of N target points is determined.

[0126] The spatial information of N target points is fitted to obtain the target plane;

[0127] Control the movement of the focal plane to make it overlap with the target plane.

[0128] In some implementations, the system is configured as follows:

[0129] Controlling the movement of the focal plane to make it overlap with the target plane includes:

[0130] If the target plane is perpendicular to the initial axis, then control the focal plane to move along the initial axis so that the focal plane overlaps with the target plane.

[0131] In some implementations, the system is configured as follows:

[0132] Controlling the movement of the focal plane to make it overlap with the target plane includes:

[0133] If the target plane is not perpendicular to the initial axis, then obtain the adjustment angle between the focal plane and the target plane;

[0134] Based on adjusting the included angle rotation, the initial axis and focal plane are rotated to make the focal plane parallel to the target plane;

[0135] Control the focal plane to move along the initial axis so that the focal plane overlaps with the target plane.

[0136] In some implementations, the system is configured as follows:

[0137] From the M initial sub-images in each group, a target sub-image is determined. The target sub-image is the clearest sub-image in the corresponding sub-image group, including:

[0138] Obtain the average contrast of the M initial sub-images in the same group, and determine the initial sub-image with the highest average contrast from the M initial sub-images as the target sub-image.

[0139] In some implementations, the system is configured as follows:

[0140] From the M initial sub-images in each group, a target sub-image is determined. The target sub-image is the clearest sub-image in the corresponding sub-image group, including:

[0141] Get M initial sub-images from the same group and input them into a neural network model. The neural network model is used to determine the clearest initial sub-image from the multiple input initial sub-images.

[0142] Based on the output of the neural network model, the target sub-image is determined from the M initial sub-images.

[0143] In some implementations, the system is configured as follows:

[0144] Obtain M initial sub-images from the same group and input them into a neural network model. The neural network model is used to determine the clearest initial sub-image from the multiple input initial sub-images, including:

[0145] From N sub-image groups, a target group and multiple auxiliary groups are determined. A sub-image belonging to the target group is adjacent to multiple sub-images belonging to the auxiliary groups from the same initial image. The sub-images belonging to the auxiliary groups are called auxiliary sub-images, and the sub-images belonging to the target group are called center sub-images.

[0146] Multiple auxiliary sub-images from the same initial image are stitched together with a central sub-image to form an auxiliary image;

[0147] Input M auxiliary images into the neural network model.

[0148] In some implementations, the system is configured as follows:

[0149] A target point is determined on each target sub-image. Based on the initial sub-image and the corresponding sub-image group for each target sub-image, the spatial information of N target points is determined, including:

[0150] The center point in each target sub-image is used as the target point.

[0151] In some implementations, the system is configured as follows:

[0152] The spatial information of N target points is fitted to obtain the target plane, including:

[0153] A reference point is determined based on the spatial information of N target points;

[0154] Obtain multiple difference vectors between the coordinates of N target points and the coordinates of the reference point;

[0155] The initial orientation of the target plane is determined based on multiple difference vectors;

[0156] The target plane is determined based on the initial direction and reference point.

[0157] This application proposes an adaptive focusing and focus-locking control system. First, the focal plane is controlled to move along an initial axis perpendicular to the focal plane, acquiring multiple initial images when the focal plane is tangent to the sample. Then, the initial images are segmented using the same segmentation rules. From each group of M initial sub-images, a target sub-image is determined. The target sub-image is the clearest sub-image in the corresponding sub-image group. Next, a target point is determined on each target sub-image. Based on the initial sub-image and the corresponding sub-image group for each target sub-image, the spatial information of N target points is determined. Then, the spatial information of the N target points is fitted to obtain the target plane. Finally, the focal plane is controlled to move so that it overlaps with the target plane. This adaptive focusing and focus-locking control system, by fitting the target plane with the target point spatial information and driving the focal plane to rotate or translate, can automatically match the actual surface of the sample. Based on the target point distribution calculation of the sub-image group, it can cover larger-sized planar samples. By using a regional fitting and then integration method, it ensures the consistency of the focal plane across the entire plane, achieving clearer imaging of the entire sample area.

[0158] Based on the same inventive concept, embodiments of this application also propose an electronic device, which includes:

[0159] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the automatic overheat protection method based on the universal testing machine according to the embodiments of this application.

[0160] In addition, to achieve the above objectives, embodiments of this application also propose a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the automatic overheat protection method based on a universal testing machine according to embodiments of this application.

[0161] The following is a detailed introduction to the various components of the electronic device:

[0162] In this context, the processor is the control center of the electronic device. It can be a single processor or a collective term for multiple processing elements. For example, a processor can be one or more central processing units (CPUs), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention, such as one or more digital signal processors (DSPs), or one or more field-programmable gate arrays (FPGAs).

[0163] Alternatively, the processor can perform various functions of the electronic device by running or executing software programs stored in memory and by calling data stored in memory.

[0164] The memory is used to store the software program that executes the solution of the present invention, and the execution is controlled by the processor. The specific implementation method can be referred to the above method embodiment, which will not be repeated here.

[0165] Optionally, the memory can be read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions, random access memory (RAM) or other types of dynamic storage devices capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. The memory can be integrated with the processor or exist independently and coupled to the processor through an interface circuit of an electronic device; the embodiments of the present invention do not specifically limit this.

[0166] A transceiver is used to communicate with network devices or with terminal devices.

[0167] Optionally, the transceiver may include a receiver and a transmitter. The receiver is used to implement the receiving function, and the transmitter is used to implement the sending function.

[0168] Optionally, the transceiver can be integrated with the processor or exist independently and coupled to the processor through the router's interface circuit. This embodiment of the invention does not specifically limit this.

[0169] Furthermore, the technical effects of the electronic device can be referred to the technical effects of the data transmission method in the above method embodiments, and will not be repeated here.

[0170] It should be understood that the processor in the embodiments of the present invention can be a central processing unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0171] It should also be understood that the memory in the embodiments of the present invention can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDRSDRAM), enhanced synchronous DRAM (ESDRAM), synchronous linked DRAM (SLDRAM), and direct rambus RAM (DRRAM).

[0172] The above embodiments can be implemented, in whole or in part, by software, hardware (such as circuits), firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the flow or function according to the embodiments of the present invention is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., infrared, wireless, microwave, etc.) means. A computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. Available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media. Semiconductor media can be solid-state drives.

[0173] It should be understood that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. A and B can be singular or plural. Additionally, the character " / " in this article generally indicates an "or" relationship between the preceding and following related objects, but it can also represent an "and / or" relationship. Please refer to the context for a more accurate understanding.

[0174] In this invention, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of a single item or a plurality of items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be a single item or multiple items.

[0175] It should be understood that, in various embodiments of the present invention, the order of the above-mentioned process numbers does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0176] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

Claims

1. An adaptive focusing and focus-locking control system, comprising an image sensor, a movable focal plane, and a control terminal capable of controlling the movement of the focal plane, the system being configured to: The focal plane is controlled to move along an initial axis perpendicular to the focal plane, and M initial images are acquired when the focal plane is tangent to the sample. The M initial images are segmented using the same segmentation rule to form N sub-image groups, each sub-image group comprising M initial sub-images, wherein... The M initial sub-images belonging to the same group are in the same position; From the M initial sub-images in each group, a target sub-image is determined, wherein the target sub-image is the clearest sub-image in the corresponding sub-image group, including: M initial sub-images from the same group are obtained, and the M initial sub-images are input into a neural network model, which is used to determine the clearest initial sub-image from the input initial sub-images; Based on the output of the neural network model, the target sub-image is determined from the M initial sub-images; From N sub-image groups, a target group and multiple auxiliary groups are determined. A sub-image belonging to the target group is adjacent to multiple sub-images belonging to the auxiliary groups from the same initial image. The sub-images belonging to the auxiliary groups are auxiliary sub-images, and the sub-images belonging to the target group are central sub-images. Multiple auxiliary sub-images from the same initial image are stitched together with a central sub-image to form an auxiliary image; Input the M auxiliary images into the neural network model; A target point is determined on each of the target sub-images, and the spatial information of N target points is determined based on the initial sub-image and the corresponding sub-image group corresponding to each target sub-image. The spatial information of the N target points is fitted to obtain the target plane; The focal plane is controlled to move so that it overlaps with the target plane.

2. The adaptive focusing and focus-locking control system according to claim 1, characterized in that, The system is configured as follows: Controlling the focal plane to move so that it overlaps with the target plane includes: If the target plane is perpendicular to the initial axis, then the focal plane is controlled to move along the initial axis so that the focal plane overlaps with the target plane.

3. The adaptive focusing and focus-locking control system according to claim 2, characterized in that, The system is configured as follows: Controlling the focal plane to move so that it overlaps with the target plane includes: If the target plane is not perpendicular to the initial axis, then the adjustment angle between the focal plane and the target plane is obtained; Based on the adjusted included angle, rotate the initial axis and the focal plane to make the focal plane parallel to the target plane; The focal plane is controlled to move along the initial axis so that the focal plane overlaps with the target plane.

4. The adaptive focusing and focus-locking control system according to claim 1, characterized in that, The system is configured as follows: From the M initial sub-images in each group, a target sub-image is determined, wherein the target sub-image is the clearest sub-image in the corresponding sub-image group, including: Obtain the average contrast of the M initial sub-images in the same group, and determine the initial sub-image with the highest average contrast from the M initial sub-images as the target sub-image.

5. The adaptive focusing and focus-locking control system according to claim 1, characterized in that, The system is configured as follows: A target point is determined on each of the target sub-images. Based on the initial sub-image and the corresponding sub-image group for each target sub-image, the spatial information of N target points is determined, including: The center point in each of the target sub-images is taken as the target point.

6. The adaptive focusing and focus-locking control system according to claim 5, characterized in that, The system is configured as follows: Fitting the spatial information of the N target points to obtain the target plane includes: A reference point is determined based on the spatial information of the N target points; Obtain multiple difference vectors between the coordinates of the N target points and the coordinates of the reference point; The initial direction of the target plane is determined based on multiple difference vectors; The target plane is determined based on the initial direction and the reference point.

7. An adaptive focusing and focus-locking control method, characterized in that, Performed by an adaptive focusing and focus-locking system as described in claim 1, the method includes: The focal plane is controlled to move along an initial axis perpendicular to the focal plane, and M initial images are acquired when the focal plane is tangent to the sample. The M initial images are segmented using the same segmentation rule to form N sub-image groups. Each sub-image group includes M initial sub-images, wherein the M initial sub-images belonging to the same group are in the same position. From the M initial sub-images in each group, a target sub-image is determined, wherein the target sub-image is the clearest sub-image in the corresponding sub-image group; A target point is determined on each of the target sub-images, and the spatial information of N target points is determined based on the initial sub-image and the corresponding sub-image group corresponding to each target sub-image. The spatial information of the N target points is fitted to obtain the target plane; The focal plane is controlled to move so that it overlaps with the target plane.

8. An electronic device, characterized in that, include: At least one processor; And, a memory communicatively connected to at least one of the processors; The memory stores instructions that can be executed by at least one of the processors, which are executed by at least one of the processors to enable at least one of the processors to perform an adaptive focusing and focus-locking control method as claimed in claim 7.

Citation Information

Patent Citations

  • Automatic focusing method and device

    CN104767926A

  • Automatic focusing method and device for target object

    CN112135048A