Global staining normalization method and system for cytological digital pathological image, and medium
Through global differential sampling and optical density spatial processing, the staining instability problem of cytopathic sections is solved, and a more stable global staining normalization effect is achieved, which is suitable for cytology digital pathological images.
Patent Information
- Application Number
- CN202510751346.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-05
- Publication Date
- 2025-09-05
AI Technical Summary
The existing normalization methods for digital pathological image staining are mainly aimed at histopathological sections, but the effects are poor for cell pathological sections, especially discrete cell pathological sections stained by Pap, and methods based on local patch images are easily affected by cell distribution, resulting in instability.
The color space distribution of globally differential sampling was constructed, and red-stained and blue-stained images were extracted through segmentation and clustering, and converted to optical density space for SVD processing, and the reference and target staining vectors were calculated to achieve global staining normalization.
The stability of staining normalization is improved, adapted to complex cytology digital pathological images, and solved the problems of strong dependence on reference images and failure of staining matrix estimation.
Smart Images

Figure CN120599087A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of medical image analysis, and in particular to a method, system, and medium for global staining normalization of cytological digital pathology images. Background Art
[0002] Currently, the methods for digital pathology image staining normalization are basically based on each local patch image of WSI. The main methods are as follows:
[0003] Traditional methods include the Vahadane, Macehko, and Reinhard staining normalization algorithms. The Vahadane algorithm, based on non-negative matrix factorization, represents the complex staining process as the product of two matrices: one matrix represents the different staining components in a tissue section, and the other matrix represents the distribution of these components within the tissue section. Specifically, it decomposes the input image into multiple staining components, such as the matrix and cell nuclei. By analyzing the characteristics and distribution of these components, it uses non-negative matrix factorization to separate the different staining components. The decomposed staining components are then adjusted and combined based on the staining characteristics of the reference image, thereby achieving staining normalization.
[0004] The Macehko algorithm converts RGB images into optical density (OD) space for processing, based on the principle that the RGB color of each pixel is a linear combination of two unknown H&E staining vectors. Singular value decomposition (SVD) is used to estimate the hematoxylin and eosin staining vectors for the whole-slide image. Intensity variations due to staining intensity and the procedure are corrected, and the image is then projected onto a reference image, resulting in a normalized image with similar color characteristics.
[0005] The Reinhard algorithm is based on color histogram statistical matching. By matching the color histogram of the target image with the color histogram of the reference image, the color features of the normalized target image are similar to those of the reference image, thereby achieving color consistency of images under different staining conditions.
[0006] The existing staining normalization methods are mainly applicable to HE-stained tissue pathology sections, and are not well adapted to discrete cell pathology sections stained by Papanicolaou. This is because tissue pathology sections have a relatively continuous tissue structure, HE staining targets are relatively single (matrix and cell nucleus), and the color distribution is relatively small. However, cell pathology sections have the operation of breaking up the cell liquid base and extracting it during the preparation process, and the cell staining distribution under Papanicolaou staining is relatively diverse, with red and blue staining, and the staining intensity is different, so the final imaging is relatively complex, such as Figure 1 、 Figure 2 shown.
[0007] Similarly, due to the variability in cell color distribution in cytological pathology images, staining normalization algorithms based on each local patch image in WSI are affected by the cell distribution within the patch image, resulting in poor performance. For example, the Vahadane algorithm cannot adapt to situations where the reference image quality is poor or the staining characteristics do not meet the requirements, and the Reinhard algorithm is not ideal for complex situations such as complex staining differences and background interference. Summary of the Invention
[0008] The embodiments of the present application provide a global staining normalization method, system, and medium for cytological digital pathology images, which construct a color space distribution of global difference sampling to estimate the global staining matrix, thereby achieving a more stable staining normalization effect.
[0009] This embodiment of the present application proposes a global staining normalization method for cytological digital pathology images, including:
[0010] Segment the reference whole slice image WSI and sample to obtain sample image slices;
[0011] Extracting feature vectors of the sample image slices, and clustering two types of patch images with large color differences based on the extracted feature vectors, into red-dyed images and blue-dyed images;
[0012] The red-dyed image and the blue-dyed image are stitched into one image according to the specified specifications, and the stitched image is converted to the optical density OD space so that the staining and saturation are linearly separable;
[0013] Use SVD to form a plane on the connected patch consisting of the two vectors corresponding to the two largest singular values;
[0014] Project all pixels onto the plane and normalize them to unit length, calculate the angle between each projected pixel and the first vector, and determine a reference coloring vector Vref based on the red coloring vector and the blue coloring vector;
[0015] For the target whole-slice image WSI, the target staining vector Vslide is calculated;
[0016] Each patch image segmented in the target WSI is converted to the optical density OD space, and the pixel-level concentration coefficient Spixel is calculated using the target staining vector Vslide and the pixel value ODpixel after OD conversion;
[0017] Color normalization is performed based on the concentration coefficient Spixel and the reference staining vector Vref.
[0018] An embodiment of the present application also proposes a global staining normalization system for cytological digital pathology images, including a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the global staining normalization method for cytological digital pathology images as described above are implemented.
[0019] An embodiment of the present application further proposes a computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the global staining normalization method for cytological digital pathology images as described above are implemented.
[0020] The Macehko algorithm processing flow based on global WSI reference proposed in this application solves the problems of the Macehko algorithm's strong dependence on the reference image and sensitivity to color matrix estimation failure, and improves the stability of color normalization.
[0021] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the present invention. The same reference symbols are used throughout the drawings to represent the same components. In the drawings:
[0023] Figure 1 HE histological pathological image as background technology;
[0024] Figure 2 Cytological pathology images as background technology;
[0025] Figure 3 Schematic diagram of the basic process of the global color normalization method of this embodiment;
[0026] Figure 4 Schematic diagram of the red-dyed image and the blue-dyed image according to the global dye normalization method of this embodiment;
[0027] Figure 5 Schematic diagram of the random sampling process of the global color normalization method of this embodiment;
[0028] Figure 6 FIG. 4 is a schematic diagram of the target WSI color normalization processing flow of the global color normalization method of this embodiment. DETAILED DESCRIPTION
[0029] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0030] The present application embodiment proposes a global staining normalization method for cytological digital pathology images, such as Figure 3 As shown, the following steps are included:
[0031] In step 301, the reference full-slice image WSI is segmented and sampled to obtain sample image slices. In a specific example, segmenting the reference full-slice image WSI and sampling to obtain sample image slices includes using a sliding window method to divide the reference WSI into patch images of a fixed size. For example, the sliding window method is used to divide the patch images into 512x512 pixels. The specific pixel size of the segmentation can be set according to actual needs.
[0032] In step 302, the feature vectors of the sample image slices are extracted, and based on the extracted feature vectors, two types of patch images with large color differences are clustered, such as Figure 4 As shown, it is divided into red-dyed image and blue-dyed image.
[0033] In step 303, the red-dyed image and the blue-dyed image are stitched together into a single image according to specified specifications. The stitched image is then converted to an optical density (OD) space, for example, from a red, green, and blue (RGB) color space to an optical density (OD) space, so that color and saturation are linearly separable. After converting the stitched image to the optical density (OD) space, the stitching process also includes discarding pixels with an OD value less than a preset OD value, for example, discarding pixels with an OD value less than 0.15. In this example, pixels with an OD value less than 0.15 are considered transparent and are therefore discarded.
[0034] In step 304 , an SVD singular value decomposition algorithm is used to form a plane on the connected patches, which is spanned by two vectors corresponding to the two largest singular values.
[0035] In step 305, the angle between each projected pixel and the first vector is calculated, and a reference coloring vector Vref is determined based on the red coloring vector and the blue coloring vector. Before determining the reference coloring vector Vref based on the red coloring vector and the blue coloring vector, the method further includes: projecting all pixels onto the plane and normalizing them to unit length.
[0036] In step 306, a target staining vector Vslide is calculated for the target whole slice image WSI. That is, for the target whole slice image WSI, the target staining vector Vslide is determined based on the red staining vector and the blue staining vector in the same manner as steps S301-S305.
[0037] In step 307, each patch image segmented in the target WSI is converted to an optical density OD space, and the pixel-level concentration coefficient Spixel is calculated using the target staining vector Vslide and the pixel value ODpixel after OD conversion.
[0038] In step 308 , color normalization is performed based on the concentration coefficient Spixel and the reference coloring vector Vref.
[0039] The Macehko algorithm processing flow based on global WSI reference proposed in this application solves the problems of the Macehko algorithm's strong dependence on the reference image and sensitivity to color matrix estimation failure, and improves the stability of color normalization.
[0040] In some embodiments, segmenting the reference whole slice image WSI and sampling to obtain sample image slices further includes:
[0041] Disrupt the order of the divided Patch images;
[0042] For patch images with disrupted image order, such as Figure 5 As shown, sampling is performed when one of the following conditions is met:
[0043] Pixel mean < preset pixel threshold;
[0044] Pixel variance > preset variance threshold;
[0045] The mean pixel value in the central area is less than the preset pixel mean value;
[0046] Each sampling obtains a certain number of patch images, for example, each sampling obtains 1 patch image, and then the sampling number is increased by 1, and the above steps are repeated until the target number of patch images are obtained, for example, until 100 sampled patch images are saved.
[0047] In some embodiments, extracting the feature vector of the sample image slice and clustering two types of patch images with large color differences based on the extracted feature vector includes:
[0048] The color histogram method is used to extract the color feature vector of the patch image;
[0049] Kmeans clustering is used to cluster the extracted feature vectors into two types of patch images with large color differences, such as Figure 4 shown.
[0050] In some embodiments, determining a reference coloring vector Vref based on the red coloring vector and the blue coloring vector includes: treating the 99th percentile and the 1st percentile vectors corresponding to all angles as the red coloring vector and the blue coloring vector, respectively, to obtain the reference coloring vector Vref. The specific ratio of the 99th percentile and the 1st percentile can be set according to actual scenarios.
[0051] For the target whole-slice image WSI, the steps for calculating the target staining vector Vslide are the same as those for the reference whole-slice image WSI. Figure 6 For example, at the end of the step, the vectors corresponding to the 99th to 100th percentile or the 0th to 1st percentile of all angles are regarded as red-dyed and blue-dyed coloring vectors, respectively, to obtain the target coloring vector Vslide, that is, the estimated coloring matrix (Vslide).
[0052] Each patch image segmented in the target WSI is then converted from RGB (IRGB) to optical density (OD) space, and the pixel-level concentration coefficient is calculated using the estimated staining matrix (Vslide) and the OD-converted pixel value (ODpixel). In some embodiments, the pixel-level concentration coefficient Spixel is calculated using the target staining vector Vslide and the OD-converted pixel value ODpixel to satisfy:
[0053] Spixel=Vslide -1 *ODpixel.
[0054] In some embodiments, color normalization based on the concentration coefficient Spixel and the reference color vector Vref includes:
[0055] Normalize the concentration estimate by excluding a set fraction of the highest concentration values and linearly rescaling the remainder to match the pseudo-maximum concentration value. For example, normalize the concentration estimate by excluding 1% of the highest concentration values and then linearly rescaling the remainder to match the pseudo-maximum concentration value.
[0056] Normalize the pseudo maximum concentration value to obtain the pixel level concentration Spixel_norm;
[0057] Multiply the reference color vector Vref with the normalized Spixel_norm to complete color normalization.
[0058] Compared with the Macehko algorithm based on a single patch reference image, the embodiment of the present application proposes a Macehko algorithm processing flow based on a global WSI reference, which solves the problems of the Macehko algorithm's strong dependence on the reference image and its sensitivity to staining matrix estimation failure, improves the stability of staining normalization, and makes it more suitable for cytological digital pathology images.
[0059] An embodiment of the present application also proposes a global staining normalization system for cytological digital pathology images, including a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the global staining normalization method for cytological digital pathology images as described above are implemented.
[0060] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the computer program implements the steps of the aforementioned method for global staining normalization of cytological digital pathology images.
[0061] Furthermore, although exemplary embodiments have been described herein, the scope includes any and all embodiments based on the present disclosure with equivalent elements, modifications, omissions, combinations (e.g., solutions that intersect various embodiments), adaptations, or changes. The present invention is not limited to the examples described in this specification or during the practice of this application, which examples are to be construed as non-exclusive.
[0062] The above description is intended to be illustrative rather than restrictive. For example, the above examples (or one or more of them) can be used in combination with each other. For example, those of ordinary skill in the art may use other embodiments when reading the above description.
[0063] The above embodiments are merely exemplary embodiments of the present disclosure. Those skilled in the art may make various modifications or equivalent substitutions to the present invention within the essence and protection scope of the present disclosure, and such modifications or equivalent substitutions should also be deemed to fall within the protection scope of the present invention.
Claims
1. A global staining normalization method for cytological digital pathology images, characterized in that: include: Segment the reference whole slice image WSI and sample to obtain sample image slices; Extracting feature vectors of the sample image slices, and clustering two types of patch images with large color differences based on the extracted feature vectors, into red-dyed images and blue-dyed images; The red-dyed image and the blue-dyed image are stitched into one image according to the specified specifications, and the stitched image is converted to the optical density OD space so that the staining and saturation are linearly separable; Use SVD to form a plane on the connected patch consisting of the two vectors corresponding to the two largest singular values; Calculate the angle between each projected pixel and the first vector, and determine the reference coloring vector Vref based on the red coloring vector and the blue coloring vector; For the target whole-slice image WSI, the target staining vector Vslide is calculated; For each patch image segmented in the target WSI, it is converted to the optical density OD space, and the pixel-level concentration coefficient Spixel is calculated using the target staining vector Vslide and the pixel value ODpixel after OD conversion; Color normalization is performed based on the concentration coefficient Spixel and the reference staining vector Vref.
2. The global staining normalization method for cytological digital pathology images according to claim 1, characterized in that: Segmenting the reference full slice image WSI and sampling to obtain sample image slices includes: The sliding window method is used to divide the reference WSI into patch images of fixed size and disrupt the image order; For a patch image with disrupted image order, sampling is performed if one of the following conditions is met: Pixel mean < preset pixel threshold; Pixel variance > preset variance threshold; The mean pixel value in the central area is less than the preset pixel mean value; A certain number of patch images are obtained each time sampling; Repeat the judgment until the target number of patch images are sampled.
3. The global staining normalization method for cytological digital pathology images according to claim 1, characterized in that: Extract the feature vector of the sample image slice, and cluster two types of patch images with large color differences based on the extracted feature vector, including: The color histogram method is used to extract the color feature vector of the patch image; Kmeans clustering is used to cluster the extracted feature vectors into two types of patch images with large color differences.
4. The global staining normalization method for cytological digital pathology images according to claim 1, characterized in that: Converting the stitched image to optical density (OD) space involves: Convert the stitched image from RGB (IRGB) to optical density OD space; and, After converting the stitched image to optical density OD space, it also includes: Pixels with OD values less than a preset OD value are discarded.
5. The global staining normalization method for cytological digital pathology images according to claim 1, characterized in that: Before determining the reference coloring vector Vref according to the red coloring vector and the blue coloring vector, the method further includes: projecting all pixels onto the plane and normalizing them to unit length.
6. The global staining normalization method for cytological digital pathology images according to claim 5, characterized in that: Determining the reference coloring vector Vref based on the red coloring vector and the blue coloring vector includes: considering vectors corresponding to 99th to 100th percentiles and 0th to 1st percentiles of all angles as red coloring vectors and blue coloring vectors respectively to obtain the reference coloring vector Vref.
7. The global staining normalization method for cytological digital pathology images according to claim 1, characterized in that: The pixel-level concentration coefficient Spixel is calculated using the target staining vector Vslide and the pixel value ODpixel after OD conversion to satisfy: Spixel=Vslide -1 *ODpixel.
8. The global staining normalization method for cytological digital pathology images according to any one of claims 1 to 7, characterized in that: Based on the concentration coefficient Spixel and the reference staining vector Vref, color normalization is completed including: Remove the portion with the highest concentration value of the set proportion and linearly rescale the remaining portion to match the new highest concentration value; Normalize the new concentration value from 0 to 1 to obtain the pixel-level concentration Spixel_norm; Multiply the reference color vector Vref with the normalized Spixel_norm to complete color normalization.
9. A global staining normalization system for cytological digital pathology images, characterized in that: The method comprises a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the steps of the global staining normalization method for cytological digital pathology images according to any one of claims 1 to 8 are implemented.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the global staining normalization method for cytological digital pathology images according to any one of claims 1 to 8.
