Pathological image splicing method and device based on pathological section association
By employing a global optimization method based on texture flow field and multi-scale analysis, the problem of unstable incision features in pathological slide stitching in existing technologies has been solved, generating high-quality seamless panoramic pathological images and improving the robustness and accuracy of stitching.
Patent Information
- Application Number
- CN202511987217.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-26
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2045-12-26
AI Technical Summary
Existing methods for stitching together pathological slide images rely on fragile incision features, resulting in poor stability and low error tolerance. Furthermore, they fail to effectively utilize tissue microstructure information, leading to mismatches and accumulated errors, making it difficult to generate continuous and realistic panoramic images.
By calculating the texture flow field, a multi-scale image pyramid is constructed to evaluate the differences in texture distribution and frequency domain correlation. A global stitching relationship graph model is established, and the global energy function of the data fidelity term and the prior smoothing term is iteratively optimized to generate seamless panoramic pathological images.
This significantly improves the robustness and applicability of the method, reduces false matching, and ensures the continuity of the organizational structure and the seamlessness of the visual naturalness of the panoramic images.
Smart Images

Figure CN121391601A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of pathological section image splicing, in particular to a pathological image splicing method and device based on pathological section association. BACKGROUND
[0002] In pathological diagnosis and research, in order to obtain a large range of tissue morphology panoramic view, it is often necessary to splice the continuous pathological sub-section digital images with high precision. In the prior art, the image splicing method is mostly based on feature point matching or specific region pixel correlation calculation. For example, the Chinese patent with the patent number CN115619634B and the name of "pathological image splicing method and device based on pathological section association" discloses a method of screening and iteratively splicing adjacent pathological sections by calculating the "cut registration degree". The method takes the cut position of the image as the reference, defines a registration degree calculation formula with the cut pixel matrix correlation coefficient as the core, finds the adjacent image most matched with the current reference image cut in the image set to be registered, and then gradually completes the splicing. To some extent, this method converts the splicing problem into a local pixel matching problem of the cut region.
[0003] However, the above-mentioned prior art solution has obvious limitations. First, its core assumption is that the cut edges of adjacent sections can maintain complete and regular correspondence on the image. However, in the actual pathological section process, the tissue is prone to deformation, wrinkling or tearing, resulting in irregular physical cuts and incomplete or blurred cut edge information in the image, which makes the registration method relying on fixed cut regions have poor stability and low fault tolerance. Second, this method only uses the local pixel value statistics correlation of the cut, and fails to use the more biologically meaningful tissue microstructure information contained in the pathological image, such as cell arrangement direction and fiber texture direction, etc. Therefore, in the area where the tissue texture is complex and the cut features are not obvious, it is easy to cause mismatching or matching problems. Finally, its iterative splicing strategy is essentially a local greedy selection, which lacks global optimization of the overall consistency and smoothness of the splicing result, and is prone to cumulative errors, making it difficult to ensure the continuity and authenticity of the final panoramic image in histological structure. Therefore, there is an urgent need for a consistent splicing method that does not rely on fragile cut features, can utilize the intrinsic structure information of the tissue, and can perform global optimization. SUMMARY
[0004] The technical problem to be solved by the present application is that the existing image splicing method based on feature point matching or specific region pixel correlation calculation lacks practicality, and therefore the present application proposes a pathological image splicing method based on pathological section association.
[0005] In order to achieve the above-mentioned purpose, the present application adopts the following technical solution: a pathological image splicing method based on pathological section association, comprising the following steps: Step one: pathological sub-section image acquisition and preprocessing: acquire the serial pathological sub-section digital images, perform standardization preprocessing on the images, filter out interference information and extract the effective tissue area; Step two: texture flow field calculation and multi-scale analysis: calculate the texture flow field in the effective tissue area, which represents the arrangement characteristics of the tissue microstructure, construct a multi-scale image pyramid, analyze the texture flow field characteristics in different scale spaces, and generate corresponding multi-scale texture feature descriptors; Step three: adjacent relationship evaluation based on multi-scale texture correlation: based on the multi-scale texture feature descriptors, quantitatively calculate the texture distribution difference, structural consistency and frequency domain correlation between sub-sections, and obtain the adjacent relationship correlation score through the multi-scale structural similarity correlation function; Step four: global stitching model construction and iterative optimization: construct a global stitching relationship graph model with sub-sections as nodes and correlation score as edge weight, establish a global energy function containing data fidelity term and prior smoothing term, solve the optimal stitching transformation parameters using iterative optimization algorithm, and calculate the global iterative convergence criterion in the iterative process combined with the current stitching state, remaining sub-section matching potential and overall stitching progress; Step five: panoramic image generation and output: when the iteration meets the convergence condition corresponding to the convergence criterion, project all sub-section images to a unified coordinate system, fuse the overlapping areas to generate a seamless panoramic pathology image, and output and store the final image and related stitching metadata.
[0006] Preferably, in step two, the texture flow field calculation and multi-scale analysis specifically includes: An initial flow field is formed by calculating the local principal direction of each pixel point in the sub-section image based on the gradient structure tensor method; The initial flow field is regularized and filtered to smooth noise and enhance the consistency of the flow direction, obtaining the final texture flow field; The sub-section image and the corresponding texture flow field are down-sampled under the Gaussian pyramid to generate multiple image sequences and flow field sequences of different scales; at each scale, the following operations are performed: The local binary pattern histogram of the adjacent boundary region of the image at the current scale is extracted to describe the texture pattern distribution; The average gradient amplitude of the flow field at the current scale is calculated; The Fourier transform is performed on the adjacent boundary region of the image at the current scale to extract its Fourier amplitude spectrum for frequency domain structure analysis.
[0007] Preferably, in step three, the adjacent relationship evaluation based on multi-scale texture correlation specifically includes: For the two sub-slice images to be evaluated, obtain their texture feature descriptors generated in step two at each scale, including: local binary pattern histogram, average gradient amplitude, and Fourier amplitude spectrum; Calculate the average gradient amplitude absolute difference of the two images at each scale; calculate the KL divergence between the local binary pattern histograms of the two images at each scale, to measure the texture distribution difference; Calculate the mutual information between the Fourier amplitude spectra of the two images at each scale, to measure the frequency domain structural similarity; Integrate all scale calculation indicators into the multi-scale structural similarity correlation function to solve the final correlation score between the two images.
[0008] Preferably, the global stitching model construction and iterative optimization in step four specifically includes: Take all sub-slices as nodes, and initialize the edge weights of a fully connected graph model based on the correlation scores calculated in step three; Define a global energy function, which includes a data fidelity term and a priori smoothing term; the data fidelity term is obtained by weighted summation of the reprojection errors between all image pairs with determined adjacency, and the weight is the corresponding correlation degree; the priori smoothing term is used to punish the discontinuous jump of texture flow field in adjacent regions of the stitched panoramic image; Initialize the iteration state, set the current successfully stitched local region set and the remaining un-stitched sub-slice set; enter the iteration loop, and perform the following operations in each iteration: In the remaining un-stitched set, select the optimal sub-slice or matching pair for stitching alignment according to the correlation degree, and solve the local transformation parameters; Update the stitched region set and the remaining un-stitched sub-slice set; Based on all the solved transformation parameters, calculate the value of the global energy function, and fine-tune the parameters to minimize the function using optimization methods; Calculate the global iterative stitching convergence criterion under the current iteration.
[0009] Preferably, in the iteration loop of step four, the data required for calculating the global iterative stitching convergence criterion includes: The number of current stitched local region blocks, and the image states of each region block after the current iteration and the last iteration, to evaluate the stitching stability; The correlation scores between all sub-slices in the remaining un-stitched sub-slice set, to evaluate the remaining matching potential; The total pixel area of all sub-slices in the remaining un-stitched sub-slice set, and the total pixel area of all sub-slices, to evaluate the overall stitching progress.
[0010] Preferably, step four further comprises iteration termination judging logic: a preset convergence threshold and a variation threshold; After the convergence criterion is calculated in each iteration, it is judged whether the preset convergence condition is met; If the convergence condition is met, it is determined that the global stitching optimization process has converged, the iteration is terminated, and step five is entered; otherwise, the next round of iteration optimization is continued.
[0011] Preferably, in step five, the panoramic image is generated and output, and further comprises a quality verification step: After the preliminary fused panoramic image is generated, the smoothness index of the overall texture flow field thereof is calculated; detect and identify areas that may have stitching misplacement or texture discontinuity; The quality verification result is archived together with the stitching metadata, and if serious quality problems are found, an alarm is triggered and the relevant steps can be traced back to adjust parameters and recalculate.
[0012] Preferably, in step three, the multi-scale structural similarity correlation function used to calculate the correlation score between the two sub-slice images is:
[0013] Wherein: denotes the total number of scales; is the scale index; is the scale related adjustable parameters; is the absolute difference of the average gradient amplitude of the two images at scale ; is a very small positive number used to prevent the denominator from being zero; is the KL divergence between the local binary pattern histograms of the two images at scale ; is a nonlinear adjustment index; is the mutual information between the Fourier amplitude spectra of the two images at scale ; denotes the correlation score between the sub-slice images and .
[0014] Preferably, in step four, the global iteration stitching convergence criterion used to evaluate the convergence state in the first iteration is calculated as follows:
[0015] Wherein: is the current iteration number; is the number of local region blocks that have been completed stitching. and are the first region blocks after the first and the second iterations, respectively; is a structural similarity index calculation function; is a mean square error calculation function; and are a very small positive number for preventing the denominator from being zero; is a set of remaining un-stitched sub-slice indexes after the first iteration; is a correlation score between a sub-slice and is a total pixel area of all sub-slices in the set is a total pixel area of all to-be-stitched sub-slices; is a decay coefficient; is a global convergence criterion index at the first iteration.
[0016] The present application proposes another technical solution: a pathological image stitching device based on pathological slice correlation, which comprises: an image acquisition and preprocessing module: for controlling a digital scanning device to acquire a sequence of pathological sub-slice images, and completing color correction, illumination homogenization and noise filtering standardization preprocessing; a texture flow field analysis module: for calculating the texture flow field of each sub-slice image, constructing a multi-scale image pyramid, and extracting local binary pattern histogram, average gradient amplitude and Fourier amplitude spectrum texture feature descriptors at each scale; a multi-scale correlation calculation module: for receiving feature descriptors from the texture flow field analysis module, calculating the correlation score between any two sub-slice images through a multi-scale structural similarity correlation function, and forming a global correlation matrix; a global stitching optimization module: for taking the correlation matrix as input, constructing a global stitching relationship graph and an energy function, and executing an iterative optimization algorithm; in each iteration, a convergence index is calculated through a global iterative stitching convergence criterion formula, and whether to terminate the iteration is determined according to a preset logic, and an optimal stitching transformation parameter sequence is output; a panoramic image synthesis and output module: for projecting, aligning and multi-band fusing all sub-slice images according to the final transformation parameters output by the global stitching optimization module, generating a final seamless panoramic pathological image, and packing the image and related metadata to a specified location.
[0017] Technical effects and advantages of the present application: In the present application, the present application uses texture flow field as the core organization correlation feature, and combines multi-scale analysis and global optimization model. Compared with the prior art which excessively relies on fragile and easily deformed physical incision edge information, the present application calculates by using the texture flow field reflecting the inherent biological structure of the organization. The feature is more stable and has more biological significance, and the method robustness and application range are significantly improved under complex conditions such as organization deformation, wrinkle or incision defect. Secondly, by constructing a multi-scale pyramid and comprehensively calculating the correlation degree of gradient, texture distribution and frequency domain multi-dimensional features, the single problem of relying only on local pixel statistical correlation in the prior art is overcome, the adjacent relationship evaluation is more comprehensive and accurate, and the false matching is effectively reduced. In addition, by constructing a global graph model with the correlation degree as the weight and establishing an energy function containing data fidelity and texture smoothing constraints for iterative optimization, global consistency solution of the stitching transformation parameters is realized, the cumulative error can be effectively smoothed, and the continuity of the generated panoramic pathology image in the organization structure and the visual natural seamless are ensured. BRIEF DESCRIPTION OF DRAWINGS
[0018] The disclosure of the present application will be described with reference to the accompanying drawings. It should be understood that the drawings are for illustrative purposes only and are not intended to limit the scope of protection of the present application. In the drawings, the same reference numerals are used to refer to the same parts: Figure 1 The flowchart of the present application is shown. DETAILED DESCRIPTION
[0019] It is easy to understand that, according to the technical scheme of the present application, one skilled in the art can propose a plurality of structure modes and implementation modes which can be replaced with each other without changing the essential spirit of the present application. Therefore, the following specific embodiments and drawings are only exemplary descriptions of the technical scheme of the present application, and should not be regarded as the whole or as a limitation or restriction of the technical scheme of the present application.
[0020] Embodiment one: reference Figure 1 The pathological image stitching method based on pathological section correlation provided by the embodiment of the present application comprises the following steps: Step one: pathological sub-section image acquisition and pretreatment: Firstly, a series of pathological sub-section digital images overlapping with each other are obtained by a high-resolution digital scanning device; these images are usually stored in a serialized manner; after acquisition, standardization pretreatment is performed on these sub-section images to eliminate various interference and noise introduced in the scanning process.
[0021] The pretreatment process can include but is not limited to: Color correction: adjust the color balance of the image, eliminate the color difference between different sub-sections, and ensure color consistency.
[0022] Illumination uniformization: Compensate for uneven illumination that may occur during scanning, making the image brightness distribution more uniform.
[0023] Noise filtering: Use methods such as Gaussian filtering and median filtering to remove random noise in the image.
[0024] Effective tissue area extraction: Use image segmentation techniques such as threshold segmentation, region growing or deep learning segmentation models to separate the background area in the image from the effective area containing pathological tissue, and only keep the effective tissue area for subsequent processing to reduce the amount of calculation and avoid the interference of background noise.
[0025] Step two: Texture flow field calculation and multi-scale analysis: In the extracted effective tissue area, calculate the texture flow field that represents the arrangement characteristics of the microstructure of the tissue; the texture flow field can reflect important pathological information such as the arrangement direction of tissue cells and fiber direction; specifically, this step includes: Calculate the initial flow field: Use the gradient structure tensor-based method to calculate the local principal direction of each pixel point in the sub-slice image to form the initial flow field; the gradient structure tensor can capture the gradient information of the local region of the image, and its eigenvector can indicate the main direction of the texture.
[0026] Regularization filtering: Perform regularization filtering on the initial flow field to smooth noise and enhance the consistency of the flow direction, obtaining the final texture flow field; regularization filtering can use Gaussian filtering or directional smoothing filter to eliminate local irregular flow direction, making the overall flow direction more coherent.
[0027] Construct a multi-scale image pyramid: Perform Gaussian pyramid downsampling on the sub-slice image and the corresponding texture flow field to generate multiple image sequences and flow field sequences of different scales; the Gaussian pyramid generates images of different resolutions through layer-by-layer smoothing and downsampling, so as to analyze image features at different scales.
[0028] Extract multi-scale texture feature descriptors: At each scale, perform the following operations to extract multi-scale texture feature descriptors: From the image at the current scale, extract the local binary pattern histogram of its adjacent boundary region to describe the texture pattern distribution; LBP is an effective texture descriptor that can capture the microstructure of local texture; From the flow field at the current scale, calculate its average gradient amplitude. The average gradient amplitude reflects the intensity and contrast information of the texture; The Fourier transform is performed on the adjacent boundary region of the image at the current scale, and the Fourier amplitude spectrum is extracted for frequency domain structure analysis. The Fourier amplitude spectrum can reflect the energy distribution of the image in the frequency domain, thereby representing the periodicity and directionality of the texture.
[0029] Step three: adjacent relationship evaluation based on multi-scale texture correlation degree: Based on the multi-scale texture feature descriptor, the texture distribution difference, structural consistency and frequency domain correlation between the sub-slices are quantitatively calculated, and the adjacent relationship correlation degree score is obtained through the multi-scale structure similarity correlation degree function. Specifically, this step includes: Obtaining the texture feature descriptor: for the two sub-slice images to be evaluated, for example, for images and , the texture feature descriptors generated in step two at each scale are obtained, including: local binary pattern histogram , average gradient amplitude and Fourier amplitude spectrum .
[0030] Calculating the absolute difference of the average gradient amplitude: calculating the absolute difference of the average gradient amplitude of the two images at each scale .
[0031] Calculating the KL divergence: calculating the KL divergence between the local binary pattern histograms of the two images at each scale , which is used to measure the texture distribution difference; the greater the KL divergence, the greater the texture distribution difference.
[0032] Calculating mutual information: calculating the mutual information between the Fourier amplitude spectra of the two images at each scale , which is used to measure the frequency domain structure similarity; the greater the mutual information, the more similar the frequency domain structure.
[0033] Comprehensive calculation of correlation degree score: comprehensive calculation of all scales of the calculation index, and substitution into the multi-scale structure similarity correlation degree function to solve the final correlation degree score between the two images , which is represented as:
[0034] wherein: represents the total number of scales; is the scale index; is the scale related adjustable parameters, which are optimized by training data or experience setting; is the absolute difference of the average gradient amplitude of the two images at scale ; is a very small positive number used to prevent the denominator from being zero; KL divergence between the local binary pattern histograms of two images KL divergence between the local binary pattern histograms of two images nonlinear regulation exponent used to adjust the influence of KL divergence on the correlation score KL divergence between the local binary pattern histograms of two images mutual information between the Fourier amplitude spectra of two images correlation score between the sub-slice images and The function takes into account the gradient difference, texture distribution difference and frequency domain structure similarity, and through multi-scale weighting, the correlation score can more accurately reflect the real adjacency relationship and matching potential between sub-slices.
[0035] Step four: global stitching model construction and iterative optimization A global stitching graph model is constructed with sub-slices as nodes and correlation scores as edge weights, a global energy function is established containing data fidelity term and prior smoothing term, and an iterative optimization algorithm is used to solve the optimal stitching transformation parameters; specifically, this step includes: Initialize the global stitching graph model: take all sub-slices as nodes, and based on the correlation scores calculated in step three Initialize the edge weights of a fully connected graph model; the higher the correlation score, the more likely it is that the two sub-slices have an adjacency relationship and the higher the matching quality.
[0036] Define the global energy function: define the global energy function , which contains the data fidelity term and the prior smoothing term .
[0037] The data fidelity term is obtained by weighted sum of the reprojection errors between all image pairs with determined adjacency relationship, and the weight is the corresponding correlation; the reprojection error measures the difference in feature point position after projecting one sub-slice to another sub-slice through the current transformation parameters; the data fidelity term aims to ensure the accuracy of local matching.
[0038] The prior smoothing term is used to penalize the discontinuous jump of texture flow field in adjacent regions of the stitched panoramic image; this term ensures the visual smoothness and continuity of global stitching by constraining the consistency of texture flow field in the overlapping region of adjacent sub-slices.
[0039] The global energy function is represented as , where is the weight coefficient balancing the data fidelity term and the prior smoothing term.
[0040] Initialization of iteration state: Set the current set of successfully stitched local regions and the set of remaining un-stitched sub-slices; initially, the set of stitched regions is empty or contains one seed sub-slice, and the set of remaining un-stitched regions contains all other sub-slices.
[0041] Entering the iteration loop: In each iteration, the following operations are performed: Selecting the optimal match and solving local transformation parameters: In the set of remaining un-stitched regions, select the optimal sub-slice or matching pair for stitching alignment according to the correlation degree, and solve the local transformation parameters; this can be achieved by finding the un-stitched sub-slice with the highest correlation degree with the stitched regions, or finding the matching pair with the highest correlation degree among the un-stitched sub-slices; the local transformation parameters can be affine transformation, perspective transformation, etc. Updating the set: Update the set of stitched regions and the set of remaining un-stitched sub-slices; move the successfully stitched sub-slices from the remaining set to the stitched set. Global energy function optimization: Based on all the solved transformation parameters, calculate the value of the global energy function , and fine-tune all sub-slice transformation parameters using optimization methods such as Levenberg-Marquardt algorithm, graph optimization, etc. to minimize the function; this step is the core of global optimization, which adjusts the relative positions and attitudes of all sub-slices to minimize the overall stitching error and ensure the smoothness of the texture flow field; Calculate the global iterative stitching convergence criterion: Calculate the global iterative stitching convergence criterion under the current iteration; this criterion considers the stability of the stitching, the potential of the remaining matches, and the overall stitching progress; specifically, at the th iteration, the calculation formula of the global iterative stitching convergence criterion used to evaluate the convergence state is:
[0042] Where: is the current iteration number; is the number of local region blocks that have been successfully stitched; and are the images of the th region block after the th and th iterations, respectively; is the structural similarity index calculation function, is the mean square error calculation function, which together measure the degree of change of the image block between the two iterations; and are small positive numbers used to prevent the denominator from being zero; is the set of remaining un-stitched sub-slice indices after the th iteration. For sub-slices and The correlation score between them This reflects the maximum matching potential of the remaining unspliced sub-slices; For set The total pixel area of all sub-slices in the middle. The ratio of the two is the total pixel area of all the sub-slices to be stitched together, which reflects the overall stitching progress. This is the attenuation coefficient, used to adjust the impact of the splicing progress on the convergence criterion; For the first The global convergence criterion for the next iteration is a comprehensive indicator that integrates stitching stability, remaining matching potential, and stitching progress, thus reflecting the convergence status of the global stitching more fully.
[0043] Termination judgment logic: preset convergence threshold and change threshold; calculate convergence criterion in each iteration. Then, determine whether the preset convergence conditions are met; the convergence conditions may include: convergence criteria. Less than a certain preset convergence threshold; Convergence criterion in multiple iterations The change is less than a preset change threshold; The number of completed local area blocks has reached the preset value or all sub-slices have been stitched together.
[0044] If any convergence condition is met, the global stitching optimization process is determined to have converged, the iteration is terminated and the process proceeds to step five; otherwise, the next round of iteration optimization continues.
[0045] Step 5: Panoramic Image Generation and Output: When the iteration satisfies the convergence condition corresponding to the convergence criterion, all sub-slice images are projected onto a unified coordinate system, and overlapping areas are fused to generate a seamless panoramic pathological image. The final image and related stitching metadata are then output and stored. Specifically, this step also includes a quality verification step. Image projection and fusion: Based on the optimal stitching transformation parameters obtained in step four, all sub-slice images are projected onto a unified coordinate system; for overlapping areas, multi-band fusion, weighted average or Poisson fusion and other techniques are used to eliminate stitching gaps and brightness differences, generating a visually seamless panoramic pathological image. Quality verification: After generating the preliminary fused panoramic image, the smoothness index of its overall texture flow field is calculated; the smoothness index can be calculated based on the divergence, curl, or local consistency of the texture flow field; at the same time, regions that may have splicing misalignment or texture discontinuity are detected and identified; this can be achieved by analyzing the differences in texture flow field of overlapping regions, local image gradient discontinuity, or structural similarity indices. Output and storage: The quality verification results are archived together with the stitching metadata, including parameters such as stitching parameters, sub-slice original information, stitching time, quality evaluation report, etc. If serious quality problems are found, such as smoothness index lower than the preset threshold or large area of discontinuous region, an alarm is triggered and the relevant steps, such as parameter adjustment in step four or correlation re-evaluation in step three, can be traced back to perform parameter adjustment and re-calculation to ensure the quality of the final output panoramic image.
[0046] Embodiment two: pathological image stitching device based on pathological slice correlation The embodiment of the present application also provides a pathological image stitching device based on pathological slice correlation, which is used to realize the pathological image stitching method of the above-mentioned embodiment one. The device can be an independent hardware device, or a software module integrated in a computer system or a system combining software and hardware.
[0047] The device comprises the following modules: Image acquisition and preprocessing module: This module is used to control the digital scanning device to acquire pathological sub-slice sequence images, and complete standardization preprocessing such as color correction, illumination equalization and noise filtering. It receives original sub-slice image data and performs preliminary processing to provide high-quality input images to subsequent modules. This module is also responsible for extracting the effective tissue area in the image and removing background interference.
[0048] Texture flow field analysis module: This module is used to receive preprocessed sub-slice images and calculate the texture flow field of each sub-slice image. It uses a gradient structure tensor-based method to calculate the local principal direction and performs regularization filtering to smooth the flow direction. In addition, this module also constructs a multi-scale image pyramid and extracts local binary pattern histogram, average gradient amplitude and Fourier amplitude spectrum and other texture feature descriptors at each scale. These descriptors will serve as the basis for sub-slice correlation evaluation.
[0049] Multi-scale correlation calculation module: This module is used to receive feature descriptors from the texture flow field analysis module. It calculates the correlation score between any two sub-slice images according to the multi-scale structural similarity correlation function. This module calculates the average gradient amplitude absolute difference, KL divergence and mutual information, and generates a correlation matrix reflecting the matching potential between sub-slices by integrating these indicators.
[0050] Global stitching optimization module: The module takes the correlation matrix output by the multi-scale correlation calculation module as input, and constructs a global stitching relationship graph and an energy function; it executes an iterative optimization algorithm to solve the optimal stitching transformation parameters; in each iteration, the module calculates a convergence index according to a global iterative stitching convergence criterion formula, and determines whether to terminate the iteration according to a preset iteration termination judgment logic; when the convergence condition is met, the module outputs the optimal stitching transformation parameter sequence; by minimizing the global energy function, the module ensures the global consistency and accuracy of the stitching.
[0051] Panorama synthesis and output module: The module is used for receiving the final transformation parameters output by the global stitching optimization module; it projects, aligns and multi-band fuses all sub-slice images according to the parameters to generate a final seamless panoramic pathology image; in addition, the module also performs a quality verification step, calculates the smoothness index of the overall texture flow field of the panoramic image, and detects and identifies the areas where stitching misplacement or texture discontinuity may exist; finally, the module packs the generated panoramic image and related metadata into a designated location, and can trigger an alarm or a backtracking mechanism according to the quality verification result.
[0052] The above device modules can be implemented by one or more processors executing corresponding computer programs, or by dedicated hardware circuits or a combination of software and hardware.
[0053] The technical scope of the present application is not limited to the above description, and those skilled in the art can make various modifications and changes to the above embodiments without departing from the technical idea of the present application, and these modifications and changes should all be within the protection scope of the present application.
Claims
1. A method for stitching pathological images based on the association of pathological sections, characterized in that, Includes the following steps: Step 1: Acquisition and preprocessing of pathological subsection images: Acquire serialized digital images of pathological subsections, perform standardization preprocessing on the images, filter out interference information and extract effective tissue regions; Step 2: Texture flow field calculation and multi-scale analysis: Calculate the texture flow field that characterizes the arrangement features of the microstructure of the tissue within the effective tissue area, construct a multi-scale image pyramid, analyze the characteristics of the texture flow field at different scales, and generate corresponding multi-scale texture feature descriptors. Step 3: Adjacency evaluation based on multi-scale texture correlation: Based on the multi-scale texture feature descriptor, the texture distribution difference, structural consistency and frequency domain correlation between sub-slices are quantitatively calculated, and the adjacency correlation score is obtained through the multi-scale structural similarity correlation function. Step 4: Global stitching model construction and iterative optimization: Construct a global stitching relationship graph model with sub-slices as nodes and correlation scores as edge weights, establish a global energy function that includes data fidelity terms and prior smoothing terms, and use an iterative optimization algorithm to solve for the optimal stitching transformation parameters. During the iteration process, combine the current stitching state, the matching potential of the remaining sub-slices, and the overall stitching progress to calculate the global iterative convergence criterion. Step 5: Panoramic image generation and output: When the iteration satisfies the convergence condition corresponding to the convergence criterion, all sub-slice images are projected onto a unified coordinate system, and the overlapping areas are fused to generate a seamless panoramic pathological image. The final image and related stitching metadata are then output and stored.
2. The pathological image stitching method based on pathological slide association according to claim 1, characterized in that, The texture flow field calculation and multi-scale analysis in step two specifically include: A gradient structure tensor-based method is used to calculate the local principal direction of each pixel in the sub-slice image to form the initial flow field. The initial flow field is subjected to regularization filtering to smooth noise and enhance the consistency of flow direction, resulting in the final texture flow field; Gaussian pyramid downsampling is performed on the sub-slice images and their corresponding texture flow fields to generate multiple image sequences and flow field sequences at different scales; at each scale, the following operations are performed: From the image at the current scale, extract the local binary pattern histogram of its adjacent boundary region to describe the texture pattern distribution; Calculate the average gradient magnitude from the flow field at the current scale; Perform Fourier transform on the adjacent boundary regions of the image at the current scale to extract their Fourier amplitude spectrum for frequency domain structure analysis.
3. The pathological image stitching method based on pathological slide association according to claim 2, characterized in that, The adjacency evaluation based on multi-scale texture correlation in step three specifically includes: For the two sub-slice images to be evaluated, obtain the texture feature descriptors generated at each scale in step two, including: local binary pattern histogram, average gradient magnitude, and Fourier magnitude spectrum; Calculate the absolute difference of the average gradient magnitude between the two images at each scale; calculate the KL divergence between the local binary pattern histograms of the two images at each scale to measure the difference in texture distribution. Calculate the mutual information between the Fourier amplitude spectra of two images at each scale to measure frequency domain structural similarity; By combining the calculation indicators at all scales and substituting them into the multi-scale structural similarity correlation function, the final correlation score between the two images is obtained.
4. The pathological image stitching method based on pathological slide association according to claim 3, characterized in that, Step four, the construction and iterative optimization of the global stitching model, specifically includes: Using all sub-slices as nodes, initialize the edge weights of a fully connected graph model based on the correlation scores calculated in step three; Define a global energy function, which includes a data fidelity term and a prior smoothing term. The data fidelity term is obtained by weighted summation of the reprojection errors between all image pairs with known adjacency relationships, and the weights are the corresponding correlation degrees. The prior smoothing term is used to penalize discontinuous jumps in the texture flow field of adjacent regions in the stitched panoramic image. Initialize the iteration state, setting the set of currently successfully stitched local regions and the set of remaining unstitched sub-slices; enter the iteration loop, and perform the following operations in each iteration: In the remaining unstitched set, the optimal sub-slice or matching pair is selected for stitching and alignment based on the degree of correlation, and the local transformation parameters are solved. Update the set of spliced regions and the set of remaining unspliced sub-slices; Based on all the currently solved transformation parameters, calculate the value of the global energy function, and use optimization methods to fine-tune the parameters to minimize the function; Calculate the convergence criterion for global iterative splicing in the current iteration.
5. The pathological image stitching method based on pathological slide association according to claim 4, characterized in that, In the iterative loop of step four, the data required to calculate the global iterative splicing convergence criterion includes: The number of local region blocks that have been stitched together, and the image state of each region block after the current iteration and after the previous iteration, are used to evaluate the stitching stability. The correlation scores between all pairs of sub-slices in the remaining unjoined sub-slice set are used to evaluate the remaining matching potential; The total pixel area of all sub-slices in the remaining unstitched sub-slice set, and the total pixel area of all sub-slices, are used to evaluate the overall stitching progress.
6. The pathological image stitching method based on pathological slide association according to claim 5, characterized in that, Step four also includes iteration termination judgment logic: Preset convergence threshold and change threshold; After calculating the convergence criterion in each iteration, determine whether the preset convergence condition is met. If the convergence condition is met, the global stitching optimization process is determined to have converged, the iteration is terminated and the process proceeds to step five; otherwise, the next round of iteration optimization continues.
7. The pathological image stitching method based on pathological slide association according to claim 6, characterized in that, Step five, the generation and output of the panoramic image, specifically includes a quality verification step: After generating the preliminary fused panoramic image, the smoothness index of its overall texture flow field is calculated; Detect and identify areas that may have splicing misalignment or texture discontinuity; The quality verification results are archived together with the spliced metadata. If a serious quality problem is found, an alarm is triggered and the relevant steps can be traced back to adjust the parameters and recalculate.
8. The pathological image stitching method based on pathological slide association according to claim 7, characterized in that, The multi-scale structural similarity correlation function used in step three to calculate the correlation score between the two sub-slice images is: ; in: Indicates the total number of scales; For scale indexing; For scale Related adjustable parameters; For two images at different scales The absolute difference of the average gradient magnitude; This is used to prevent extremely small positive numbers with a denominator of zero; For two images at different scales KL divergence between local binary pattern histograms; It is a non-linear adjustment index; For two images at different scales Mutual information between lower Fourier amplitude spectra; Represents sub-slice image and The correlation score between them.
9. The pathological image stitching method based on pathological slide association according to claim 8, characterized in that, In step four The global iterative splicing convergence criterion used to evaluate the convergence state in the next iteration. The calculation formula is: ; in: This represents the current iteration number; This represents the number of currently assembled local region blocks; and The first The first block in the... Second and third The image after the next iteration; This is the function for calculating the structural similarity index. This is the function for calculating the mean square error; and This is used to prevent extremely small positive numbers with a denominator of zero; For the first The set of remaining unjoined sub-slice indices after the next iteration; For sub-slices and The correlation score between them; For set The total pixel area of all sub-slices in the middle; The total pixel area of all sub-slices to be stitched together; The attenuation coefficient; For the first Global convergence criterion for each iteration.
10. A pathological image stitching device based on pathological slide association, used to implement the pathological image stitching method based on pathological slide association as described in any one of claims 1 to 9, characterized in that, The device includes: Image acquisition and preprocessing module: Used to control the digital scanning equipment to acquire pathological subsection sequence images and to perform standardized preprocessing such as color correction, illumination homogenization and noise filtering; Texture flow field analysis module: used to calculate the texture flow field of each sub-slice image, construct a multi-scale image pyramid, and extract local binary pattern histograms, average gradient magnitudes, and Fourier amplitude spectrum texture feature descriptors at each scale; Multi-scale correlation calculation module: It receives feature descriptors from the texture flow field analysis module, calculates the correlation score between any two sub-slice images through the multi-scale structural similarity correlation function, and forms a global correlation matrix; Global stitching optimization module: It is used to construct a global stitching relationship graph and energy function with the correlation degree matrix as input, and execute an iterative optimization algorithm. In each iteration, it calculates the convergence index through the global iterative stitching convergence criterion formula, and determines whether to terminate the iteration according to the preset logic, and outputs the optimal stitching transformation parameter sequence. Panoramic image synthesis and output module: Based on the final transformation parameters output by the global stitching optimization module, it projects, aligns, and performs multi-band fusion of all sub-slice images to generate the final seamless panoramic pathological image, and packages and stores the image and related metadata in a specified location.
Citation Information
Patent Citations
Pathological image stitching method and device based on pathological slide association
CN115619634B
Pathological image splicing method and device based on pathological section association
CN115619634A
Cancer image denoising method and system based on multi-scale neural network
CN119579454A
Thyroid ultrasound signal intelligent analysis and diagnosis method and system
CN121081028A
Three-dimensional noise reduction
US20220256076A1
Cited By
Image stitching method and storage medium
CN122492447A
