Dyeing cell positioning method and system for pathological diagnosis
By dividing local observation clusters and co-calibrating global positioning parameters in pathological slide images, the problem of insufficient cell positioning accuracy in pathological image analysis is solved, achieving high-precision and robust cell positioning, and improving the accuracy and efficiency of pathological diagnosis.
Patent Information
- Application Number
- CN202511661410.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-13
- Publication Date
- 2026-02-10
AI Technical Summary
Existing pathological image analysis methods suffer from insufficient accuracy and poor robustness in cell localization. In particular, in complex pathological images, traditional image processing techniques struggle to cope with differences in cell morphology and staining intensity, resulting in low accuracy and reliability of localization results.
By dividing pathological slide images into multiple local observation clusters, and utilizing local feature response mapping and progressive collaborative calibration of global localization parameters, precise initialization and global localization of cell images are achieved. Specific steps include local feature extraction, imaging parameter initialization and calibration, and progressive collaborative calibration of global cell localization parameters, ultimately outputting the global localization information of stained cells throughout the entire pathological slide.
It improves the accuracy and robustness of cell localization, reduces human error, enhances the reliability and efficiency of pathological diagnosis, provides more precise data support for pathological diagnosis, and promotes the automation and intelligent development of the pathology field.
Smart Images

Figure CN121504858A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of pathological image analysis, in particular to a staining cell positioning method and system for pathological diagnosis. BACKGROUND
[0002] In the field of pathological diagnosis, cell positioning technology is of great significance to improve the accuracy and efficiency of diagnosis. Traditional pathological image analysis methods usually rely on manual annotation and rough positioning technology. In pathological sections, the positioning of cells is often affected by image noise, uneven staining and other factors, resulting in low accuracy and reliability of the positioning results. Existing automated cell positioning methods rely on simple image processing techniques such as threshold segmentation and edge detection, but these methods often show poor robustness and positioning accuracy in complex pathological images. With the development of deep learning and image recognition technology, methods based on feature extraction and matching have gradually become a research hotspot. However, in pathological images, the morphology, staining intensity and local feature difference of cells are large, making it difficult for traditional image processing techniques to cope. In order to solve this problem, a cell image feature response mapping and positioning method based on local observation cluster has been proposed in recent years. However, the existing method still has problems such as inaccurate initialization calibration and tedious global positioning parameter collaborative calibration process.
[0003] The present application aims to solve the problems of the prior art by providing a staining cell positioning method and system for pathological diagnosis, which further improves the accuracy and reliability of cell positioning through precise calibration of local features and imaging parameters and progressive collaborative calibration of global positioning parameters, thereby providing more accurate cell positioning information for pathological diagnosis and assisting clinicians in making more efficient diagnosis decisions. SUMMARY
[0004] The purpose of the present application is to provide a staining cell positioning method and system for pathological diagnosis to solve the problems in the background art.
[0005] In order to achieve the above-mentioned purpose, the present application provides the following technical solution: a staining cell positioning method for pathological diagnosis, the positioning method comprising the following steps: S1. Local feature and imaging parameter initialization calibration of cell image S1.1. Divide the pathological section image into a plurality of partially overlapping local regions, each local region and its adjacent regions together constitute a local observation cluster; S1.2. Extract the features of the cell image in each local observation cluster, and calculate the feature response mapping between the cell image and the pre-constructed cell feature reference template; S1.3. Based on the feature response mapping of all cell images within each local observation cluster, obtain the initial imaging parameters corresponding to each cell image within that local observation cluster; S1.4. Traverse all local observation clusters on the entire pathological section, repeating steps S1.2 to S1.3 until the initial imaging parameters of each local observation cluster are obtained, and complete the initial calibration of the local imaging reference. S2. Progressive Co-calibration of Global Cell Localization Parameters S2.1. Select the local observation cluster at the geometric center of the pathological slide image as the reference area for global localization, and obtain the global localization parameters corresponding to each cell image within the reference area; S2.2. By expanding layer by layer from the baseline to the edge, in units of clusters, the global positioning parameters of all local observation clusters except the outermost edge region are sequentially calibrated; S3. Precise localization of stained cells and output of results Based on the initial imaging parameters and global positioning parameters of each local observation cluster obtained in steps S1 and S2, joint correction and coordinate mapping are performed on each cell image in the entire pathological section, and the global positioning information of all stained cells in the entire pathological section is output.
[0006] Preferably, the progressive collaborative calibration of global cell localization parameters in step S2 further includes the following steps: S2.3. For the outermost local observation clusters of the slice, based on the global positioning parameters of the neighboring local observation clusters that have been calibrated, the global positioning parameters of the outermost local observation clusters are compensated by interpolation. Taking the geometric center of the pathological slice as the global coordinate system reference, the global positioning parameters of all local observation clusters are uniformly transformed to the same global coordinate system, thus completing the collaborative calibration of cell positioning parameters from local to global.
[0007] Preferably, step S2.1, obtaining the global localization parameters corresponding to each cell image within the reference region, includes the following steps: Multiple overlapping cell images within a reference region are acquired, and the feature response mappings of the multiple overlapping cell images are calculated. A set of extrinsic parameter equations for the global localization parameters of the reference region is constructed simultaneously. Combined with the initial imaging parameters of the reference region obtained in step S1.3, the set of extrinsic parameter equations is solved to obtain the global localization parameters corresponding to each cell image within the reference region, which serve as a reference benchmark for subsequent progressive calibration.
[0008] Preferably, step S2.2 further includes the following steps: The edge of the reference area is used as the starting point of the next calibration area. The adjacent local area of the starting point is used as the center of the new local observation cluster to be calibrated. The adjacent local area in the direction of the extension of the line connecting the center of the new local observation cluster to the reference area is used as the edge of the local observation cluster to be calibrated. Acquire cell images within the local observation cluster to be calibrated and calculate feature response mappings. Simultaneously construct a set of global localization parameter equations for the local observation cluster to be calibrated. Combined with the initial imaging parameters of the local observation cluster to be calibrated in step S1.3, solve the set of equations to obtain the global localization parameters of each cell image within the local observation cluster to be calibrated.
[0009] Preferably, the global positioning parameters include global coordinate system origin offset, global rotation angle, and global scaling ratio.
[0010] Preferably, step S3 performs joint correction and coordinate mapping on each cell image in the entire pathological slide, including the following steps: The stained cell features detected in a local image are mapped to a unified global coordinate system according to the global positioning parameters of the local observation cluster to which they belong, and finally the global positioning information of all stained cells in the entire pathological section is output.
[0011] Preferably, the logic for acquiring the pathological slide images is as follows: multi-field imaging of the stained pathological slides is performed using a digital pathology scanner, and the imaging angle and focal plane are adjusted so that images containing stained cell features are acquired in different local areas.
[0012] Preferably, the features of the cell image within the local observation cluster include the distribution of cell nuclear staining intensity, cell membrane boundary gradient, and marker fluorescence signal, and the feature response mapping reflects the relative position, morphology, and staining pattern of cells in the current cell image.
[0013] Preferably, step S1.3. Based on the feature response mapping of all cell images within each local observation cluster, the initial imaging parameters corresponding to each cell image within that local observation cluster are obtained, including the following steps: A set of intrinsic parameter equations is constructed simultaneously for the imaging parameters of the local observation cluster. The imaging parameters include local magnification shift, local illumination correction coefficient, local focus deviation, and local color balance parameters. By solving the set of intrinsic parameter equations, the initial imaging parameters corresponding to each cell image in the local observation cluster are obtained, which are used to correct local imaging deviations.
[0014] This application also provides a staining cell localization system for pathological diagnosis, including an initialization calibration module, a progressive coordination module, and a result output module; Initialization and calibration module: Divide the pathological slide image into multiple partially overlapping local regions. Each local region and its several neighboring regions together constitute a local observation cluster. Extract the features of cell images within each local observation cluster and calculate the feature response mapping between the cell image and a pre-constructed cell feature reference template. Based on the feature response mapping of all cell images within each local observation cluster, obtain the initial imaging parameters corresponding to each cell image within that local observation cluster. Traverse all local observation clusters of the entire pathological slide until the initial imaging parameters of each local observation cluster are obtained, completing the initialization and calibration of the local imaging benchmark. The initialization and calibration results are sent to the progressive collaborative module and the result output module. Progressive Collaborative Module: Selects the local observation cluster at the geometric center of the pathological slide image as the reference area for global localization, and obtains the global localization parameters corresponding to each cell image within the reference area; by expanding layer by layer from the reference to the edge, in units of clusters, the global localization parameters of all local observation clusters except the outermost edge area are sequentially calibrated, and the global localization parameters are sent to the result output module. The results output module performs joint correction and coordinate mapping on each cell image in the entire pathological section based on the initial imaging parameters and global positioning parameters of each local observation cluster, and outputs the global positioning information of all stained cells in the entire pathological section.
[0015] The technical effects and advantages provided by the present invention in the above technical solution are as follows: 1. This invention effectively overcomes the problem of insufficient cell localization accuracy in pathological images in traditional methods by using local feature extraction and imaging parameter initialization calibration. By dividing the pathological slide image into multiple partially overlapping local regions and utilizing feature response mapping of cell images within local observation clusters, it not only improves the accuracy of cell image feature extraction but also ensures more consistent and accurate imaging parameters between the cell images of each local region and its neighboring regions. This process, through traversing the local regions of the entire pathological slide, ensures the globality and comprehensiveness of cell localization, providing a reliable foundation for subsequent precise localization.
[0016] 2. This invention achieves high precision and robustness in cell localization through progressive collaborative calibration of global cell localization parameters. By selecting a local region at the geometric center of the pathological slide image as a reference, and then extending layer by layer to the edge region of the slide, the global localization parameters of the entire slide cell image are calibrated. This progressive calibration method can effectively coordinate cell localization parameters across different regions, avoiding the accuracy loss caused by inconsistencies between local and global localization in traditional methods.
[0017] 3. This invention, through combined correction and coordinate mapping, can accurately correct the position of each stained cell in the entire pathological section and output global positioning information. Due to the precise combination of initial imaging parameters and global positioning parameters, this method ensures high accuracy and consistency in the final output cell positioning information, further improving the reliability and efficiency of pathological diagnosis.
[0018] In summary, this application provides an efficient, accurate, and robust cell localization method that can significantly improve the accuracy of pathological image analysis, reduce human error, provide more precise data support for pathological diagnosis, and thus promote the automation and intelligent development of the pathology field. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0020] Figure 1 This is a flowchart of the positioning method of the present invention.
[0021] Figure 2 This is a timing diagram of the positioning method of the present invention. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0023] Example: This example provides a method for localizing stained cells for pathological diagnosis. Please refer to [link to relevant documentation]. Figure 1 - Figure 2 As shown, the positioning method includes the following steps: S1. Initialization and calibration of local features and imaging parameters of cell images S1.1. Multi-field staining cell image acquisition and local region segmentation Use a high-resolution microscopic imaging system (or digital pathology scanner) to perform multi-field imaging on stained pathological sections, and adjust the imaging angle and focal plane so that clear, appropriately overlapping images containing significant stained cell features can be obtained for different local areas. The entire pathological slide image is divided into multiple partially overlapping local regions. Each local region and its several neighboring regions together form a local observation cluster, which is used for subsequent local feature extraction and parameter initialization.
[0024] S1.2. Calculation of Feature Response of Local Cell Images For each cell image within a local observation cluster, key features of the stained cells (such as nuclear staining intensity distribution, cell membrane boundary gradient, and marker fluorescence signal) are extracted, and the feature response mapping between the cell image and a pre-constructed cell feature reference template is calculated. This feature response mapping reflects the relative position, morphology, and staining pattern of the cells in the current cell image, serving as the basis for subsequent parameter solving.
[0025] S1.3. Solving for local imaging parameter initialization Based on the feature response mapping of all cell images within each local observation cluster, a set of intrinsic parameter equations is constructed simultaneously for the imaging parameters of that local observation cluster (such as local magnification shift, local illumination correction coefficient, local focus deviation, local color balance parameters, etc.). By solving the set of intrinsic parameter equations, the initial imaging parameters corresponding to each cell image within that local observation cluster are obtained, which are used to correct local imaging deviations and ensure the consistency of the reference for subsequent positioning.
[0026] S1.4. Repeat the extension to all local observation clusters Traverse all local observation clusters on the entire pathological slice, repeating steps S1.2 to S1.3 until the initial imaging parameters of each local observation cluster are obtained, thus completing the initial calibration of the local imaging reference.
[0027] S2. Progressive Co-calibration of Global Cell Localization Parameters S2.1. Acquisition of global positioning parameter benchmarks in the central area A local observation cluster at the geometric center of the pathological slide image is selected as the reference area for global localization; the imaging system is controlled to acquire cell images of this reference area from multiple angles / focal planes (such as slightly rotating the slide and adjusting the focal length to simulate different observation angles) to obtain multiple overlapping cell images within this reference area; Calculate the feature response mapping of multiple overlapping cell images, and simultaneously construct a set of extrinsic parameter equations for the global localization parameters of the reference region (such as global coordinate system origin offset, global rotation angle, global scaling ratio, etc.); combine the initial imaging parameters of the reference region obtained in step S1.3, solve the set of extrinsic parameter equations to obtain the global localization parameters (i.e., the initial reference in the global coordinate system) corresponding to each cell image in the reference region, which serve as the reference reference for subsequent progressive calibration.
[0028] S2.2. Progressive calibration based on proximity expansion The local region at the edge of the reference region (i.e., the local region whose spatial location is closest to the edge of the slice) is taken as the starting point of the next region to be calibrated; the adjacent local region (the spatially continuous and highly overlapping region) of the starting point is taken as the center of the new local observation cluster to be calibrated, and the adjacent local region in the direction of the extension of the line connecting the center of the new local observation cluster to the reference region is taken as the edge of the local observation cluster to be calibrated. Acquire cell images within the local observation cluster to be calibrated and calculate feature response mappings. Simultaneously construct a set of global localization parameter equations for the local observation cluster to be calibrated. Combined with the initial imaging parameters of the local observation cluster to be calibrated in step S1.3, solve the set of equations to obtain the global localization parameters of each cell image within the local observation cluster to be calibrated. By expanding layer by layer from the baseline to the edge, and in units of clusters, the global positioning parameters of all local observation clusters except the outermost edge region are calibrated sequentially, ensuring the continuity and consistency of the global positioning parameters.
[0029] S2.3. Edge Region Parameter Compensation and Global Unification For the outermost local observation clusters of the slice (the calibration error may increase due to insufficient adjacent areas), the global positioning parameters of the outermost local observation clusters are compensated by interpolation based on the global positioning parameters of the calibrated neighboring local observation clusters, so as to ensure that the global positioning parameters of all local areas of the entire slice can be effectively defined. Finally, using the geometric center of the pathological section as the global coordinate system reference, the global positioning parameters of all local observation clusters are uniformly transformed to the same global coordinate system, thus completing the collaborative calibration of cell positioning parameters from local to global.
[0030] S3. Precise localization of stained cells and output of results Based on the initial imaging parameters and global positioning parameters of each local observation cluster obtained in steps S1 and S2, joint correction and coordinate mapping are performed on each cell image in the entire pathological slice: The stained cell features detected in local images (such as cell nucleus location, marker distribution, etc.) are mapped to a unified global coordinate system according to the global positioning parameters of their respective local observation clusters. Finally, the precise global positioning information of all stained cells in the entire pathological slide (including cell type markers, spatial coordinates, staining intensity, etc.) is output, providing a high-precision cell-level spatial analysis basis for pathological diagnosis.
[0031] This embodiment also provides a staining cell localization system for pathological diagnosis, including an initialization calibration module, a progressive collaboration module, and a result output module; Initialization and calibration module: Divide the pathological slide image into multiple partially overlapping local regions. Each local region and its several neighboring regions together constitute a local observation cluster. Extract the features of cell images within each local observation cluster and calculate the feature response mapping between the cell image and a pre-constructed cell feature reference template. Based on the feature response mapping of all cell images within each local observation cluster, obtain the initial imaging parameters corresponding to each cell image within that local observation cluster. Traverse all local observation clusters of the entire pathological slide until the initial imaging parameters of each local observation cluster are obtained, thus completing the initialization and calibration of the local imaging benchmark. Progressive collaborative module: Select the local observation cluster at the geometric center of the pathological slide image as the reference area for global localization, and obtain the global localization parameters corresponding to each cell image within the reference area; By expanding layer by layer from the reference to the edge, in units of clusters, the global localization parameters of all local observation clusters except the outermost edge area are calibrated sequentially. The results output module performs joint correction and coordinate mapping on each cell image in the entire pathological section based on the initial imaging parameters and global positioning parameters of each local observation cluster, and outputs the global positioning information of all stained cells in the entire pathological section.
[0032] The following provides a detailed description and explanation of several implementation steps of this application: In one embodiment disclosed in this application, systematic imaging acquisition and image preprocessing provide high-quality, structured input data for subsequent local feature extraction and parameter initialization. The specific process includes two core steps: high-precision acquisition of multi-field stained cell images and local region segmentation and observation cluster construction of the entire pathological slide image. The two work together to ensure the coverage, consistency, and computability of the initial data.
[0033] High-resolution microscopic imaging systems (such as confocal microscopes and wide-field fluorescence microscopes) or digital pathology scanners (such as whole-slice scanners, typically with a resolution ≥0.23 μm / pixel, covering multiple channels from visible light to fluorescence) are used to perform multi-field continuous imaging of stained pathological sections. Stained pathological sections usually contain tissue samples specifically stained with hematoxylin-eosin (HE), immunohistochemistry (IHC), or immunofluorescence (IF). Their cell nuclei, cytoplasm, or specific markers exhibit significant color contrast (e.g., deep staining of cell nuclei, bright spots of fluorescent markers on tumor cell membranes), which are key targets for subsequent feature extraction. The following parameters need to be dynamically adjusted during imaging to ensure image quality: Imaging angle correction: Ensure that the slide is perpendicular to the objective lens optical axis (deviation ≤0.5°) through mechanical stage or software control to avoid cell morphology distortion caused by slide tilt (e.g., round cell nuclei are projected as ellipses, affecting subsequent feature matching).
[0034] Focal plane optimization: For different local areas (especially slices with uneven tissue thickness), an autofocus algorithm (such as the Laplacian variance method or Tenengrad gradient method based on the image sharpness evaluation function) is used to adjust the focal length per field of view to ensure that cell structures (such as nucleoli and membrane boundaries) are at the optimal depth of focus and reduce out-of-focus blur.
[0035] Overlapping area control: The overlap rate of adjacent fields of view is set to 15% to 30% (for example, if the imaging area of a single field of view is 1mm×1mm, then the edge of the adjacent field of view retains an overlap band of 150~300μm), which ensures the spatial continuity between local areas (avoiding the appearance of informationless "gaps") and avoids excessive overlap leading to computational redundancy.
[0036] The final acquired multi-field images must meet the following quality requirements: key structures such as cell nuclei / membranes are clearly distinguishable (signal-to-noise ratio ≥30dB), staining uniformity is good (no large areas of overexposure / underexposure), and lighting conditions are consistent between different fields of view (through automatic white balance or light intensity normalization preprocessing).
[0037] In one embodiment disclosed in this application, based on the acquired multi-view images, a complete high-resolution image covering the entire slice is first generated using an image stitching algorithm (such as the SIFT / SURF algorithm based on feature point matching or a deep learning end-to-end stitching network). (If the original data is a single-view stitch, the stitching result is used directly; if it is a single full-slice scan, stitching is not required.) Subsequently, the complete image is structurally divided, with the specific logic as follows: The complete pathological slide image is divided into multiple partially overlapping local imaging regions (LIRs). Each LIR serves as the basic unit for subsequent feature extraction and parameter initialization. The division must satisfy the following constraints: Size standardization: The physical size of a single LIR is typically 0.5mm×0.5mm to 2mm×2mm (the corresponding pixel size is determined according to the imaging resolution; for example, 0.5mm×0.5mm is approximately 2174×2174 pixels at 0.23μm / pixel). This ensures that a sufficient number of cells (usually ≥50 target cells) are included to support feature statistics, while avoiding excessively large single regions that would lead to excessive computational complexity.
[0038] Overlap rate control: The spatial overlap rate between adjacent LIRs is set to 10% to 20% (for example, if the LIR size is 1mm × 1mm, then the edge of the adjacent region retains an overlap band of 100 to 200μm) to ensure the continuity of cell information between adjacent regions within the local observation cluster (for example, cell populations will not be artificially segmented into different LIRs, resulting in feature breakage).
[0039] Coverage integrity: The union of all LIRs must completely cover the entire pathology slide (this can be achieved through gridding and edge patching, for example, for areas where the slide edge is less than the size of a complete LIR, asymmetric division or reduction of the size of the last row / column LIR can be used to ensure full coverage).
[0040] Each LIR does not exist independently; rather, it is formed by several spatially adjacent LIRs that constitute a Local Observation Cluster (LOC) for subsequent collaborative initialization of local parameters. The construction of an LOC follows these rules: Centered on a given LIR (referred to as the "central LIR"), all LIRs physically adjacent to it (in the vertical, horizontal, left-right, and diagonal directions, totaling 8 or 4 neighborhoods) with an overlap rate ≥10% are included in the same LOC (e.g., if the central LIR is the central block in a 3×3 grid, then if its 8 adjacent blocks all overlap with the central block by ≥10%, these 9 LIRs constitute one LOC). Multiple LIRs within an LOC share cell information through overlapping regions (e.g., the same cell population may simultaneously appear at the edges of adjacent LIRs), providing multi-view data support for subsequent feature response mapping calculations (e.g., improving the robustness of cell nucleus localization through feature complementarity among multiple adjacent LIRs).
[0041] Assuming the pathological slide is divided into a 5×5 LIR grid (each LIR is 1mm×1mm with an overlap of 15%), then the LIR in the 3rd row and 3rd column is the center, and its 8 adjacent LIRs (rows 2-4 and columns 2-4) together with the central LIR form a 3×3 LOC (a total of 9 LIRs). This LOC will serve as the smallest computational unit for feature extraction and parameter initialization in S1.2~S1.3.
[0042] In one embodiment disclosed in this application, key features characterizing the structure and staining pattern of stained cells are extracted from cell images within each Local Observation Cluster (LOC). These features are then matched with a predefined reference template to generate a Feature Response Map (FRM) reflecting the consistency of cell spatial distribution, morphological characteristics, and staining intensity. This map serves as the quantitative basis for subsequent initial imaging parameter solving, and its accuracy directly affects the reliability of the local imaging benchmark. The specific process can be divided into two main stages: "multi-dimensional extraction of key features" and "generation of feature response maps through feature-template matching," which will be described in detail below.
[0043] For cell images (usually RGB or multispectral images, such as bright-field HE-stained images or fluorescently labeled RGB three-channel images) of each local region (LIR) within the LOC, three core features need to be extracted: nuclear staining intensity distribution features, cell membrane boundary gradient features, and fluorescence signal features of specific markers (if multicolor labeling exists). The selection of these features is based on the typical physical properties of stained pathological images—the cell nucleus exhibits high-density staining due to DNA enrichment (such as the deep blue area in HE staining), the cell membrane shows edge enhancement due to lipid structure and antibody binding (such as the bright green line in immunofluorescence labeling), and specific pathological markers (such as Ki-67, CD3, etc.) exhibit locally bright signals through fluorescent dyes.
[0044] In one embodiment disclosed in this application, the cell nucleus is one of the most prominent structures of the cell, and its staining intensity is represented in the image as a local high grayscale region (bright field) or a specific channel with high fluorescence intensity (fluorescence field). Noise suppression (e.g., non-local mean denoising or Gaussian filtering, window size 3×3~5×5 pixels) is applied to the original image to eliminate the interference of high-frequency random noise on the intensity distribution. If it is a multi-channel image (e.g., multiple fluorescence labels), the channel corresponding to the cell nucleus staining is preferentially selected (e.g., the DAPI channel corresponds to the blue light signal of the cell nucleus). Based on a global or local adaptive threshold (e.g., Otsu algorithm or local mean ± 2 standard deviation), the image is divided into high staining intensity regions (candidate cell nuclei) and low-intensity background. For images with clear contrast, such as HE staining, a fixed grayscale threshold (e.g., grayscale value ≥ 200 / 255) can be directly used.
[0045] The segmented binarized regions are subjected to hole filling (eliminating staining cavities inside the cell nucleus), small connected component removal (removing fragmentation noise; the area threshold is typically set to ≤10 pixels²), and edge smoothing (through morphological opening operations, with the structuring element being a disk with a radius of 1-2 pixels). The final set of candidate regions for the cell nucleus is N. i , i = 1, 2, 3, ..., N, where N is the number of cell nuclei detected in the current LIR.
[0046] For each nuclear region N i Extract the intensity value distribution of its internal pixels (such as grayscale histogram statistics, intensity mean). Standard deviation Maximum strength Simultaneously record its spatial position (centroid coordinates). ) and geometric shape (equivalent circle diameter) (This refers to the area of the region). These parameters collectively constitute the intensity distribution feature vector of the cell nucleus. .
[0047] In one embodiment disclosed in this application, the cell membrane, as the physical boundary of the cell, is usually manifested in the staining image as a low-intensity transition zone around the cell nucleus (such as the junction of the cytoplasm and the cell nucleus in HE staining) or a high-intensity linear structure marked by a specific marker (such as a membrane structure labeled with β-catenin antibody).
[0048] Edge enhancement: Gradient calculation (such as Sobel operator) is performed on the original image (or cytoplasmic channel image) to generate a gradient magnitude map G(x,y), highlighting the high gradient regions at the cell edges.
[0049] Boundary localization: Based on local maxima detection of gradient magnitude maps (such as nonmaxima suppression algorithms), combined with prior knowledge of cell nucleus location (the cell membrane usually surrounds the cell nucleus), candidate curves Bi (N for each cell nucleus) are delineated to define the cell membrane boundary. i (Corresponds to a closed or open boundary curve).
[0050] Gradient feature encoding: For each candidate curve B of the cell membrane boundary i Extract the average gradient magnitude of its edge pixels. (Reflects boundary clarity), gradient direction consistency (such as the variance of edge normal directions) The more consistent the direction, the sharper the boundary (and the more consistent the direction, the sharper the boundary). Simultaneously, the spatial continuity of the boundary is recorded (e.g., the number of breakpoints or the curvature of the curve). These parameters constitute the cell membrane boundary gradient feature vector.
[0051] For pathological images labeled with immunofluorescence or multiple colors (such as those simultaneously labeled with nuclear DAPI, tumor marker FITC, and matrix protein TRITC), it is necessary to additionally extract the fluorescence signal characteristics of specific markers: Based on the fluorescence channel corresponding to the marker (e.g., FITC corresponds to the green channel, with an excitation wavelength of 488nm), extract the image data of that channel, and locate the positive signal region {Mj} (j=1, 2, ..., M) of the marker through threshold segmentation (e.g., for bright spot regions of highly expressed markers, the threshold is set to background intensity + 3 times the standard deviation) or spot detection algorithm (e.g., LoG filtering + local maximum detection). For each positive signal region Mj, extract its intensity peak value. Spatial distribution density (number of signal points per unit area), spatial distance from the nearest cell nucleus (Reflecting the correlation between biomarkers and cells), constituting the biomarker feature vector. .
[0052] The extracted cellular features (nuclear intensity distribution, cell membrane gradient, and marker signals) need to be matched with a pre-constructed cellular feature reference template (RT) to generate a feature response map (FRM). This template is a typical feature distribution model statistically derived from a large number of standard pathological samples (such as healthy tissue or cell images of known pathological conditions), including typical intensity ranges of the cell nucleus, typical gradient patterns of the cell membrane, and typical spatial arrangement patterns of markers.
[0053] Cell feature reference templates typically include the following: Nuclear template: Statistical analysis of the mean intensity range of normal cell nuclei (e.g.) Gray value), standard deviation range Typical diameter range ( (pixels), and the spatial distribution density of cell nuclei (number of cell nuclei per unit area).
[0054] Cell membrane template: Statistical analysis of the average gradient amplitude of a typical cell membrane ( Gradient direction consistency threshold rad 2 ), and the relative positional relationship between the cell membrane and the cell nucleus (e.g., the average distance between the boundary and the edge of the cell nucleus is 1 to 2 pixels).
[0055] Marker template: Statistically analyze the typical signal intensity of specific markers (e.g., the fluorescence intensity peak of Ki-67 positive cells). ), the maximum allowable distance from the cell nucleus (e.g., ≤5 pixels), and the signal aggregation pattern (e.g., no more than 3 bright signal points around a single cell nucleus).
[0056] In one embodiment disclosed in this application, the calculation logic for the feature response mapping is as follows: For each cellular feature within the current LIR (e.g., nucleus N), i eigenvectors The following steps are used to calculate the degree of matching between the feature and the cell feature reference template (i.e., the feature response value R). i Finally, the feature response map FRM(x, y) for the entire image is generated: Cell nuclear features Each component (such as) ) and template Similarity is measured by comparing the reference ranges of the corresponding components (e.g., using a Gaussian weighted function). and degree of closeness : ,in (This refers to the allowed intensity fluctuation range for the template). Similarly, for cell membrane gradient features... and marker features Calculate the matching weight for each component separately.
[0057] The matching weights of individual features are integrated into a comprehensive response value for a single cell feature through weighted summation (the weight coefficients are set according to the importance of the features, for example, 50% for cell nuclear intensity, 30% for cell membrane gradient, and 20% for marker signal). ( (The closer the value is to 1, the higher the match with the template). Spatial mapping generation: For each cell nucleus N... i centroid coordinates As the response location, a two-dimensional response matrix FRM(x, y) is constructed on the entire graph, where FRM(x, y) = r i For regions without cell nuclei (such as the background), the response value is set to 0. The final FRM(x, y) is a matrix with the same size as the original image. Its numerical distribution intuitively reflects the relative position of cells in the image (high response values correspond to densely populated cell areas), morphological consistency (cell features in high response value areas are closer to the template), and staining pattern (staining intensity in high response value areas matches the template).
[0058] In one embodiment disclosed in this application, internal imaging parameters (IIPs) refer to systematic bias variables that only affect the imaging quality of cells within the current local observation cluster. Essentially, they are a quantitative representation of the non-ideal characteristics of the imaging system within a local region. These parameters are independent of other local regions (i.e., unrelated to the global coordinate system), but they can cause shifts or distortions in cell features (such as nucleus location, staining intensity, and cell membrane boundaries) within the current LOC relative to the actual anatomical structure. Typical local imaging parameters include the following four categories: Local magnification offset describes the deviation between the actual magnification of the image within the current LOC and the standard magnification (such as the design value of 100×), which manifests as a global scaling of cell size (e.g., the cell nucleus diameter is magnified by 1.05 times or reduced by 0.95 times). This parameter can cause the relative distance between cells to be miscalculated (e.g., cells that are originally 5 μm apart are misclassified as 5.25 μm or 4.75 μm).
[0059] Local illumination correction coefficients characterize the non-uniformity of illumination intensity within the current LOC (such as light source edge attenuation and uneven reflection from the slide), and are typically decomposed into a spatially dependent coefficient matrix (e.g., gain coefficients in the form of a two-dimensional grid). i,j Each coefficient corresponds to a brightness adjustment ratio for a sub-region in the image. This parameter can cause local inconsistencies in cell staining intensity (e.g., cell nuclei appear too dark in the upper left corner of the image and too bright in the lower right corner).
[0060] Local focus deviation reflects the degree of deviation between the current focal plane within the LOC and the actual focal plane of the cell structure. This manifests as blurring of cell edges or decreased resolution of nucleoplasmic structures (e.g., the nuclear boundary becomes blurred due to defocusing, making precise segmentation difficult). This parameter can lead to errors in the extraction of cell morphological features (such as nuclear diameter and cell membrane gradient).
[0061] Local color balance parameters, for multi-channel images (such as RGB or fluorescent multi-label images), describe the intensity ratio deviation between different color channels (e.g., the green channel being too bright relative to the red channel, causing fluorescently labeled cell membrane signals to be misinterpreted as background noise). This parameter can lead to distortion of specific staining patterns (such as nucleocytoplasmic contrast in HE staining, and marker specificity in fluorescent labeling).
[0062] In one embodiment disclosed in this application, Feature Response Mapping (FRM) quantifies the degree of matching between cell features (nuclear intensity distribution, cell membrane gradient, marker signal) and a reference template (RT), implicitly revealing the influence of imaging parameter deviations on cell features. This step requires establishing a reverse reasoning logic of "imaging parameters → feature response changes," and the specific processing flow is as follows: Based on prior knowledge (such as optical imaging models) or historical data statistics, determine the sensitivity weight of each type of imaging parameter to specific cell features: Local magnification shifts primarily affect the geometric morphological characteristics of the cell nucleus (such as diameter and centroid spacing) and the spatial distribution density of the cell membrane. The local illumination correction factor mainly affects the staining intensity characteristics of the cell nucleus and cell membrane (such as mean intensity and gradient amplitude); Local focus deviation mainly affects the boundary gradient characteristics of the cell membrane (such as the consistency of gradient direction) and the edge clarity of the cell nucleus; Local color balance parameters primarily affect the signal intensity of specific markers in multi-channel images (such as the peak value of the fluorescence channel).
[0063] For each cell feature (such as the feature vector of the cell nucleus) within the current LOC, calculate the deviation between its actual response value (from the FRM) and the expected response value (from the cell feature reference template). For example: If the actual diameter of the cell nucleus is significantly larger than the template's expected value (e.g., the deviation exceeds 10%), it is inferred that there may be a local magnification shift of 0; if the average intensity of the cell nucleus is significantly lower than the template's expected value (e.g., due to insufficient local illumination), it is inferred that there may be a local illumination correction coefficient <1 (corresponding to a low-illuminance sub-region).
[0064] By aggregating the response biases of all cellular features, a statistical correlation model is established to map imaging parameters to overall feature responses. This is implemented through the following logic: All nuclear / membrane features within the LOC are grouped by spatial location (e.g., divided into high-response and low-response regions), and the response deviation of each group is analyzed (e.g., the nuclear diameter in high-response regions is close to the template value, while the nuclear diameter in low-response regions is generally large). Based on the dominant influence of each parameter on different features (e.g., magnification mainly affects size, and illumination mainly affects intensity), a contribution weight is assigned to each parameter to the overall response deviation (e.g., magnification accounts for 40%, and illumination accounts for 30%). It is required that the response deviation of all cell features within the same LOC be explained by the same group of imaging parameters (i.e., different cells are not allowed to use different local parameters of 0, ensuring global consistency of parameters).
[0065] In one embodiment disclosed in this application, based on the aforementioned correlation model, the relationship between imaging parameters and feature response deviation is transformed into a solvable system of equations, and the optimal parameter values are derived through an optimization algorithm. The specific processing flow is as follows: Suppose the current LOC contains K cell images (corresponding to K local regions or overlapping sub-regions), and the local imaging parameter vector to be solved is P=[ΔM, C]. light , △D, K color (where C) light and K color Parameters are in matrix or vector form, and the specific dimensions are determined based on the image resolution and number of channels.
[0066] For each cell image k (k=1, 2, ..., K), the FRM is mapped based on its feature response. k The matching results between (x, y) and the reference template generate one or more constraint equations describing that "the theoretical response under the current parameters P should be as close as possible to the actual response." For example: Size consistency constraint: requires the actual diameter D of the cell nucleus to be... k (After adjustment by the magnification ΔM in P) and the expected value D of the template ref The deviation is less than the threshold (e.g., |(1+△M)D) template -D k |≤ε D ); Intensity uniformity constraint: requires the adjusted mean intensity μ of cell nuclei. ′ k =μ k / c i,j (Based on the illumination coefficient C) light After correction, the deviation from the expected value μref of the template is less than the threshold. Morphological uniformity constraint: requires uniformity of gradient direction σ of the cell membrane 2 θ (After correction for focus deviation ΔD) close to the template's expected value σ 2 θ,ref.
[0067] These constraint equations do not depend on specific mathematical forms, but are implicitly defined through a logical chain of "parameter adjustment → feature response prediction → comparison with actual response → evaluation of bias" (e.g., by minimizing the total response bias ∑ of all cellular features). k Loss(P, FRM) k (This can be implemented using the Loss function, which can be a weighted mean square error function).
[0068] In one embodiment disclosed in this application, an iterative optimization algorithm (such as gradient descent) is used to solve for the optimal value of the parameter vector P. The specific steps are as follows: Assign initial guess values to parameter P (e.g., magnification ΔM = 0 (no offset), illumination coefficient C). ligh All settings are set to 1 (uniform illumination), focus deviation ΔD = 0 (ideal focal plane), and color balance parameter K. color (Set as channel mean ratio). Calculate the theoretical response of all cell features based on the current parameter values, and compare it with the actual FRM to obtain the total deviation (e.g., the weighted sum of size and intensity deviations of all cell nuclei); calculate the gradient (or approximate gradient) of the deviation with respect to the parameters using an optimization algorithm, and adjust the parameter values in the opposite direction of the gradient to reduce the total deviation. When the change in the total deviation is less than a preset threshold (e.g., ΔLoss < 10), the total deviation is reduced. -4 When the maximum number of iterations (e.g., 100) is reached, the iteration stops, and the current parameter value is output as the initial imaging parameter solution for the LOC.
[0069] In one embodiment disclosed in this application, the selection of the reference region must simultaneously satisfy the dual conditions of "geometric centrality" and "feature representativeness": on the one hand, its spatial location should be located at the geometric center of the entire pathological slide (for example, if the pixel / physical size of the slide image is W×H, then the center coordinates of the reference region are (W / 2, H / 2), ensuring that the position closest to the geometric center of the slide is used as the reference during subsequent progressive calibration, reducing the impact of edge effects (such as physical deformation of the slide edge and distortion of the edge field of view of the imaging system) on global parameters; on the other hand, the region should contain a sufficient number of uniformly distributed stained cells (for example, the number of cell nuclei ≥100 and covering different morphological types) to ensure the statistical significance of the feature response mapping.
[0070] After selecting a reference region, to capture the spatial relationships of cells within that region from different viewing angles, the imaging system needs to be controlled to acquire data from multiple angles and focal planes, simulating potential viewing angle deviations in actual diagnosis (such as slight slide rotation or minor focal plane shifts). Specific operations include: Multiple rotated copies of cell images within the baseline region are acquired by physically rotating the slide (e.g., small-angle rotations within ±2°, with a step size of 0.5°) or by rotating the digital image (if the data is digital pathology scan). Images are then rotated to 0°, 0.5°, 1°, 1.5°, and 2°. The focal length of the microscopic imaging system is adjusted (e.g., focal plane shifts within ±5μm, with a step size of 1μm) to acquire clear images of cells at different focal planes (e.g., images with the focus aligned with the cell nucleus, or slightly above / below the focus point), covering possible defocus states. All acquired cell images must maintain at least 10%–15% overlap with the original images of the baseline region (e.g., 15% pixel overlap between adjacent rotated images) to ensure that cell features (such as the cell nucleus and cell membrane) have matching common regions in the multi-view data. Ultimately, the multi-view dataset of the baseline region contains a set of cell images reflecting different observation conditions (rotation angle, focal length shift), which together constitute the input data source for subsequent global localization parameter calculation.
[0071] In one embodiment of this application, for each cell image acquired from multiple perspectives in the reference region, the feature extraction and feature response mapping generation method defined in step S1.2 is reused to calculate its corresponding feature response mapping (FRM). Specifically, for each image, the cell nuclear staining intensity distribution features, cell membrane boundary gradient features, and marker fluorescence signal features (if applicable) are extracted and matched with a predefined cell feature reference template to generate a global feature response mapping that reflects the relative position, morphology, and staining pattern of the cell (corresponding one-to-one with the image pixel coordinates, and the value representing the degree of matching between the cell features at that position and the template).
[0072] Furthermore, based on multi-view FRM data, it is necessary to analyze the spatial alignment relationship of cell features under different observation conditions: High-response regions (e.g., the top 10% of pixels by response value) are selected from each FRM. These regions correspond to typical locations of key structures such as the cell nucleus or cell membrane (e.g., densely packed areas of the cell nucleus, clear boundaries of the cell membrane). By comparing the spatial coordinates of high-response feature points in images with different rotation angles / focal planes (e.g., the centroid coordinates of the cell nucleus), common cell features that maintain spatial continuity under multiple viewpoints are identified (e.g., the centroid position of the same cell nucleus in images rotated at 0° and 0.5° should only have displacement caused by rotation). The displacement vectors of common feature points under different viewpoints are calculated (e.g., coordinate offset caused by rotation, feature point diffusion caused by blurring due to focal length offset). These deviations imply the influence of global positioning parameters (e.g., rotation angle, scaling ratio) on the spatial relationship of cells.
[0073] The above analysis clearly shows that there is a feature space shift due to global localization parameter deviation between the multi-view cell images of the reference area, thus providing a quantitative basis for the construction of the extrinsic parameter equation system.
[0074] In one embodiment of this application, based on the feature response mapping and feature alignment analysis results of multi-view cell images, a set of extrinsic parameter equations describing the "change in the spatial relationship between global positioning parameters and cells" is constructed, and the initial values of global positioning parameters of the reference region are derived by optimizing the solution.
[0075] External-Global-Parameters (EGPs) of the reference region refer to the spatial position and orientation description variables of this region in the global coordinate system of the entire pathological slide, mainly including: Global coordinate system origin offset: represents the translational deviation between the actual geometric center of the reference area and the origin of the global coordinate system (usually defined as the physical center of the slice or a preset reference point); Global rotation angle: describes the rotational attitude of the reference region relative to the global coordinate system (e.g., the overall rotation caused by the tilt of the slide, in degrees or radians); Global scaling ratio: reflects the deviation between the actual magnification of the reference area and the standard magnification of the global coordinate system (such as the design value of 1:1) (e.g., the overall scaling caused by local stretching during the slicing process).
[0076] By analyzing the feature response mapping and feature alignment results of multi-view cell images, a correlation constraint between global localization parameters and cell spatial relationships is established: The relative displacement of common feature points in images with different rotation angles (such as the centroid of the same cell nucleus in images rotated at 0° and θ°) should be consistent with the theoretical rotation displacement of the global rotation angle parameter (calculated by the rotation matrix). The spacing between feature points in images with different focal planes or magnification states (such as the center distance between adjacent cell nuclei) should be consistent with the theoretical scaling result of the global scaling parameter. After the feature response mapping (FRM) under all viewpoints is corrected by the global positioning parameter (such as translation, rotation, and scaling transformation), the distribution pattern of its high-response region should be consistent with the expected pattern of the reference template (RT) (for example, the response peak of the dense cell nucleus region should be concentrated in a specific quadrant of the global coordinate system). After eliminating the effects of rotation and scaling, the offset of high-response feature points (such as the centroid of the cell nucleus) under all viewpoints relative to the origin of the global coordinate system should be determined only by the origin offset parameter.
[0077] Based on the above constraints, the global positioning parameters are solved through the following steps: Assign initial guess values to the global positioning parameters. These initial values are usually based on the hardware configuration of the imaging system (such as the slide being placed horizontally without rotation by default) or the local imaging parameters obtained in step S1.3 (such as a rough estimate of the local magnification shift).
[0078] Define an objective function to quantify the total deviation between the feature response mapping of multi-view cell images under the current parameters and the reference template (or ideal spatial relationship). For example, the objective function can synthesize the following sub-terms: The mean square error between the translated coordinates and theoretical coordinates of all high-response feature points (reflecting origin offset deviation); the difference between the theoretical displacement and the actual observed displacement of common feature points under the rotation angle parameter (reflecting rotation angle deviation); the difference between the theoretical value and the actual observed value of the feature point spacing under the scaling parameter (reflecting scaling deviation); the matching degree between the high-response region of the feature response mapping and the template expected region (reflecting the consistency of the overall staining pattern).
[0079] The objective function is minimized using a nonlinear optimization algorithm (such as a genetic algorithm). The algorithm iteratively adjusts the parameter values, calculates the change in feature response mapping and objective function value in each iteration, and updates the parameters in the direction of decreasing deviation (for example, if the current rotation angle causes a large displacement deviation of the common feature points, the value of the rotation angle is reduced until the displacement matching is improved).
[0080] When the change in the objective function is less than the preset threshold or the maximum number of iterations (e.g., 200 times) is reached, the iteration stops, and the current parameter value is output as the global positioning parameter solution for the reference region.
[0081] In one embodiment disclosed in this application, the starting point for progressive calibration is selected as the Edge-Local Region (ELR) of the reference region—that is, the local region whose spatial location is closest to the physical edge of the pathological slide and belongs to the adjacent Local Observation Cluster (LOC) of the reference region. The selection logic of the ELR is based on the geometric boundary of the slide: by calculating the Euclidean distance between the center coordinates of all local regions (LIRs) and the physical center coordinates of the slide, the LIR with the largest distance and still in direct spatial adjacency with the reference region (central LOC) (such as sharing a partially overlapping area or adjacent grid positions) is selected as the ELR. For example, if the pathological slide is square and the reference region is a central 3×3 grid LOC, then the ELR may be the LIR in the outermost row / column of the central LOC (such as the LIR in the 3rd row or 3rd column).
[0082] The adjacent local regions of the ELR (i.e., LIRs that are spatially continuous with the ELR and have a high degree of image overlap, typically LIRs adjacent to the ELR in the vertical, horizontal, left-right, or diagonal directions, with an overlap rate ≥10%–15%) are used as the center of the new local observation cluster (NewLOC) to be calibrated. The selection of this center must meet the following conditions: Spatial continuity: Directly adjacent to ELR (for example, if ELR is the LIR in the 3rd row and 3rd column, its center may be the LIR in the 3rd row and 4th column or the LIR in the 4th row and 3rd column, and the two share ≥15% pixel overlap area). High overlap: The overlapping area between the LIR adjacent to the new center (i.e. the edge region of the LOC to be labeled) and the central LIR contains a sufficient number of common cellular features (such as cell nuclei or cell membrane boundaries) for subsequent feature matching and parameter constraints (e.g., the overlapping area contains at least 20 to 30 matching cell nuclei centroids).
[0083] Furthermore, the adjacent local regions along the extension of the line connecting the edge of the new center and the reference region are defined as the edge region of the LOC to be calibrated. Specifically, this edge region is the LIR (Local Indicator) in the LOC to be calibrated that is spatially furthest from the reference region (or closest to the slice edge). Its function is to define the spatial boundary of the current LOC to be calibrated, ensuring that the parameter solution only considers local information directly related to the calibrated region (the reference region and the extended neighboring LOCs). For example, if the new center is the LIR in row 4, column 3, then its edge region may be the LIR in row 4, column 1 or row 4, column 5 (depending on the direction of the extension line, usually the direction away from the reference region).
[0084] Based on the above rules, each LOC to be calibrated consists of a central LIR (new center) and multiple adjacent overlapping LIRs (forming a cluster structure). The topological relationship between its center and edge is clear, providing a clear local scope for subsequent parameter solving.
[0085] For all cell images (including central and peripheral LIRs) within each LOC to be calibrated, the method in step S1.2 is reused to extract key features of stained cells (nuclear staining intensity distribution, cell membrane boundary gradient, marker fluorescence signal, etc.), and the feature response mapping (FRM) between these features and a predefined cell feature reference template (RT) is calculated. This FRM reflects the relative position, morphology, and staining pattern of cells in the current LOC cell image and serves as the quantitative basis for subsequent parameter solving.
[0086] Furthermore, based on the global localization parameters of the calibrated reference region (from S2.1) and the initial imaging parameters of the LOC to be calibrated (from S1.3), a set of extrinsic parameter equations describing "global localization parameters of the LOC to be calibrated → global consistency of cell features" is constructed.
[0087] Analyze the deviation between the theoretical expected position (derived from the reference region parameters) and the actual observed position (from the FRM) of the cell features (such as the coordinates of the cell nucleus centroid and the position of the cell membrane boundary) in the global coordinate system of the reference region within the LOC to be calibrated.
[0088] In one embodiment disclosed in this application, three types of core constraints are generated based on the spatial distribution characteristics of the feature response mapping: Spatial continuity constraint: It is required that the global coordinates of common cell features (such as cell nuclei) in the overlapping areas of adjacent LIRs (especially the central and peripheral LIRs) within the LOC to be calibrated should be consistent with the global coordinates of the reference area or neighboring calibrated LOCs after eliminating the global parameter deviation of the LOC itself (for example, the coordinate difference of overlapping cell nuclei in the reference coordinate system should be less than a threshold).
[0089] Reference alignment constraint: The global positioning parameters (such as origin offset and rotation angle) of the LOC to be calibrated must maintain topological continuity with the global parameters (calibrated values) of the reference area (for example, the global rotation angle of the LOC to be calibrated should be close to the rotation angle of the reference area, with a deviation of no more than ±1°; the global scaling ratio should be close to 1.0, with a deviation of no more than ±0.05).
[0090] Feature consistency constraint: The distribution pattern of FRM high-response regions (such as densely populated areas of cell nuclei) within the LOC to be labeled must be consistent with the expected pattern of the reference template (RT) (e.g., the statistical diameter of the cell nucleus and the mean staining intensity should match the template).
[0091] The global positioning parameter vector of the LOC to be calibrated (including core parameters such as origin offset, rotation angle, and scaling ratio, which are the same type as the reference area parameters in S2.1 but are optimized locally for the current LOC).
[0092] After solving the parameters of the current LOC to be calibrated, it is marked as a "calibrated region". The adjacent LIRs of the edge LIR of this LOC (i.e., the outermost LR of the current LOC) are used as the new starting points for the next LOC to be calibrated. The global positioning parameters of the next layer of LOCs are calibrated in sequence. This process continues until all LOCs except the outermost edge region (where there are not enough adjacent calibrated LOCs to provide constraints) are calibrated.
[0093] In one embodiment disclosed in this application, all outermost LOCs are identified through spatial topology analysis: these LOCs typically satisfy one of the following conditions—(1) none of their neighboring LIRs are labeled in S2.2 (e.g., adjacent regions located at the physical edge of a slice and without overlap); (2) the number of their neighboring labeled LOCs is less than a threshold (e.g., ≤2, which does not provide sufficient constraints). They are further divided into two categories based on their spatial location: Edge Row / Column (LOC): A local region located at the edge of the slice geometry, such as the top row, bottom row, leftmost column, and rightmost column. Isolated edge (LOC): Although not strictly edge rows / columns, because its adjacent LIRs are not calibrated or the reliability of the calibration parameters is low (such as parameter deviation exceeding the continuity threshold), it is impossible to obtain effective parameters through progressive calibration.
[0094] For each outermost LOC, global positioning parameters (such as origin offset) are used based on its spatially neighboring calibrated LOCs. Rotation angle Scaling ratio The compensation parameters are generated using the following interpolation strategy: Spatial proximity weighting: Calculate the spatial distance (e.g., Euclidean distance) between the LOC to be compensated and each labeled LOC. (reflecting the straight-line distance between the center coordinates of the two regions), and assigning weights w according to the distance. i (The closer the distance, the higher the weight, for example) (to ensure that the nearest neighbor parameters have a dominant influence on the compensation results).
[0095] Parameter interpolation calculation: For each global positioning parameter component (such as the x / y components of the origin offset, rotation angle, and scaling ratio), a weighted average method is used to calculate the compensation value. For example, the compensation value for the x component of the origin offset... Calculate the corresponding parameters for all calibrated LOCs. Its weight w j The sum of the products (i.e.) The y-component is similar to the rotation / scaling parameter.
[0096] Continuity correction: Apply continuity constraints to the interpolation results (e.g., the difference between the compensated rotation angle and the rotation angle of the adjacent calibrated LOC should be ≤1°, and the scaling difference should be ≤0.05). Ensure a smooth transition between the compensated parameters and the global parameter field by fine-tuning the weights or parameter boundary values (e.g., limiting the rotation angle range to [-3°, 3°]).
[0097] If the outermost LOC (such as the LIR in the rightmost column of a slice) has two adjacent labeled LOCs on the left (distances of 500 μm and 800 μm respectively), then the compensation value for its origin offset x-component may be: , Compensation value: The final result is output after continuous correction.
[0098] In one embodiment disclosed in this application, after solving the global localization parameters of all LOCs (including the calibrated LOCs and the outermost LOCs with interpolation compensation), these scattered local parameters need to be uniformly mapped to a global coordinate system based on the geometric center of the pathological slide, eliminating the differences in local references among the LOCs and achieving true "global consistency". The specific logic is as follows: A global coordinate system is established with the geometric center point of the pathological slide (or the physical center coordinates calculated based on the actual size of the slide) as the origin, and the standard orientation of the imaging system (e.g., the positive X-axis is to the right and the positive Y-axis is down when the slide is horizontal) as the coordinate axis directions. This coordinate system serves as the final reference frame for all subsequent cell localization results.
[0099] For each LOC, the cell feature locations (such as the coordinates of the cell nucleus centroid) of its internal cell image need to be transformed to the global coordinate system through the following steps: First, the initial imaging parameters of the LOC (from S1.3, used to correct local imaging deviations such as magnification and uneven illumination) are used to pre-correct the original cell feature coordinates. Then, the global positioning parameters of the LOC (from S2.1 to S2.3, including origin offset, rotation angle, and scaling ratio) are applied to the corrected local coordinates to calculate its absolute position in the global coordinate system. All LOC transformations are based on the origin of the global coordinate system to ensure that the cell feature positions of different LOCs are comparable in the global coordinate system (for example, the global coordinates of the cell nucleus in the LOC at the top left corner of the slice and the cell nucleus in the LOC at the bottom right corner of the slice can be directly compared in terms of distance).
[0100] In one embodiment disclosed in this application, in steps S1 and S2, the initial imaging parameters (such as local magnification offset, illumination correction coefficient, focus deviation, color balance parameters, etc.) and global positioning parameters (such as global coordinate system origin offset, global rotation angle, global scaling ratio, etc.) of each local observation cluster (LOC) have been obtained. This step requires the combined application of these parameters to the stained cell features in the local image to eliminate local imaging bias and achieve spatial alignment of the features.
[0101] For each cell image within a LOC, the corresponding initial imaging parameters are first applied for correction. The processing logic is as follows: If the local magnification shift is ΔM, the cell image is linearly scaled with a scaling factor of 1 + ΔM (for example, if ΔM = 0.05, the image is magnified by 5% overall).
[0102] Illumination correction: using the illumination correction coefficient matrix C light This involves adjusting the brightness of each pixel in the image. For example, in an RGB image, the R, G, and B channel values of each pixel are multiplied by the correction coefficient at its corresponding position (to ensure uniform illumination).
[0103] Focus correction: If there is a local focus deviation △D, the clarity of cell edges can be improved by image sharpening algorithms, thereby improving the extraction accuracy of cell membrane boundary gradient features.
[0104] Color balance correction: based on color balance parameter K color Adjust the intensity ratio between each color channel to eliminate artifacts caused by uneven coloring. For example, if the green channel is relatively too bright compared to the red channel (K... color,G >K color,n If the overall brightness of the green channel is reduced until the proportions are balanced, then the overall brightness of the green channel is reduced. Assume the initial imaging parameters of a certain LOC are ΔM = 0.03 and C... ligh The position coefficient of (i,j) is 1.2, ΔD = -0.5, and K color,G =1.1, then the cell image in the LOC is magnified by 3%, the brightness is adjusted according to the illumination coefficient, a high boost filter is applied to enhance edge sharpness, and the brightness of the green channel is reduced to 90% of the red channel.
[0105] In one embodiment disclosed in this application, after completing local imaging correction, the global positioning parameters (origin offset) of each LOC are used to determine the local positioning parameters. , ), rotation angle Scaling ratio The corrected cell feature coordinates are transformed to a unified global coordinate system. Below. The calculation logic is as follows: Corrected cell feature coordinates According to scaling ratio Scale the coordinates to obtain the intermediate coordinates. Rotate the intermediate coordinates around the origin of the global coordinate system. Angle, to obtain the coordinates after rotation The rotation formula is: The rotated coordinates are translated along the X and Y axes of the global coordinate system, respectively. and To obtain the final global coordinates :
[0106] For example: The global location parameter of a certain LOC is , , , The corrected local coordinates of a certain cell nucleus are For a pixel, its global coordinates are calculated as follows: After scaling: Pixel; After rotation: radian: ; After translation: ; In one embodiment disclosed in this application, after completing the global coordinate mapping of all cell features within a single cell line (LOC), these scattered coordinate information need to be integrated to construct a global cell localization atlas for the entire pathological slide. This process involves the overlay, deduplication, and spatial distribution statistics of coordinate data to ensure the uniqueness and positioning accuracy of each cell in the global coordinate system.
[0107] All cell feature coordinates mapped to the global coordinate system are spatially superimposed to form a global cell coordinate set. Since cells may have overlapping or multiple LOC mappings in adjacent regions, the global cell coordinate set needs to be deduplicated to ensure the uniqueness of each cell in the global coordinate system. Specific methods include: setting a spatial distance threshold (e.g., 1.5 times the cell nucleus diameter); for coordinate points with a distance less than the threshold, they are considered duplicate mappings of the same cell, and the coordinate with the highest confidence (e.g., strongest feature response) is retained as the final location; for multiple coordinate points identified as the same cell, their cell features (e.g., cell nucleus intensity, staining pattern, marker signals) are fused to generate a comprehensive cell feature descriptor, improving the completeness of the localization information.
[0108] For multiple coordinate points identified as the same cell, their cell characteristics (such as cell nuclear intensity, staining pattern, and marker signal) are fused to generate a comprehensive cell feature descriptor, thereby improving the completeness of the location information. Spatial distribution analysis is performed to statistically analyze cell density (number of cells per unit area), cell cluster distribution (aggregation pattern of adjacent cells), and spatial preferences of cell types (such as specific cell types tending to be distributed in specific areas of the slice), providing macroscopic spatial distribution characteristics for pathological diagnosis.
[0109] Based on the global cell localization map, a detailed cell localization report is generated, including parameters such as the type label of each cell, precise spatial coordinates, and staining intensity. This information is then output in the form of visualization or data files for pathologists to conduct further analysis and diagnosis.
[0110] In one embodiment disclosed in this application, the cell features extracted in step S1 (such as cell nuclear morphology, cell membrane boundary, and marker fluorescence signal) are combined with a pre-trained classification model (such as a machine learning-based cell classifier) to identify and label each cell type (such as epithelial cells, lymphocytes, tumor cells, etc.). The labeling results are appended to the global coordinate information of the corresponding cell to form a complete cell localization record. The localization information of each cell is stored in a structured data format, such as a JSON object or a CSV table, containing the following fields: Cell_ID: A unique identifier for a cell (such as a serial number or UUID).
[0111] Global_Coordinates: Global coordinates of the cell, in μm.
[0112] Cell_Type: Cell type marker (such as "Epithelial", "Lymphocyte", "Tumor", etc.).
[0113] Staining_Intensity: A comprehensive score of cell staining intensity (based on the quantification of staining characteristics of the cell nucleus and cell membrane).
[0114] Additional_Features: Other auxiliary features (such as cell membrane gradient orientation consistency, spatial distribution of marker signals, etc.).
[0115] Utilizing image processing and visualization tools (such as Matplotlib, ImageJ, and a custom GUI interface), a global cell localization atlas is displayed overlaid on the original pathological slide image. Different cell types are marked with different colors or icons, intuitively presenting the spatial and typological distribution of cells. Simultaneously, interactive operations such as zooming and panning are supported, facilitating pathologists' viewing of details. All cell localization information is exported as standard data files (such as CSV, JSON, and XML) for subsequent data analysis, archiving, and sharing. Furthermore, detailed cell localization reports are generated, including total cell count statistics, the proportion of each cell type, spatial distribution heatmaps, and other visual charts, providing comprehensive data support for pathological diagnosis.
[0116] In the description of this specification, references to terms such as "an embodiment," "example," "specific example," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0117] The preferred embodiments of the present invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to any specific implementation. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention. The invention is limited only by the claims and their full scope and equivalents.
Claims
1. A method for localizing stained cells for pathological diagnosis, characterized in that: The positioning method includes the following steps: S1. Initialization and calibration of local features and imaging parameters of cell images S1.
1. Divide the pathological slide image into multiple partially overlapping local regions, and each local region together with several adjacent regions constitutes a local observation cluster; S1.
2. Extract the features of the cell image within each local observation cluster and calculate the feature response mapping between the cell image and the pre-constructed cell feature reference template; S1.
3. Based on the feature response mapping of all cell images within each local observation cluster, obtain the initial imaging parameters corresponding to each cell image within that local observation cluster; S1.
4. Traverse all local observation clusters on the entire pathological section, repeating steps S1.2 to S1.3 until the initial imaging parameters of each local observation cluster are obtained, and complete the initial calibration of the local imaging reference. S2. Progressive Co-calibration of Global Cell Localization Parameters S2.
1. Select the local observation cluster at the geometric center of the pathological slide image as the reference area for global localization, and obtain the global localization parameters corresponding to each cell image within the reference area; S2.
2. By expanding layer by layer from the baseline to the edge, in units of clusters, the global positioning parameters of all local observation clusters except the outermost edge region are sequentially calibrated; S3. Precise localization of stained cells and output of results Based on the initial imaging parameters and global positioning parameters of each local observation cluster obtained in steps S1 and S2, joint correction and coordinate mapping are performed on each cell image in the entire pathological section, and the global positioning information of all stained cells in the entire pathological section is output.
2. The method for localizing stained cells for pathological diagnosis according to claim 1, characterized in that: Step S2, the progressive collaborative calibration of global cell localization parameters, also includes the following steps: S2.
3. For the outermost local observation clusters of the slice, based on the global positioning parameters of the neighboring local observation clusters that have been calibrated, the global positioning parameters of the outermost local observation clusters are compensated by interpolation. Taking the geometric center of the pathological slice as the global coordinate system reference, the global positioning parameters of all local observation clusters are uniformly transformed to the same global coordinate system, thus completing the collaborative calibration of cell positioning parameters from local to global.
3. The method for localizing stained cells for pathological diagnosis according to claim 2, characterized in that: Step S2.
1. Obtain the global localization parameters corresponding to each cell image within the reference region, including the following steps: Multiple overlapping cell images within a reference region are acquired, and the feature response mappings of the multiple overlapping cell images are calculated. A set of extrinsic parameter equations for the global localization parameters of the reference region is constructed simultaneously. Combined with the initial imaging parameters of the reference region obtained in step S1.3, the set of extrinsic parameter equations is solved to obtain the global localization parameters corresponding to each cell image within the reference region, which serve as a reference benchmark for subsequent progressive calibration.
4. The method for localizing stained cells for pathological diagnosis according to claim 2, characterized in that: Step S2.2 also includes the following steps: The edge of the reference area is used as the starting point of the next calibration area. The adjacent local area of the starting point is used as the center of the new local observation cluster to be calibrated. The adjacent local area in the direction of the extension of the line connecting the center of the new local observation cluster to the reference area is used as the edge of the local observation cluster to be calibrated. Acquire cell images within the local observation cluster to be calibrated and calculate feature response mappings. Simultaneously construct a set of global localization parameter equations for the local observation cluster to be calibrated. Combined with the initial imaging parameters of the local observation cluster to be calibrated in step S1.3, solve the set of equations to obtain the global localization parameters of each cell image within the local observation cluster to be calibrated.
5. The method for localizing stained cells for pathological diagnosis according to claim 4, characterized in that: The global positioning parameters include the global coordinate system origin offset, global rotation angle, and global scaling ratio.
6. The method for localizing stained cells for pathological diagnosis according to claim 1, characterized in that: Step S3 performs joint correction and coordinate mapping on each cell image in the entire pathological slide, including the following steps: The stained cell features detected in a local image are mapped to a unified global coordinate system according to the global positioning parameters of the local observation cluster to which they belong, and finally the global positioning information of all stained cells in the entire pathological section is output.
7. The method for localizing stained cells for pathological diagnosis according to claim 5, characterized in that: The logic for acquiring the pathological slide images is as follows: multi-field imaging of the stained pathological slides is performed using a digital pathology scanner, and the imaging angle and focal plane are adjusted so that images containing stained cell features are acquired in different local areas.
8. The method for localizing stained cells for pathological diagnosis according to claim 7, characterized in that: The features of the cell images within the local observation cluster include the distribution of cell nuclear staining intensity, cell membrane boundary gradient, and marker fluorescence signal. The feature response mapping reflects the relative position, morphology, and staining pattern of cells in the current cell image.
9. The method for localizing stained cells for pathological diagnosis according to claim 1, characterized in that: Step S1.
3. Based on the feature response mapping of all cell images within each local observation cluster, obtain the initial imaging parameters corresponding to each cell image within that local observation cluster, including the following steps: A set of intrinsic parameter equations is constructed simultaneously for the imaging parameters of the local observation cluster. The imaging parameters include local magnification shift, local illumination correction coefficient, local focus deviation, and local color balance parameters. By solving the set of intrinsic parameter equations, the initial imaging parameters corresponding to each cell image in the local observation cluster are obtained, which are used to correct local imaging deviations.
10. A staining cell localization system for pathological diagnosis, used to implement the localization method according to any one of claims 1-9, characterized in that: It includes an initialization calibration module, a progressive coordination module, and a result output module; Initialization and calibration module: Divide the pathological slide image into multiple partially overlapping local regions. Each local region and its several neighboring regions together constitute a local observation cluster. Extract the features of cell images within each local observation cluster and calculate the feature response mapping between the cell image and a pre-constructed cell feature reference template. Based on the feature response mapping of all cell images within each local observation cluster, obtain the initial imaging parameters corresponding to each cell image within that local observation cluster. Traverse all local observation clusters of the entire pathological slide until the initial imaging parameters of each local observation cluster are obtained, thus completing the initialization and calibration of the local imaging benchmark. Progressive collaborative module: Select the local observation cluster at the geometric center of the pathological slide image as the reference area for global localization, and obtain the global localization parameters corresponding to each cell image within the reference area; By expanding layer by layer from the reference to the edge, in units of clusters, the global localization parameters of all local observation clusters except the outermost edge area are calibrated sequentially. The results output module performs joint correction and coordinate mapping on each cell image in the entire pathological section based on the initial imaging parameters and global positioning parameters of each local observation cluster, and outputs the global positioning information of all stained cells in the entire pathological section.