A high-precision real-time medical image stitching method and system

The method iteratively optimizes and aligns medical images using SURF_NCC matching and Bayesian inference to address deformation issues, enabling high-precision real-time stitching during scanning.

CN119671849BActive Publication Date: 2025-07-15上海隶创科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510180314.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-19
Publication Date
2025-07-15
Estimated Expiration
2045-02-19

AI Technical Summary

Technical Problem

The existing medical image stitching technology is computationally expensive when processing high-resolution pathological slices, resulting in low real-time diagnosis and analysis efficiency, and is unable to cope with errors caused by image deformation and lack of feature points, and cannot stitch while scanning.

Method used

The factor graph is designed using the SURF_NCC matching method, combined with Bayesian inference and nonlinear optimization, and the optimal position of the pathological slice image is calculated in real time, and the optimal position of each pathological slice image is calculated while scanning and splicing during the scanning process.

Benefits of technology

It realizes high-precision real-time medical image stitching, reduces calculation errors, improves stitching speed and image integrity, and solves the problems of bad matches and stitching while scanning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119671849B_ABST
    Figure CN119671849B_ABST
Patent Text Reader

Abstract

The present invention provides a high-precision real-time medical image stitching method and system, comprising the following steps: during the scanning process, acquiring a pathological section image to be stitched obtained by a scanner at a certain position, and performing optimization processing on the pathological section image to obtain the optimal position of the pathological section image, and stitching the pathological section images according to the optimal position; acquiring a pathological section image to be stitched obtained by the scanner moving to a new position, and repeating the optimization processing process for the pathological section image, so that stitching can be performed while scanning during the scanning process until a complete pathological section image is obtained; the beneficial effects of the present invention are: the present invention uses factor graphs, Bayesian inference, and non-linear optimization to calculate the optimal position of each pathological section image to be stitched, which can not only maintain the integrity of the image, but also perform stitching while scanning, and make the result of image stitching more accurate by correcting the stitching position of the image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image stitching, and particularly to a high-precision real-time medical image stitching method and system. Background Art

[0002] In digital pathology, in order to obtain a complete pathological section image, it is usually necessary to stitch multiple high-resolution images. These images often cover different regions of the entire section, so they must be combined into a complete image through stitching technology. However, due to the very high resolution of pathological images, usually reaching billions of pixels, this results in a very large amount of computation during the stitching process and a very slow processing speed, seriously affecting the efficiency of real-time diagnosis and analysis.

[0003] Defects and deficiencies of the prior art: 1. Highly dependent on image matching and thus unable to cope with poor matching: First, the matching algorithm is sensitive to deformation. Since pathological sections may be deformed during the production and scanning processes, the existing spatial domain puzzle methods have poor robustness to these deformations and are prone to calculation errors. Second, for samples lacking feature points, it is impossible to calculate a relatively accurate displacement distance or even generate a large offset error. 2. Unable to stitch while scanning: The digital imaging process of a whole slide requires calculating the global position of each image. This process requires waiting for all images to be scanned and the displacement deviation to be calculated before global optimization can be performed. Then, the machine cannot image during the scanning movement process, resulting in an overly slow mapping time. Summary of the Invention

[0004] In view of the above-mentioned disadvantages of the prior art, the purpose of the present invention is to provide a high-precision real-time medical image stitching method and system, which are used to solve the problems in the prior art of being highly dependent on image matching and thus unable to cope with poor matching and unable to stitch while scanning.

[0005] To achieve the above purpose and other related purposes, the present invention provides the following technical solutions:

[0006] A high-precision real-time medical image stitching method includes the following steps: scanning a pathological section using a scanner, and obtaining a pathological section image to be stitched according to the scanning result; during the scanning process, obtaining the pathological section image to be stitched obtained by the scanner scanning the pathological section at a certain position, and performing optimization processing on the pathological section image, obtaining the optimal position of the pathological section image according to the optimization processing result, and stitching the pathological section image according to the optimal position of the pathological section image.

[0007] Obtain the pathological section images to be stitched obtained by moving the scanner to a new position to scan the pathological section, and repeat the optimization process for the pathological section images. Therefore, perform iterative optimization processing on each pathological section image obtained by the scanner in sequence according to the scanning order, so that stitching can be performed while scanning until a complete pathological section image is obtained. Among them, the complete pathological section image includes several stitched pathological section images, and the content in each pathological section image contains different regions of the entire pathological section.

[0008] A high-precision real-time medical image stitching system, including: an image optimization processing module, which is used to scan a pathological section with a scanner and obtain a pathological section image to be stitched according to the scanning result; during the scanning process, obtain the pathological section image to be stitched obtained by the scanner scanning the pathological section at a certain position, and perform optimization processing on the pathological section image, obtain the optimal position of the pathological section image according to the optimization processing result, and stitch the pathological section image according to the optimal position of the pathological section image.

[0009] An iterative optimization processing module, which is used to obtain the pathological section images to be stitched obtained by moving the scanner to a new position to scan the pathological section, and repeat the optimization process for the pathological section images. Therefore, perform iterative optimization processing on each pathological section image obtained by the scanner in sequence according to the scanning order, so that stitching can be performed while scanning until a complete pathological section image is obtained. Among them, the complete pathological section image includes several stitched pathological section images, and the content in each pathological section image contains different regions of the entire pathological section.

[0010] An electronic device, including: 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, and the instructions are executed by the at least one processor so that the at least one processor can execute the high-precision real-time medical image stitching method as described above.

[0011] In an embodiment of the present invention, after obtaining the pathological section image to be stitched obtained by the scanner scanning the pathological section and before performing optimization processing on the pathological section image, it further includes: confirming whether the pathological section image to be stitched is a starting image; if so, do not perform optimization processing on the pathological section image and directly perform stitching; if not, confirm whether there is an adjacent pathological section image for the pathological section image; if so, perform optimization processing on the pathological section image; if not, set the image weight of the area without a pathological section in the corresponding direction to 0.

[0012] In one embodiment of the present invention, the optimization processing of the pathological section image and obtaining the optimal position of the pathological section image according to the optimization processing result include: determining a factor graph between the pathological section image to be spliced and its adjacent pathological section images, where the factor graph includes a relative pose factor and a prior factor, the relative pose factor includes the displacement amount, the matching intensity, and the rotation angle between the pathological section images, and the prior factor includes the initial position of each pathological section image to be spliced; establishing a Bayesian inference model according to the factor graph between the pathological section image to be spliced and its adjacent pathological section images, and successively obtaining the optimal position of the pathological section image through the Bayesian inference model and nonlinear optimization, where the Bayesian inference model includes a minimum error model.

[0013] In one embodiment of the present invention, the relative pose factor further includes the shooting position of the pathological section image, and the shooting position of the pathological section image is the actual grid position of the pathological section image to be spliced calculated by the SURF_NCC matching method. The error between the initial position and the shooting position of the pathological section image can be obtained through the factor graph, where the initial position of the pathological section image to be spliced is the ideal grid position of the preset pathological section image.

[0014] There is also an observation position between the pathological section images. The observation between the pathological section images and can represent a position factor which indicates that the position of the pathological section image is obtained by observing the pathological section image , obtaining the relative pose factor, and calculating with the position of the pathological section image . Denote as the observation position of the pathological section image .

[0015] In one embodiment of the present invention, the determining the factor graph between the pathological section image to be spliced and its adjacent pathological section images includes: using the SURF_NCC matching method to determine the displacement amount, the matching intensity, and the rotation angle between the adjacent pathological section images, where the SURF_NCC matching method combines the SURF feature extraction algorithm and the NCC matching algorithm.

[0016] In one embodiment of the present invention, the using the NCC matching algorithm to determine the matching intensity between the adjacent pathological section images includes: determining the matching intensity between the adjacent pathological section images according to the following formula:

[0017] where and are the pathological section images and the mean value of and is the overlapping area of two registered pathological section images , is the matching strength between pathological section images

[0018] In one embodiment of the present invention, obtaining the optimal position of the pathological section image by sequentially passing through the Bayesian inference model and nonlinear optimization includes: obtaining the optimal position of the pathological section image according to the following formula: ; ;

[0019] wherein is the optimal position of the pathological section image; is the initial solution of; C is the pathological section image to be spliced, A is the pathological section image adjacent to its left, B is the pathological section image adjacent to its upper side and are the matching strengths; , represents the rotation angle between image A and image C; represents the rotation angle between image B and image C; represents the observed position of image C obtained from image A; represents the observed position of image C obtained from image B; is the minimum error model; is the likelihood function, which imposes constraints on the pose of the pathological section image through the observation factor is the initial position of the pathological section image; represents the position of image A represents the position of image B

[0020] As described above, a high-precision real-time medical image stitching method and system of the present invention have the following beneficial effects:

[0021] The present invention designs a factor graph between the pathological section images to be stitched and their adjacent pathological section images through the SURF_NCC matching method, then establishes a Bayesian inference model based on the factor graph, and reduces the error between the initial position and the shooting position of the pathological section images to be stitched through the minimum error model in the Bayesian inference model, so as to obtain the optimal position of the pathological section images to be stitched. Then, the pathological section images are stitched according to the optimal position. Subsequently, the above steps are repeated for each pathological section image to be stitched obtained until a complete pathological section image is stitched. Therefore, the present invention uses factor graph, Bayesian inference and non-linear optimization to calculate the optimal position of each pathological section image to be stitched, which can not only maintain the integrity of the image, but also perform stitching while scanning. By correcting the stitching position of the image, the result of image stitching is more accurate, thus solving the problems of highly relying on image matching and being unable to cope with bad matching and unable to stitch while scanning. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 is a flowchart of a high-precision real-time medical image stitching method in the first embodiment of the present invention;

[0023] Figure 2 is a schematic diagram of a high-precision real-time medical image stitching system in the second embodiment of the present invention;

[0024] Figure 3 is a schematic diagram of an electronic device in the third embodiment of the present invention;

[0025] Figure 4 is a schematic diagram of the factor graph in the present invention;

[0026] Figure 5 is a schematic diagram of the factor graph (only including the connection strength of the observation positions in the calculation process, and the sample is of the concentrated type) in the present invention;

[0027] Figure 6 is a schematic diagram of the factor graph (only including the connection strength of the observation positions in the calculation process, and the sample is of the dispersed type) in the present invention;

[0028] Figure 7 is a schematic diagram of the factor relationship between nodes A, B and C in the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0029] The following specific examples illustrate the embodiments of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. It should be noted that, without conflict, the following embodiments and the features in the embodiments can be combined with each other.

[0030] The first embodiment of the present invention relates to a high-precision real-time medical image stitching method. It should be noted that the present invention only targets the area containing the sample, that is, the area containing the pathological section. The process is as follows: Figure 1 As shown below:

[0031] Step 101: Use a scanner to scan the pathological section, and obtain the pathological section image to be stitched according to the scanning result.

[0032] Step 102: During the scanning process, obtain the pathological section image to be stitched obtained by the scanner scanning the pathological section at a certain position, and determine the factor graph between this pathological section image and its adjacent pathological section images.

[0033] Specifically, after obtaining the pathological section image to be stitched obtained by the scanner scanning the pathological section, before determining the factor graph between this pathological section image and its adjacent pathological section images, it further includes: confirming whether the pathological section image to be stitched is the starting image; if so, no subsequent optimization processing is performed on this pathological section image, and it is directly stitched; if not, confirm whether there is an adjacent pathological section image for this pathological section image; if so, perform subsequent optimization processing on this pathological section image; if not, set the image weight of the area without pathological section in the corresponding direction to 0.

[0034] More specifically, in this embodiment, the pathological section image can be regarded as a node. The process of determining the factor graph between this pathological section image and its adjacent pathological section images in practical applications is as follows: Design the factor graph: The factors include: 1. Relative pose factor, the relative pose factor includes the displacement offset, matching intensity, and rotation angle between nodes, and the error between the shooting position (the actual grid position calculated by the SURF_NCC matching method) and the initial position (the preset ideal grid position); 2. Prior factor, the prior factor includes the initial position of the node. It should be noted that the SURF_NCC matching method is also used. The SURF_NCC matching method combines the SURF matching algorithm and the method of taking the negative logarithm of NCC. Through the SURF_NCC matching method, the displacement amount, matching intensity, and rotation angle between pathological section images are calculated simultaneously, and used as the relative pose factor. The NCC (Normalized Cross-Correlation) matching algorithm is an important index to measure the local similarity of two images. The calculation method is as follows: , and is the pathological section image and is the mean value of and is the overlapping area of the two registered pathological section images, , is the matching intensity between pathological section images;

[0035] There are also nodes and The observation between can represent the bit factor This factor represents The position of is obtained through the observation node , obtaining the relative pose factor, and calculating (translation and rotation) with the position of the node , denoted as is The observed position of; and each newly added node will be matched with the node on the left and the node above. Denote the node on the left as A, the node above as B, and the newly added node as C. For the specific factor relationship, please refer to Figure 7 , where and are the negative logarithms of the correlation NCC after registration calculation, denoted as ENCC, that is, the matching intensity, and are the displacement amounts obtained from the registration calculation respectively. For the specific factor graph, please refer to Figures 4 to 6 .

[0036] Step 103: Establish a Bayesian inference model based on the factor graph between the pathological section image and its adjacent pathological section images, and sequentially obtain the optimal position of the pathological section image through the Bayesian inference model and nonlinear optimization.

[0037] Specifically, the process of establishing a Bayesian inference model based on the factor graph between the pathological section image and its adjacent pathological section images and sequentially obtaining the optimal position of the pathological section image in practical applications is as follows: Establish a Bayesian optimization framework. The factor graph optimization is based on the Bayesian inference framework and is realized by incrementally calculating the posterior probability of the nodes: First, it is necessary to simplify the input. The conventional Bayesian input is the input image , and each pathological section image is used as a node . Since the scanner scans in a translational manner and the data obtained by scanning is planar data, that is, a planar image, then simplify the input node , that is , respectively correspond to their preset coordinate positions (preset ideal grid positions), is the initial rotation angle (the specific value is 0), which is used to correct some systematic errors such as camera rotation;

[0038] Bayes' formula: , in order to establish a Bayesian inference model, make be the initial position of the node (that is, the preset ideal grid position of the node); is the optimal position of the node, obtained by weighted summation of (all observation positions); is the target posterior distribution, representing the probability of the optimal node position after observations; is the likelihood function, imposing constraints on the node pose through the observation factor; is the prior distribution (error probability of the node); usually, prior pose constraints are imposed on the starting node to ensure the stability of the graph;

[0039] Set If the error probability model of the node conforms to the Gaussian distribution, then for the newly added node, the joint probability distribution of all positions can be obtained by multiplying the Gaussian errors of each position: , convert the problem of solving the maximum probability into solving the minimum error of the likelihood function; assume a new node C, with node A on its left and node B above it, and the matching strengths are and , then the established minimum error model is: ; , where is the initial solution of, is calculated through the factor graph, for details please refer to Figure 4 , in this embodiment, is Figure 4 the optimized position of the new node C in, that is to say, the optimized position of the new node can be obtained through the factor graph, and then the optimized position of the new node is passed through the minimum error model in the iterative Bayesian inference model to obtain the optimal position of the new node ; represents the rotation angle between node A and node C; represents the rotation angle between node B and node C; represents the observed position of node C obtained through node A; represents the observed position of node C obtained through node B; represents the position of node A; represents the position of node B; In this way, the influences from the left and above can be controlled separately, and the optimization process will automatically balance the influences of the two factors on the final estimation. Finally, non - linear optimization is used to calculate the position of the new node in real - time, that is, the optimal position Y of the pathological section image. Among them, the non - linear optimization will use the gtsam library in C++ for this purpose. This is a dedicated optimization tool, which is solved through sparse matrices in mathematics, and this non - linear optimization is a mature mathematical calculation method.

[0040] Step 104, splice the pathological section image according to the optimal position of the pathological section image.

[0041] Step 105: Obtain the pathological section image to be stitched obtained by the scanner moving to a new position to scan the pathological section, and repeat Steps 102 to 104 for this pathological section image, that is, scan to obtain a pathological section image to be stitched, then calculate the optimal position of this pathological section image and stitch it until a complete pathological section image is obtained.

[0042] Specifically, the complete pathological section image includes several stitched pathological section images. The content in each pathological section image contains different regions of the entire pathological section. And the complete pathological section image can be considered as a grid image composed of several images. Each small grid in this grid image is a pathological section image. The more important technical point in the present invention is to calculate the specific stitching position of each pathological section image to be stitched in the final grid image.

[0043] Furthermore, the above process can specifically be: The first step: Use a scanner to scan the pathological section, and the following steps are all carried out during the scanning process; The second step: First, determine whether node C is the starting node. The starting node skips optimization, and then determine whether there are adjacent nodes A and B; if not, set the node weight in the corresponding direction to 0; if so, design a factor graph through the matching relationship, that is, calculate the factors between the new node and the adjacent nodes through the SURF_NCC matching method. These factors include: the preset grid position, the actual position of the scanning camera (obtained by calculating the displacement through the SURF registration method), the displacement amount, the matching intensity, and the rotation angle; The third step: Establish a Bayesian inference model through the factor graph in the second step, simplify The spatial model is three-dimensional , and construct a minimum error model: ; ; Obtain the optimal position through the minimum error: that is ; The fourth step: Optimize and infer the position of the new image through the Bayesian inference model in the third step and paste the pathological section image on the canvas; The fifth step: The camera of the scanner moves to a new position to take a picture, and repeat the second step to the third step, that is, scan one position, infer the accurate position of the new image and paste the pathological section image on the new position.

[0044] The second embodiment of the present invention relates to a high-precision real-time medical image stitching system. Please refer to Figure 2 , including:

[0045] An image optimization processing module is used to scan a pathological section with a scanner and obtain a pathological section image to be stitched according to the scanning result. During the scanning process, the pathological section image to be stitched obtained by the scanner scanning the pathological section at a certain position is acquired, and the pathological section image is optimized. According to the optimization result, the best position of the pathological section image is obtained, and the pathological section image is stitched according to the best position of the pathological section image.

[0046] An iterative optimization processing module is used to obtain the pathological section image to be stitched obtained by the scanner moving to a new position to scan the pathological section, and repeat the optimization process for the pathological section image. Therefore, the iterative optimization process is performed on each pathological section image scanned by the scanner in sequence according to the scanning order, so that stitching can be performed while scanning until a complete pathological section image is obtained. Among them, the complete pathological section image includes several stitched pathological section images, and the content of each pathological section image contains different regions of the entire pathological section.

[0047] It is not difficult to find that this embodiment is a system embodiment corresponding to the first embodiment, and this embodiment can be implemented in cooperation with the first embodiment. The relevant technical details mentioned in the first embodiment are still valid in this embodiment. To avoid repetition, they are not elaborated here. Correspondingly, the relevant technical details mentioned in this embodiment can also be applied to the first embodiment.

[0048] It is worth mentioning that each module involved in this embodiment is a logical module. In practical applications, a logical unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, to highlight the innovative part of the present invention, units that are not closely related to solving the technical problems proposed by the present invention are not introduced in this embodiment, but this does not mean that there are no other units in this embodiment.

[0049] The third embodiment of the present invention relates to an electronic device. Please refer to Figure 3 , including:

[0050] 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, and the instructions are executed by the at least one processor to enable the at least one processor to execute the high-precision real-time medical image stitching method as described above.

[0051] Among them, the memory and the processor are connected in a bus manner. The bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and memories together. The bus may also connect various other circuits together, such as peripheral devices, voltage regulators, and power management circuits, etc., which are well known in the art, and thus will not be further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver may be an element or multiple elements, such as multiple receivers and transmitters, and provides a unit for communicating with various other devices on the transmission medium. The data processed by the processor is transmitted on the wireless medium through the antenna. Further, the antenna also receives data and transmits the data to the processor.

[0052] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interface, voltage regulation, power management, and other control functions. The memory can be used to store data used by the processor when executing operations.

[0053] The fourth embodiment of the present invention relates to a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the method embodiments described above are implemented.

[0054] That is, those skilled in the art can understand that all or part of the steps in implementing the methods of the above embodiments can be completed by instructing relevant hardware through a program. This program is stored in a storage medium and includes several instructions to enable a device (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods of the various embodiments of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.

[0055] In summary, the present invention designs a reasonable factor graph to describe the relationship between adjacent pathological slice images of a sample area, designs a Bayesian inference model, and uses two constraint conditions of the weighting method to infer the positions of the pathological slice images to be spliced and the surrounding pathological slice images. Therefore, the present invention corrects the positions of each pathological slice image to be spliced through the factor graph and the Bayesian inference model, and finally splices all the images into a complete digital image to achieve the purpose of real-time splicing of large-scale images to generate digital pathological slices, so that real-time scanning and splicing can be performed. Even for poor matches, their positions can be optimized, thus solving the problems of highly relying on image matching and being unable to handle poor matches and unable to perform scanning and splicing simultaneously.

[0056] The above embodiments are only illustrative of the principles and effects of the present invention and are not intended to limit the present invention. All equivalent modifications or changes made by those of ordinary skill in the art without departing from the spirit and technical ideas disclosed by the present invention shall still be covered by the claims of the present invention.

Claims

1. A high-precision real-time medical image stitching method, characterized in that Including the following steps: Use a scanner to scan a pathological section, and obtain a pathological section image to be stitched according to the scanning result; During the scanning process, obtain the pathological section image to be stitched obtained by the scanner scanning the pathological section at a certain position, and perform optimization processing on the pathological section image. According to the optimization processing result, obtain the optimal position of the pathological section image, and stitch the pathological section image according to the optimal position of the pathological section image. Among them, the optimization processing process includes: determining the factor graph between the pathological section image to be stitched and its adjacent pathological section images; establishing a Bayesian inference model according to the factor graph between the pathological section image to be stitched and its adjacent pathological section images, and sequentially obtaining the optimal position of the pathological section image through the Bayesian inference model and nonlinear optimization. The Bayesian inference model includes a minimum error model; Obtain the pathological section image to be stitched obtained by the scanner moving to a new position to scan the pathological section, and repeat the optimization processing process for the pathological section image. Therefore, perform iterative optimization processing on each pathological section image scanned by the scanner in sequence according to the scanning order, so as to perform stitching while scanning during the scanning process until a complete pathological section image is obtained. Among them, the complete pathological section image includes several stitched pathological section images, and the content in each pathological section image includes different regions of the entire pathological section.

2. A high-precision real-time medical image stitching method according to claim 1, characterized in that: After obtaining the pathological section image to be stitched obtained by the scanner scanning the pathological section, before performing optimization processing on the pathological section image, it further includes: Confirm whether the pathological section image to be stitched is the starting image; If so, do not perform optimization processing on the pathological section image and directly perform stitching. If not, confirm whether there is an adjacent pathological section image for the pathological section image. If so, perform optimization processing on the pathological section image. If not, set the image weight of the area without pathological section in the corresponding direction to 0.

3. A high-precision real-time medical image stitching method according to claim 1, characterized in that: The factor graph includes a relative pose factor and a prior factor. The relative pose factor includes the displacement amount, matching intensity, and rotation angle between pathological section images. The prior factor includes the initial position of each pathological section image to be stitched.

4. A high-precision real-time medical image stitching method according to claim 3, characterized in that: The relative pose factor further includes the shooting position of the pathological section image. The shooting position of the pathological section image is the actual grid position of the pathological section image to be stitched calculated by the SURF_NCC matching method. The SURF_NCC matching method combines the SURF feature extraction algorithm and the NCC matching algorithm. Through the factor graph, the error between the initial position and the shooting position of the pathological section image can be obtained. Among them, the initial position of the pathological section image to be stitched is the ideal grid position of the pathological section image preset; There are also observation positions between the pathological section images, and the pathological section images and The observation representation position factor between them , and the factor represents the position of the pathological section image By observing the pathological section image , a relative pose factor is obtained, and it is calculated with the position of the pathological section image . Denote as the observation position of the pathological section image .

5. A high-precision real-time medical image stitching method according to claim 4, characterized in that: Determining the factor graph between the pathological section image to be stitched and its adjacent pathological section images includes: Use the SURF_NCC matching method to determine the displacement amount, matching intensity, and rotation angle between adjacent pathological section images.

6. A high-precision real-time medical image stitching method according to claim 5, characterized in that: Determine the matching intensity between adjacent pathological section images using the NCC matching algorithm, including: Determine the matching intensity between adjacent pathological section images according to the following formula: ; Among them, and are the means of the pathological section images and respectively, and is the overlapping area of the two registered pathological section images, , is the matching intensity between the pathological section images.

7. A high-precision real-time medical image stitching method according to claim 4, characterized in that: The step of obtaining the optimal position of the pathological section image through the Bayesian inference model and non-linear optimization in sequence includes: Obtain the optimal position of the pathological section image according to the following formula: ; ; Among them, is the optimal position of the pathological section image; is the initial solution; C is the pathological section image to be stitched, A is the adjacent pathological section image on its left, B is the adjacent pathological section image above it, and are the matching intensities; represents the rotation angle between image A and image C; represents the rotation angle between image B and image C; represents the observed position of image C obtained from image A; represents the observed position of image C obtained from image B; is the minimum error model; is the likelihood function, which imposes constraints on the pose of the pathological section image through the observation factor, is the initial position of the pathological section image; represents the position of image A, represents the position of image B.

8. A high-precision real-time medical image stitching system, characterized in that: Including: An image optimization processing module, configured to scan a pathological section using a scanner, and obtain a pathological section image to be stitched according to the scanning result; During the scanning process, obtain the pathological section image to be stitched obtained by the scanner scanning the pathological section at a certain position, and perform optimization processing on the pathological section image. According to the optimization processing result, obtain the optimal position of the pathological section image, and stitch the pathological section image according to the optimal position of the pathological section image. Among them, the optimization processing process includes: determining a factor graph between the pathological section image to be stitched and its adjacent pathological section images; establishing a Bayesian inference model according to the factor graph between the pathological section image to be stitched and its adjacent pathological section images, and obtaining the optimal position of the pathological section image through the Bayesian inference model and non-linear optimization in sequence. The Bayesian inference model includes a minimum error model; An iterative optimization processing module, configured to obtain the pathological section image to be stitched obtained by the scanner moving to a new position to scan the pathological section, and repeat the optimization processing process for the pathological section image. Therefore, perform iterative optimization processing on each pathological section image scanned by the scanner in sequence according to the scanning order, so as to stitch while scanning during the scanning process until a complete pathological section image is obtained. Among them, the complete pathological section image includes several stitched pathological section images, and the content in each pathological section image includes different regions of the entire pathological section.

9. An electronic device, characterized in that, Including: 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, and the instructions are executed by the at least one processor so that the at least one processor can execute the high-precision real-time medical image stitching method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Multi-panorama fusion three-dimensional reconstruction method

    CN113409442A

  • Image splicing method and system based on priori knowledge and spanning tree

    CN119130790A