A method for establishing a pathological scanning focal plane based on triangulation

By combining triangulation algorithms and centroid coordinate methods, the inaccuracy of focal plane modeling in pathological scanning is solved, achieving efficient and accurate pathological scanning imaging and improving image clarity and scanning efficiency.

CN121236333BActive Publication Date: 2026-03-17上海隶创科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-01
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately establish a focal plane in pathological scans with irregular sampling point distributions, resulting in poor local imaging quality. Furthermore, traditional methods may exhibit oversmoothing in complex local structures, affecting diagnostic accuracy and efficiency.

Method used

A triangulation algorithm is used to construct a triangular mesh structure, and interpolation calculation is performed using the centroid coordinate method. The focal plane is dynamically adjusted to adapt to uneven sampling points, generating a high-quality mesh that covers edges and local details. Interpolation calculation is performed using the centroid coordinate method to ensure image sharpness.

Benefits of technology

It enables accurate modeling of the focal plane for pathological scans under irregular sampling point distribution, improving imaging quality and scanning efficiency, and ensuring that the image remains clear throughout the scanning process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121236333B_ABST
    Figure CN121236333B_ABST
Patent Text Reader

Abstract

This invention provides a method for establishing a pathological scanning focal plane based on triangulation, comprising: acquiring multiple key coordinate point data through an automatic focusing function, and obtaining a subdivided triangular mesh structure using a triangulation algorithm; performing dynamic focal plane modeling based on the acquired coordinates and triangular subdivision information; dividing the target area into a uniform mesh structure, calculating the center coordinates of each unit, and inputting them into a prediction model to obtain the corresponding output; and outputting a focusing command to the lower-level computer, thereby accurately establishing the pathological scanning focal plane. The pathological scanning focal plane establishment method based on triangulation of this invention can effectively approximate the real surface under irregular sampling point distributions, and the use of the centroid coordinate method can accurately interpolate the three-dimensional coordinates of any query location.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of pathological slide scanning technology, and more specifically, to a method for establishing a focal plane for pathological scanning based on triangulation. Background Technology

[0002] With the continuous development of medical imaging and automated control technologies, the application of traditional microscopes in pathological diagnosis is gradually being replaced by automated microscopic scanning platforms. These platforms, through the combination of digital image processing and precision mechanical control, can acquire high-resolution images of pathological tissue sections more efficiently and accurately. In fields such as tumor diagnosis, precision medicine, and drug development, histopathological images play a crucial role, and their imaging quality directly affects doctors' or researchers' judgment of diseases and the formulation of subsequent treatment strategies.

[0003] Ideally, when scanning and focusing pathological tissue sections, the plane of the slide should perfectly coincide with the focal plane of the microscope. However, due to limitations such as mechanical assembly tolerances, platform structural errors, and the flatness of the slide itself, achieving perfect parallelism is often difficult in practice. This results in inconsistent focusing effects in different areas within the same field of view, affecting image clarity and diagnostic accuracy. To ensure clear images of the slides in different scanning areas, frequent fine-tuning of the microscope objective or stage is often required, leading to reduced scanning efficiency.

[0004] In practical focusing algorithms, one of the most commonly used methods is to globally fit the slide plane using the least squares method, thereby obtaining an approximate linear plane. This method is simple to implement, computationally efficient, and can provide a relatively reasonable plane estimate overall. However, the least squares method is not robust to outliers. When there are local depressions, bubbles, or uneven tissue thickness on the slide surface, a simple linear plane cannot accurately match the true focus in all areas. As a result, the focusing effect is often acceptable in most areas, but the image quality is still significantly affected in areas with local unevenness or anomalies. In addition, because the least squares method aims to minimize errors globally, it may exhibit a certain degree of "oversmoothing" for details of complex local structures, further exacerbating the defocusing problem in some areas. Summary of the Invention

[0005] To address the shortcomings of existing technologies, the present invention aims to provide a method for establishing a focal plane for pathological scanning based on triangulation, thereby solving the problem of insufficient accuracy in fitting existing planes or simple curved surfaces. This method can effectively approximate the real surface under irregular sampling point distribution and uses the centroid coordinate method to accurately interpolate the three-dimensional coordinates of any query position.

[0006] To solve the above problems, the technical solution of the present invention is as follows:

[0007] A method for establishing a focal plane for pathological scanning based on triangulation includes the following steps:

[0008] Data from multiple key coordinate points was collected using the autofocus function, and a triangulation algorithm was used to obtain a subdivided triangular mesh structure.

[0009] Based on the collected coordinates and triangulation information, dynamic focal plane modeling is performed;

[0010] The target region is divided into a uniform grid structure, the center coordinates of each cell are calculated, and the results are input into the prediction model to obtain the corresponding output.

[0011] The focusing command is output to the lower-level machine to accurately establish the focal plane for pathological scanning.

[0012] Preferably, the step of acquiring multiple key coordinate point data through autofocus and obtaining a subdivided triangular mesh structure using a triangulation algorithm specifically includes:

[0013] Sampling point acquisition involves automatically focusing on a pathological slide to obtain a set of discrete sampling points P(x, y, z), where x and y are the two-dimensional coordinates of the sampling point on the slide plane, and z is the optimal focal plane height value determined by the automatic focusing of the microscopic system at that coordinate point.

[0014] To avoid generating invalid, elongated triangles at the boundaries, the sampling points are expanded to include the four corner points of the minimum bounding rectangle that encloses the sample contour. Add auxiliary points at (k=1,2,3,4);

[0015] Auxiliary points are calculated using Euclidean distance. The point closest to the discrete sampling point set P ,Will Optimal focus height value Directly assign to the auxiliary point height value ;

[0016] Initial triangulation: Using the x and y coordinates of the sampling points as input, the Delaunay triangulation algorithm is used to construct a two-dimensional triangular mesh to obtain the vertex index information corresponding to each triangle.

[0017] Triangular mesh subdivision involves calculating the edges or midpoints of each triangle in the initial triangular mesh, expanding these newly inserted points into the original set of sampling points, and then performing Delaunay triangulation again based on the updated set of sampling points to form a subdivided triangular mesh structure.

[0018] Preferably, the interpolation calculation uses the centroid coordinate method, specifically including:

[0019] Step 1: Obtain the query point Coordinates of the three vertices of the triangle , , ;

[0020] Step 2, Query Point The centroid coordinates satisfy the formula: Solving for the given information yields the following results. , , ;

[0021] Step 3: Use the obtained centroid coordinate coefficients and the z-values ​​of the triangle vertices to perform a weighted calculation to obtain the interpolated z-value of the query point. The formula is: .

[0022] Preferably, the step of dividing the target area into a uniform grid structure, calculating the center coordinates of each unit, and inputting them into the prediction model to obtain the corresponding output specifically includes: gridded prediction and result storage, dividing the target area into a uniform grid structure based on the platform coordinate system, defining the horizontal and vertical intervals, generating M×N regularly arranged prediction units, calculating the center coordinates of each unit, and inputting them into the prediction model to obtain the corresponding output.

[0023] Preferably, the step of outputting a focusing command to the lower-level machine to accurately establish the focal plane of the pathological scan specifically includes: after completing the focal plane height estimation of all prediction units, generating a focusing command containing the three-axis coordinates of the target position, and sending it to the motion control module of the lower-level machine through a standard communication protocol. After receiving the command, the lower-level machine drives the Z-axis module to complete the focus adjustment, thereby ensuring that the image remains clear throughout the entire scanning process.

[0024] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0025] 1. This invention uses the Delaunay triangulation method, which can flexibly divide a set of points with uneven distribution using only the x,y plane coordinates of the sampling points. No matter how the sampling points are scattered or clustered in space, the Delaunay triangulation can adaptively construct a high-quality mesh, ensuring effective coverage of edges and local detail areas.

[0026] 2. This invention uses the centroid coordinate method for interpolation. The calculation process only requires constructing and solving a system of linear equations. The algorithm is simple and efficient. At the same time, it can take into account both global and local interpolation accuracy without significantly increasing the amount of computation. Attached Figure Description

[0027] Other features, objects, and advantages of the present invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:

[0028] Figure 1 This is a flowchart of the pathological scanning focal plane establishment method based on triangulation according to the present invention;

[0029] Figure 2 This is a sample outline diagram of the present invention;

[0030] Figure 3 This is a triangulation diagram of the present invention;

[0031] Figure 4 This is a focal plane view of the present invention. Detailed Implementation

[0032] The present invention will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present invention, but do not limit the invention in any way. It should be noted that those skilled in the art can make several changes and improvements without departing from the concept of the present invention. These all fall within the protection scope of the present invention.

[0033] Specifically, this invention provides a method for establishing a pathological scanning focal plane based on triangulation, such as... Figure 1 As shown, the method includes the following steps:

[0034] S1: Collect data from multiple key coordinate points using the autofocus function, and obtain a subdivided triangular mesh structure using a triangulation algorithm;

[0035] Specifically, such as Figure 2 As shown, sampling point acquisition involves automatically focusing on the pathological slide to obtain a series of discrete sampling point sets P(x, y, z), i.e. Figure 2 The red sampling points are represented by x and y, which are the two-dimensional coordinates of the sampling points on the slice plane, and z is the optimal focal plane height value determined by the automatic focusing of the microscope system at that coordinate point.

[0036] To avoid generating invalid, elongated triangles at the boundaries, the sampling points are expanded to include the four corner points of the minimum bounding box that encloses the sample contour. Add auxiliary points at (k=1,2,3,4).

[0037] The z-values ​​of these auxiliary points are not actually measured, but determined using the nearest neighbor assignment method to ensure that their height values ​​are consistent with the actual trend of the sample, while avoiding the introduction of new curvature errors. The auxiliary points are calculated using Euclidean distance. The point closest to the discrete sampling point set P ,Will Optimal focus height value Directly assign to the auxiliary point height value .

[0038] Initial triangulation, using the x and y coordinates of the sampling points as input, employs the Delaunay triangulation algorithm to construct a two-dimensional triangular mesh, obtaining the vertex index information corresponding to each triangle, such as... Figure 3 As shown.

[0039] Triangular mesh subdivision involves calculating the edges or midpoints of each triangle in the initial triangular mesh and expanding these newly inserted points into the original sampling point set, resulting in a denser sampling point set. Based on the updated sampling point set, Delaunay triangulation is performed again to form the subdivided triangular mesh structure.

[0040] S2: Based on the collected coordinates and triangulation information, perform dynamic focal plane modeling;

[0041] Specifically, the focal plane image is as follows: Figure 4 As shown.

[0042] The interpolation calculation uses the centroid coordinate method, which includes the following steps:

[0043] Step 1: Obtain the query point Coordinates of the three vertices of the triangle , , .

[0044] Step 2, Query Point The coordinates of the centroid satisfy Formula 1, and the solution is obtained. , , .

[0045] Step 3: Finally, use the obtained centroid coordinate coefficients and the z-values ​​of the triangle vertices to perform a weighted calculation to obtain the interpolated z-value of the query point, as shown in Formula 2.

[0046] Formula 1

[0047] Formula 2

[0048] S3: Divide the target area into a uniform grid structure, calculate the center coordinates of each cell, and input them into the prediction model to obtain the corresponding output;

[0049] Specifically, the gridded prediction and result storage, based on the platform coordinate system, divides the target area into a uniform grid structure, defines the horizontal and vertical intervals S, generates M×N regularly arranged prediction units, calculates the center coordinates of each unit, and inputs them into the prediction model to obtain the corresponding output.

[0050] S4: Outputs focusing commands to the lower-level machine to accurately establish the focal plane for pathological scanning.

[0051] Specifically, after estimating the focal plane height of all predictive units, a focusing command is generated. This command contains the three-axis coordinates of the target position and is sent to the motion control module of the lower-level machine via the standard communication protocol CAN. Upon receiving the command, the lower-level machine drives the Z-axis module to complete the focus adjustment, thereby ensuring that the image remains sharp throughout the entire scanning process.

[0052] Specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art can make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. Unless otherwise specified, the embodiments and features described in this application can be arbitrarily combined with each other.

Claims

1. A method for establishing a focal plane of a pathological scan based on triangulation, characterized in that, The method comprises the following steps: A plurality of key coordinate point data are collected by an autofocus function, and a triangular mesh structure after subdivision is obtained by using a triangulation algorithm, specifically comprising: Sampling point acquisition, a series of discrete sampling point sets P(x, y, z) are automatically focused on the glass pathological section, wherein x and y are two-dimensional coordinates of the sampling points on the section plane, and z is the best focal plane height value determined by the automatic focusing of the microscopic system at the coordinate point; Outwardly expanding sampling points, in order to avoid generating invalid narrow triangles at the boundary, at the four corner points of the minimum circumscribed rectangle frame wrapping the sample profile (k=1,2,3,4) additional auxiliary points; Calculating the auxiliary point by Euclidean distance the closest point in the discrete set of sampling points P , the best focus height value of the auxiliary point is directly assigned to the height value of the auxiliary point ; Initial triangulation, taking the x and y coordinates of the sampling points as input, a two-dimensional triangular mesh is constructed by using a Delaunay triangulation algorithm to obtain the vertex index information corresponding to each triangle; Triangular mesh subdivision, for each triangle in the obtained initial triangular mesh, the edge or midpoint thereof is calculated, and these newly inserted points are expanded to the original sampling point set; based on the updated sampling point set, Delaunay triangulation is performed again to form a triangular mesh structure after subdivision; Dynamic focal plane modeling based on the collected coordinates and triangular subdivision information; The target area is divided into a uniform grid structure, the center coordinates of each unit are calculated, and input into the prediction model to obtain the corresponding output; Output the focusing instruction to the lower computer to accurately establish the pathological scanning focal plane.

2. The triangulation-based pathological scan focal plane establishment method according to claim 1, characterized in that, The interpolation calculation adopts the barycentric coordinate method, specifically comprising: Step 1, obtaining a query point coordinates of three vertices of a triangle containing the query point , , ; Step 2, query point The coordinates of the center of gravity satisfy the formula: , and the solution is obtained , , ; Step 3, using the obtained gravity center coordinate coefficient and the triangle vertex z value to do weighted calculation, and obtaining the interpolation z value of the query point, the formula is: .

3. The triangulation-based pathological scan focal plane establishment method according to claim 1, characterized in that, The step of dividing the target area into a uniform grid structure, calculating the center coordinates of each unit, and inputting into the prediction model to obtain the corresponding output, specifically comprises: grid prediction and result storage, based on the platform coordinate system, the target area is divided into a uniform grid structure, the horizontal interval and the vertical interval are defined, M×N regular arranged prediction units are generated, the center coordinates of each unit are calculated, and input into the prediction model to obtain the corresponding output.

4. The triangulation-based pathological scan focal plane establishment method according to claim 1, characterized in that, The step of outputting the focusing instruction to the lower computer to accurately establish the pathological scanning focal plane, specifically comprises: after completing the focal plane height estimation of all prediction units, a focusing instruction is generated, the focusing instruction contains the three-axis coordinates of the target position, and is sent to the motion control module of the lower computer through the standard communication protocol; after receiving the instruction, the lower computer drives the Z-axis module to complete the focal point adjustment, thereby ensuring that the image is always in a clear state during the entire scanning process.

Citation Information

Patent Citations

  • Vision-based vehicle positioning method under roadside view angle

    CN118351469A

  • Focusing curved surface fitting method based on biharmonic spline and gravity center method

    CN118691581A