Field of view focus height processing method, system, electronic device and readable medium

Through triangulation and interpolation technology, the target focus height is calculated, which solves the defocus problem caused by low plane fitting accuracy and improves the scanning image quality of the electron microscope.

CN119601444BActive Publication Date: 2025-05-16HANGZHOU XINO INTELLIGENT MEDICINE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510130579.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-05
Publication Date
2025-05-16
Estimated Expiration
2045-02-05

AI Technical Summary

Technical Problem

In the prior art, low plane fitting accuracy may lead to defocusing problems in electron microscopy, affecting the quality of the scanned image of the sample.

Method used

By obtaining the fitted focus height of the non-focus field of view and triangulating the set of points composed of the focus field of view, a triangulation grid is obtained. Interpolate the triangles corresponding to the non-focus field of view in the triangular grid to obtain the fitting error and calculate the target focus height.

Benefits of technology

The accuracy of fitting the focus height is improved, the defocusing problem is effectively avoided, and the quality of the sample scanned image is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119601444B_ABST
    Figure CN119601444B_ABST
Patent Text Reader

Abstract

The present application relates to a method, system, electronic device and readable medium for processing the focus height of a field of view. The method includes: obtaining the fitting focus height of the non-focus field of view; triangulating the point set formed by the focus field of view to obtain a triangulated grid; wherein each focus field of view is a point, and the point set is a set of points formed by the set of focus fields of view; interpolating based on the triangles corresponding to the non-focus field of view in the triangulated grid to obtain the fitting error of the non-focus field of view; according to the fitting focus height of the non-focus field of view and the fitting error of the non-focus field of view, the target focus height of the non-focus field of view is calculated, which solves the technical problem in the related art that low plane fitting accuracy may lead to defocus, and achieves the technical effect of improving the accuracy of the fitting focus height and effectively avoiding the defocus problem.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electron microscope field focusing, and in particular to a field focusing height processing method, system, electronic device and readable medium. Background Art

[0002] Pathological slice scanning is to take microscopic photos of each field of view. Due to the limited field of view of the electron microscope, each slice is divided into many fields of view, and each field of view is photographed separately. Then, the pictures of each field of view are stitched together to obtain a scanned image of the entire slice. When taking pictures of each field of view, it is necessary to focus. Since there are many fields of view, it is not possible to focus on each field of view. Only a certain number of fields of view can be sampled from all the fields of view for focus to obtain the focus height. For the focus of other fields of view, the fitting method is used to obtain the fitted focus height.

[0003] Focusing based on the sampled focus field to obtain the focus height, fitting the focus height of all fields of view, how to fit, the industry currently generally uses a plane fitting algorithm. However, plane fitting assumes that the focus height of all fields of view is on the same plane, which is obviously not the case. Due to the influence of the stage, transmission device, glass slide and sample surface shape, the focus heights of different fields of view are not on the same plane. Low-magnification electron microscopes have a large depth of focus, so the impact is relatively small. For high-magnification electron microscopes, the depth of focus is small and the impact is large, resulting in defocus, and the sample cannot be photographed or cannot be photographed clearly.

[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0005] The embodiments of the present application provide a method, system, electronic device and readable medium for processing field of view focus height, so as to at least solve the technical problem in the related art that low plane fitting accuracy may cause defocus.

[0006] According to one aspect of an embodiment of the present application, a method for processing a field of view focus height is provided, including: obtaining a fitted focus height of a non-focus field of view; triangulating a point set formed by the focused field of view to obtain a triangulated grid; wherein each of the focused fields of view is regarded as a point, and the point set is a set of points formed by a set of the focused fields of view; interpolating triangles corresponding to the non-focus field of view in the triangulated grid to obtain a fitting error of the non-focus field of view; and calculating a target focus height of the non-focus field of view based on the fitted focus height of the non-focus field of view and the fitting error of the non-focus field of view.

[0007] Optionally, interpolation is performed based on the triangle corresponding to the unfocused field of view in the triangulation grid to obtain the fitting error of the unfocused field of view, including: determining the triangle corresponding to the unfocused field of view in the triangulation grid; determining the plane expression of the triangle; obtaining the position coordinates of the unfocused field of view, inputting the position coordinates of the unfocused field of view into the plane expression of the triangle, and calculating the fitting error of the unfocused field of view.

[0008] Optionally, determining the triangle corresponding to the out-of-focus field of view in the triangulation grid includes: searching for the triangle in the triangulation grid where the out-of-focus field of view is located; if the triangle where the out-of-focus field of view is located is in the triangulation grid, determining the triangle where the out-of-focus field of view is located as the triangle corresponding to the out-of-focus field of view in the triangulation grid; if the triangle where the out-of-focus field of view is located is not in the triangulation grid, calculating the Euclidean distance between the out-of-focus field of view and the center points of all triangles in the triangulation grid, and determining the triangle with the shortest Euclidean distance as the triangle corresponding to the out-of-focus field of view in the triangulation grid.

[0009] Optionally, determining the plane expression of the triangle includes: obtaining the position coordinates and the plane equation expression of the three points of the triangle; wherein the position coordinates of each point are represented by the position coordinates of the focused field of view and the fitting error of the focused field of view; and calculating the plane expression of the triangle according to the position coordinates and the plane equation expression of the three points of the triangle.

[0010] Optionally, the method also includes: obtaining a fitted focus height and an actual focus height of the focus field, and taking the actual focus height of the focus field as a target focus height of the focus field; and calculating a fitting error of the focus field based on the fitted focus height and the actual focus height of the focus field.

[0011] Optionally, the method also includes: establishing an overall wedge expression, and converting the overall wedge expression into a least squares matrix; wherein the overall wedge expression is represented by coefficients and position coordinates of the focused field of view; obtaining the position coordinates of the focused field of view and the actual focus height of the focused field of view, and inputting the position coordinates of the focused field of view and the actual focus height of the focused field of view into the least squares matrix for matrix solution to obtain the coefficients of the overall wedge expression; substituting the coefficients of the overall wedge expression into the overall wedge expression to obtain a target overall wedge expression; wherein the target overall wedge expression is used to calculate the fitted focus height of the focused field of view and / or the unfocused field of view.

[0012] Optionally, the method further includes: inputting the position coordinates of the in-focus field of view into the target overall wedge expression to obtain a fitted focus height of the in-focus field of view; and / or inputting the position coordinates of the out-of-focus field of view into the target overall wedge expression to obtain a fitted focus height of the out-of-focus field of view.

[0013] According to another aspect of an embodiment of the present application, a field of view focus height processing system is provided, including: an acquisition module, used to obtain a fitted focus height of a non-focus field of view; a triangulation module, used to triangulate a point set consisting of an in-focus field of view to obtain a triangulated grid; wherein each of the in-focus fields of view is regarded as a point, and the point set is a set of points consisting of a set of in-focus fields of view; an interpolation module, used to interpolate triangles corresponding to the non-focus field of view in the triangulation grid to obtain a fitting error of the non-focus field of view; and a fitting error module, used to calculate a target focus height of the non-focus field of view based on the fitted focus height of the non-focus field of view and the fitting error of the non-focus field of view.

[0014] According to another aspect of an embodiment of the present application, an electronic device is provided, including: a processor, and a memory storing a program, wherein the program includes instructions, and when the instructions are executed by the processor, the processor executes the method described above.

[0015] According to another aspect of an embodiment of the present application, a non-transitory machine-readable medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method described above.

[0016] In an embodiment of the present application, a fitted focus height of the non-focused field of view is obtained; a point set consisting of the focused field of view is triangulated to obtain a triangulated grid; wherein each focused field of view is taken as a point, and the point set is a set of points consisting of a set of focused fields of view; interpolation is performed based on the triangles corresponding to the non-focused field of view in the triangulated grid to obtain a fitting error of the non-focused field of view; based on the fitted focus height of the non-focused field of view and the fitting error of the non-focused field of view, a target focus height of the non-focused field of view is calculated, thereby solving the technical problem in the related art that low plane fitting accuracy may lead to defocus, and achieving the technical effect of improving the accuracy of the fitted focus height and effectively avoiding the defocus problem. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can be obtained based on these drawings without creative work.

[0018] Figure 1 A flow chart of a method for processing field of view focus height provided in an embodiment of the present application;

[0019] Figure 2 A schematic diagram of triangulation provided for an embodiment of the present application;

[0020] Figure 3 A schematic diagram of the triangulation results of 9 regular dotted points provided in the embodiment of the present application;

[0021] Figure 4 A schematic diagram of a heat map of all field of view fitting errors of the plane fitting ROI provided in this application;

[0022] Figure 5 A schematic diagram of a heat map of all field of view fitting errors of ROI provided in an embodiment of the present application;

[0023] Figure 6 A schematic diagram of 12 irregular dot triangulation results provided in an embodiment of the present application;

[0024] Figure 7 A schematic diagram of a field of view focus height processing system provided in an embodiment of the present application;

[0025] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0026] The embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present application are shown in the accompanying drawings, it should be understood that the embodiments of the present application can be implemented in various forms and should not be interpreted as being limited to the embodiments described herein. Instead, these embodiments are provided to provide a more thorough and complete understanding of the embodiments of the present application. It should be understood that the drawings and embodiments of the present application are only for exemplary purposes and are not intended to limit the scope of protection of the present application.

[0027] Optionally, focusing is performed based on the sampled focus field to obtain a focus height, and the focus heights of all fields of view are fitted. The specific implementation process of using a plane fitting algorithm is as follows:

[0028] (1) Expression conversion of plane equations.

[0029] The general expression for the plane equation is:

[0030]

[0031] In the above formula , transform it into the following form:

[0032]

[0033] make , , , then it is transformed into:

[0034]

[0035] (2) Least squares matrix solution.

[0036] The least squares matrix form corresponding to the above converted expression is:

[0037]

[0038] In the above formula, is the number of fields of view in focus, , is the position coordinate of the focus field, The focus height obtained by focusing on the field of view is based on The focusing results of the focused fields of view are obtained, and the focus planes of all the fields of view are fitted.

[0039] The result of the matrix solution is:

[0040]

[0041] The above formula can be calculated to get , that is The coefficients of the expression through which the positions of all fields of view are input and the focus fitting heights of all fields of view are obtained.

[0042] According to one aspect of an embodiment of the present application, a method for processing field of view focus height is provided. Figure 1 A flowchart of a method for processing the field of view focus height provided in an embodiment of the present application, such as Figure 1 As shown, the method comprises the following steps:

[0043] Step S102, obtaining a fitted focus height of a non-focus field of view;

[0044] Step S104, triangulating the point set formed by the focused field of view to obtain a triangulated grid; wherein each focused field of view is regarded as a point, and the point set is a set of points formed by the set of focused fields of view;

[0045] Step S106, interpolating the triangles corresponding to the out-of-focus field of view in the triangulation grid to obtain a fitting error of the out-of-focus field of view;

[0046] Step S108, calculating a target focus height of the non-focus field of view according to the fitted focus height of the non-focus field of view and the fitting error of the non-focus field of view.

[0047] In an embodiment of the present application, a fitted focus height of the non-focused field of view is obtained; a point set consisting of the focused field of view is triangulated to obtain a triangulated grid; wherein each focused field of view is taken as a point, and the point set is a set of points consisting of a set of focused fields of view; interpolation is performed based on the triangles corresponding to the non-focused field of view in the triangulated grid to obtain a fitting error of the non-focused field of view; based on the fitted focus height of the non-focused field of view and the fitting error of the non-focused field of view, a target focus height of the non-focused field of view is calculated, thereby solving the technical problem in the related art that low plane fitting accuracy may lead to defocus, and achieving the technical effect of improving the accuracy of the fitted focus height and effectively avoiding the defocus problem.

[0048] Figure 2 A schematic diagram of triangulation provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, triangulation is to subdivide a plane into triangles through a point set, and four triangles are obtained by triangulation of five points. Optionally, the point set is subjected to Delaunay triangulation. The minimum angle of the triangle formed by Delaunay triangulation is the largest and is closest to the regularized triangulation. Delaunay triangulation is obtained using the Bowyer-Watson algorithm. The basic steps of the Watson-Watson algorithm include: constructing a super triangle containing all scattered points and putting them into a triangle list; inserting the scattered points in the point set in sequence, finding the triangle whose circumscribed circle contains the inserted point in the triangle list (called the affected triangle of the point), deleting the common edges of the affected triangle, connecting the inserted point with all the vertices of the affected triangle, and completing the insertion of a point in the Delaunay triangle list; optimizing the newly formed local triangle according to the optimization criteria, and putting the formed triangle into the Delaunay triangle list until all scattered points are inserted.

[0049] As an optional embodiment, interpolation is performed based on the triangle corresponding to the out-of-focus field of view in the triangulation grid to obtain the fitting error of the out-of-focus field of view, including: determining the triangle corresponding to the out-of-focus field of view in the triangulation grid; determining the plane expression of the triangle; obtaining the position coordinates of the out-of-focus field of view, inputting the position coordinates of the out-of-focus field of view into the plane expression of the triangle, and calculating the fitting error of the out-of-focus field of view.

[0050] Optionally, by Determine the plane, input the position coordinates of the non-focus field of view j, and get the fitting error of the non-focus field of view. Among them, the plane expression of the triangle is as follows:

[0051]

[0052] Furthermore, the fitting errors of all non-focus fields of view are calculated.

[0053] As an optional embodiment, determining the triangle corresponding to the out-of-focus field of view in the triangulation grid includes: searching for the triangle where the out-of-focus field of view is located in the triangulation grid; if the triangle where the out-of-focus field of view is located is in the triangulation grid, determining the triangle where the out-of-focus field of view is located as the triangle corresponding to the out-of-focus field of view in the triangulation grid; if the triangle where the out-of-focus field of view is located is not in the triangulation grid, calculating the Euclidean distance between the out-of-focus field of view and the center points of all triangles in the triangulation grid, and determining the triangle with the shortest Euclidean distance as the triangle corresponding to the out-of-focus field of view in the triangulation grid.

[0054] Optionally, for each non-focus field of view, search the triangle where it is located, denoted as , indicating the field of view If it is not in any triangle, calculate the closest triangle. The closest means the shortest Euclidean distance from the field of view to the center of the triangle. Calculate all triangles to find the closest triangle, as shown in the following formula. The triangle or the closest triangle is recorded as :

[0055]

[0056] If the out-of-focus field of view is not within a certain triangle, it is assigned to the triangle closest to it. For the The closest triangle of the out-of-focus field of view, For the Out-of-focus field of view, For the The center of the triangle, for arrive The second-order normal form of is the Euclidean distance.

[0057] As an optional embodiment, determining the plane expression of a triangle includes: obtaining the position coordinates and the plane equation expression of the three points of the triangle; wherein the position coordinates of each point are represented by the position coordinates of the focused field of view and the fitting error of the focused field of view; and calculating the plane expression of the triangle based on the position coordinates and the plane equation expression of the three points of the triangle.

[0058] Optionally, set The coordinates of the three points are , the plane equation is ,but:

[0059]

[0060] in, is composed of the focused field of view, each vertex is the position of the focus field, is the fitting error, , , They are the real focus height and the fitted focus height respectively.

[0061] Focus height for all fields of view:

[0062]

[0063] in, , Respectively represent Focus field and out-of-focus field of view.

[0064] As an optional embodiment, the above method also includes: obtaining a fitted focus height and an actual focus height of the focus field of view, and using the actual focus height of the focus field of view as the target focus height of the focus field of view; and calculating a fitting error of the focus field of view based on the fitted focus height and the actual focus height of the focus field of view.

[0065] Optionally, calculate the fitting error of the focus height of the focus field:

[0066]

[0067] in, is the number of focus fields, , , They respectively represent the fitting error of the focus height of the focus field, the actual focus height of the focus field (obtained through the focusing process) and the fitted focus height of the focus field.

[0068] As an optional embodiment, the method further includes: establishing an overall wedge expression, converting the overall wedge expression into a least squares matrix; wherein the overall wedge expression is represented by coefficients and the position coordinates of the focused field of view; obtaining the position coordinates of the focused field of view and the actual focus height of the focused field of view, inputting the position coordinates of the focused field of view and the actual focus height of the focused field of view into the least squares matrix for matrix solution, and obtaining the coefficients of the overall wedge expression; substituting the coefficients of the overall wedge expression into the overall wedge expression to obtain the target overall wedge expression; wherein the target overall wedge expression is used to calculate the fitted focus height of the focused field of view and / or the non-focused field of view. Further, the position coordinates of the focused field of view are input into the target overall wedge expression to obtain the fitted focus height of the focused field of view; and / or, the position coordinates of the non-focused field of view are input into the target overall wedge expression to obtain the fitted focus height of the non-focused field of view.

[0069] The overall wedge shape fits the overall tilt of the stage and the slide. The triangular plane interpolation obtained based on triangulation is the local surface shape outside the overall tilt. Due to the small number of focused fields of view, it is not enough to support surface fitting. Interpolation is performed on the triangular planes within the triangular mesh and the extended planes outside the mesh to approximate the actual surface shape.

[0070] Alternatively, the expression for the overall wedge shape is:

[0071]

[0072] The least squares matrix form corresponding to the above converted expression is:

[0073]

[0074] In the above formula, is the number of fields of view in focus, , is the position coordinate of the focus field, The focus height obtained by focusing on the field of view is based on The focusing results of the focused field of view are fitted to the overall wedge.

[0075] The result of the matrix solution is:

[0076]

[0077] The above formula can be calculated to get , that is The coefficients of the expression through which the focus fit height of all focus fields is obtained by inputting the position of the focus field.

[0078] Figure 3 A schematic diagram of the triangulation results of 9 regular dotted points provided in the embodiment of the present application, such as Figure 3 As shown, a sample with 9 regular dots (dotting means specifying the focus field from all fields of view) was used for verification. There are 104 regions of interest (ROI) fields of view. If plane fitting is used, the average fitting error of the ROI field of view is 1072.54 grating ruler units. If the field of view focus height processing method proposed in the embodiment of the present application is used, the average fitting error of the ROI field of view is 556.65 grating ruler units, and the error is reduced by 48%.

[0079] Figure 4 This is a schematic diagram of the heat map of all field of view fitting errors of the plane fitting ROI provided in this application. Figure 5 A schematic diagram of a heat map of all ROI field of view fitting errors provided in an embodiment of the present application, such as Figure 4 and Figure 5 As shown, the corresponding focused field of view or unfocused field of view is located by the horizontal and vertical coordinates, and each small box is regarded as a field of view. The color depth of the small box represents the size of the field of view fitting error. For example, the darker the color, the smaller the corresponding viewing angle fitting error, and the lighter the color, the larger the corresponding viewing angle fitting error. Comparative analysis shows that the field of view focus height processing method proposed in the embodiment of the present application has a smaller field of view fitting error than using plane fitting.

[0080] Figure 6 Schematic diagram of 12 irregular dot triangulation results provided in the embodiment of the present application, such as Figure 6 As shown, the field of view focus height processing method proposed in the embodiment of the present application is applicable to all fields of view with regular and irregular dots. The more points there are, the higher the fitting accuracy.

[0081] Verification was conducted on 100 groups of samples, including different numbers of dotted points. The more dotted points there are, the higher the algorithm accuracy. The more dotted points there are, the less improvement there is in plane fitting. However, for the embodiment of the present application, the more triangular planes are subdivided, the smaller the interpolation range is, and the higher the interpolation accuracy is within a small range. That is, the embodiment of the present application is compared with plane fitting, and the average fitting error reduction percentage of all fields of view is higher, as shown in Table 1.

[0082] Table 1 Verification results of different number of points

[0083]

[0084] It should be noted that the embodiment of the present application has the following advantages compared with the plane fitting algorithm in the prior art:

[0085] (1) High accuracy. The focus heights of different fields of view are not on the same plane. The number of focus fields is small, and the algorithm based on surface fitting is not supported. The interpolation algorithm of triangle patches in the triangular mesh is an algorithm that approximates the real focus surface under the condition of a limited number of focus fields.

[0086] (2) Good adaptability. Regardless of the number of dots or whether the dots are regular, the embodiment of the present application is applicable, which is a universal full-field focal plane fitting technical solution.

[0087] (3) Good scalability. The more points there are, the higher the algorithm accuracy is. The more points there are, the less improvement there is in plane fitting. However, for the present invention, the more triangular planes are subdivided, the smaller the interpolation range is, and the higher the interpolation accuracy is within a small range.

[0088] According to another aspect of an embodiment of the present application, a field of view focus height processing system is provided. Figure 7 A schematic diagram of a field of view focus height processing system provided in an embodiment of the present application, such as Figure 7 As shown, the field of view focus height processing system includes: an acquisition module 702, a triangulation module 704, an interpolation module 706 and a fitting error module 708. The field of view focus height processing system is described in detail below.

[0089] An acquisition module 702 is used to acquire a fitted focus height of a non-focus field of view;

[0090] A triangulation module 704 is used to triangulate the point set formed by the focused field of view to obtain a triangulation grid; wherein each focused field of view is regarded as a point, and the point set is a set of points formed by the set of focused fields of view;

[0091] An interpolation module 706 is used to interpolate based on the triangles corresponding to the out-of-focus field of view in the triangulation grid to obtain a fitting error of the out-of-focus field of view;

[0092] The fitting error module 708 is used to calculate the target focus height of the non-focus field of view according to the fitted focus height of the non-focus field of view and the fitting error of the non-focus field of view.

[0093] It should be noted here that the above-mentioned acquisition module 702, triangulation module 704, interpolation module 706 and fitting error module 708 correspond to steps S102 to S108 in the method embodiment, and the examples and application scenarios implemented by the above-mentioned modules are the same as those of the corresponding steps, but are not limited to the contents disclosed in the above-mentioned method embodiment.

[0094] In an embodiment of the present application, the field of view focus height processing system can obtain the fitted focus height of the non-focus field of view; triangulate the point set consisting of the focused field of view to obtain a triangulated grid; wherein each focused field of view is regarded as a point, and the point set is a set of points consisting of the set of focused fields of view; interpolation is performed based on the triangles corresponding to the non-focus field of view in the triangulated grid to obtain the fitting error of the non-focus field of view; according to the fitting focus height of the non-focus field of view and the fitting error of the non-focus field of view, the target focus height of the non-focus field of view is calculated, thereby solving the technical problem in the related art that low plane fitting accuracy may lead to defocus, and achieving the technical effect of improving the accuracy of the fitted focus height and effectively avoiding the defocus problem.

[0095] According to another aspect of an embodiment of the present application, an electronic device is provided, including: a processor, and a memory storing a program, wherein the program includes instructions, and when the instructions are executed by the processor, the processor executes the method of the embodiment of the present application.

[0096] According to another aspect of an embodiment of the present application, a non-transitory machine-readable medium storing computer instructions is provided, where the computer instructions are used to enable a computer to execute the method of the embodiment of the present application.

[0097] The embodiment of the present application also provides a computer program product, including a computer program, wherein the computer program, when executed by a processor of a computer, is used to cause the computer to execute the method of the embodiment of the present application.

[0098] refer to Figure 8 , the structural block diagram of the electronic device that can be used as the server or client of the embodiment of the present application will now be described, which is an example of the hardware device that can be applied to various aspects of the present application. The electronic device is intended to represent various forms of digital electronic computer equipment, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices and other similar computing devices. The components shown herein, their connections and relationships, and their functions are only examples, and are not intended to limit the implementation of the present application described and / or required herein.

[0099] like Figure 8 As shown, the electronic device includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 to a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0100] Multiple components in the electronic device are connected to the I / O interface 805, including: an input unit 806, an output unit 807, a storage unit 808, and a communication unit 809. The input unit 806 can be any type of device that can input information to the electronic device, and the input unit 806 can receive input digital or character information, and generate key signal input related to user settings and / or function control of the electronic device. The output unit 807 can be any type of device that can present information, and can include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 808 can include but is not limited to a disk, an optical disk. The communication unit 809 allows the electronic device to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and can include but is not limited to a modem, a network card, an infrared communication device, and a wireless communication transceiver, such as a Bluetooth device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.

[0101] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a CPU, a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing units, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above. For example, in some embodiments, the method embodiments of the present application may be implemented as a computer program, which is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on an electronic device via a ROM 802 and / or a communication unit 809. In some embodiments, the computing unit 801 may be configured to perform the above method in any other appropriate manner (e.g., by means of firmware).

[0102] The computer program for implementing the method of the embodiment of the present application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.

[0103] In the context of the embodiments of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or apparatus. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable signal medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared systems, devices, or equipment, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0104] It should be noted that the term "including" and its variations used in the embodiments of the present application are open inclusions, that is, "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments". The modifications of "one" and "multiple" mentioned in the embodiments of the present application are illustrative and not restrictive. Those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0105] The various steps described in the method implementation methods provided in the embodiments of the present application can be performed in different orders and / or in parallel. In addition, the method implementation methods may include additional steps and / or omit the steps shown. The scope of protection of the present application is not limited in this respect.

[0106] The term "embodiment" in this specification refers to specific features, structures or characteristics described in conjunction with the embodiment that can be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. The various embodiments in this specification are described in a related manner, and the same or similar parts between the various embodiments refer to each other. In particular, for the device, equipment, and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts refer to the partial description of the method embodiment.

[0107] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of patent protection. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.

Claims

1. A method for processing field of view focus height, characterized in that: include: Get the fitted focus height of the non-focus field of view; Triangulate the point set formed by the focused field of view to obtain a triangulated grid; wherein each focused field of view is regarded as a point, and the point set is a set of points formed by the set of focused fields of view; Interpolating triangles corresponding to the out-of-focus field of view in the triangulation grid to obtain a fitting error of the out-of-focus field of view; Calculating a target focus height of the non-focus field of view according to a fitting focus height of the non-focus field of view and a fitting error of the non-focus field of view; The method further includes: establishing an overall wedge expression, converting the overall wedge expression into a least squares matrix; wherein the overall wedge expression is represented by coefficients and position coordinates of the focused field of view; obtaining the position coordinates of the focused field of view and the actual focus height of the focused field of view, inputting the position coordinates of the focused field of view and the actual focus height of the focused field of view into the least squares matrix for matrix solution to obtain the coefficients of the overall wedge expression; substituting the coefficients of the overall wedge expression into the overall wedge expression to obtain a target overall wedge expression; wherein the target overall wedge expression is used to calculate the fitted focus height of the focused field of view and / or the unfocused field of view.

2. The method according to claim 1, characterized in that The method of interpolating a triangle corresponding to the out-of-focus field of view in the triangulation grid to obtain a fitting error of the out-of-focus field of view includes: Determine a triangle corresponding to the out-of-focus field of view in the triangulation grid; determining a plane expression of the triangle; The position coordinates of the non-focus field of view are acquired, the position coordinates of the non-focus field of view are input into the plane expression of the triangle, and the fitting error of the non-focus field of view is calculated.

3. The method according to claim 2, characterized in that Determining a triangle corresponding to the out-of-focus field of view in the triangulation grid includes: Searching for a triangle in the triangulated grid where the out-of-focus field of view is located; If the triangle where the out-of-focus field of view is located is in the triangulation grid, determining the triangle where the out-of-focus field of view is located as the triangle corresponding to the out-of-focus field of view in the triangulation grid; If the triangle where the out-of-focus field of view is located is not in the triangulation grid, the Euclidean distance between the out-of-focus field of view and the center points of all triangles in the triangulation grid is calculated, and the triangle with the shortest Euclidean distance is determined as the triangle corresponding to the out-of-focus field of view in the triangulation grid.

4. The method according to claim 1, characterized in that Determine the plane expression of the triangle, including: Obtaining the position coordinates and plane equation expressions of the three points of the triangle; wherein the position coordinates of each point are expressed by the position coordinates of the focused field of view and the fitting error of the focused field of view; The plane expression of the triangle is calculated based on the position coordinates of the three points of the triangle and the plane equation expression.

5. The method according to claim 4, characterized in that The method further comprises: Acquire a fitted focus height and an actual focus height of the focus field, and use the actual focus height of the focus field as a target focus height of the focus field; A fitting error of the focusing field of view is calculated according to a fitting focusing height and an actual focusing height of the focusing field of view.

6. The method according to claim 1, characterized in that The method further comprises: The position coordinates of the focused field of view are input into the target overall wedge expression to obtain the fitted focus height of the focused field of view; and / or, the position coordinates of the unfocused field of view are input into the target overall wedge expression to obtain the fitted focus height of the unfocused field of view.

7. A field of view focus height processing system, characterized in that: include: An acquisition module, used for acquiring a fitted focus height of a non-focus field of view; A triangulation module, used for triangulating the point set formed by the focused field of view to obtain a triangulation grid; wherein each of the focused fields of view is regarded as a point, and the point set is a set of points formed by the set of the focused fields of view; An interpolation module, configured to interpolate the triangles corresponding to the out-of-focus field of view in the triangulation grid to obtain a fitting error of the out-of-focus field of view; A fitting error module, used for calculating a target focus height of the non-focus field of view according to a fitting focus height of the non-focus field of view and a fitting error of the non-focus field of view; The system is also used to establish an overall wedge expression and convert the overall wedge expression into a least squares matrix; wherein the overall wedge expression is represented by coefficients and position coordinates of the focused field of view; the position coordinates of the focused field of view and the actual focus height of the focused field of view are obtained, and the position coordinates of the focused field of view and the actual focus height of the focused field of view are input into the least squares matrix for matrix solution to obtain the coefficients of the overall wedge expression; the coefficients of the overall wedge expression are substituted into the overall wedge expression to obtain a target overall wedge expression; wherein the target overall wedge expression is used to calculate the fitted focus height of the focused field of view and / or the unfocused field of view.

8. An electronic device comprising: A processor and a memory storing a program, wherein the program comprises instructions, and when the instructions are executed by the processor, the processor executes the method according to any one of claims 1 to 6.

9. A non-transitory machine-readable medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method for fast focusing and photographing planar sample

    CN109085695A

  • Focal plane fitting method based on triangular domain

    CN117666109A