A method for automatically segmenting necrotic areas of a gastrointestinal tumor pathological image
By dynamically adjusting the cluster centers in pathological images of gastrointestinal tumors and calculating the necrosis probability based on pixel values and morphological features, the feature confusion problem caused by the traditional K-means algorithm is solved, and higher-precision necrosis region segmentation is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- THE NAVAL MEDICAL UNIV OF PLA
- Filing Date
- 2026-02-04
- Publication Date
- 2026-06-23
AI Technical Summary
Traditional K-means algorithm has poor segmentation performance in gastrointestinal tumor pathological images because it uses fixed cluster centers, which can lead to feature confusion between two types of regions with similar color spaces.
By acquiring the pixel color features of pathological images of gastrointestinal tumors, clustering is performed to obtain cytoplasm, nucleus, and fat/mucus regions. The probability of necrosis is calculated using the pixel value distribution and morphological features in RGB space. The cluster centers are dynamically adjusted, and iterative clustering is performed until a preset number of clusters is reached. Necrotic blocks are then selected for segmentation.
It improves the segmentation accuracy of tumor necrosis areas, reduces the probability of cytoplasmic misclassification, adapts to the differences in necrosis characteristics of different tissue types, and improves the accuracy of segmentation.
Smart Images

Figure CN122265308A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of necrotic region segmentation technology, specifically to an automatic segmentation method for necrotic regions in pathological images of gastrointestinal tumors. Background Technology
[0002] In hematoxylin-eosin staining images of gastrointestinal tumors, necrotic areas exhibit specific histological features: disintegration of tissue structure, disordered cell arrangement, and disappearance of normal tissue architecture. In necrotic areas, necrotic cell nuclei show typical nuclear pyknosis, nuclear fragmentation, or nuclear dissolution, while the cytoplasm shows strong eosinophilic red staining due to protein denaturation, forming a significant contrast with the surrounding surviving tissue.
[0003] In existing technologies, necrotic regions are segmented using threshold segmentation techniques or traditional K-means clustering algorithms in the analysis of pathological images of gastrointestinal tumors. However, due to factors such as uneven staining of tissue sections, cytoplasmic regions and lipid-mucus regions are often interspersed. Traditional K-means algorithms, by fixing cluster centers, can easily cause feature confusion between two types of regions with similar color spaces, leading to misjudgment in segmentation and resulting in poorer segmentation of necrotic regions. Summary of the Invention
[0004] To address the problem of poor segmentation performance caused by the fixed cluster centers in the traditional K-means algorithm, which leads to feature confusion between regions with similar color spaces, the present invention aims to provide an automatic segmentation method for necrotic regions in gastrointestinal tumor pathological images. The specific technical solution adopted is as follows: This invention proposes an automatic segmentation method for necrotic regions in pathological images of gastrointestinal tumors, the method comprising: Obtaining hematoxylin-eosin stained pathological images of gastrointestinal tumors; Based on the color characteristics of pixels in the pathological image, all pixels are clustered to obtain the cytoplasmic region, the nucleus region, and the fat and mucus region; multiple image blocks of the pathological image are obtained, and the necrosis probability of each image block is obtained based on the pixel value distribution of different pixels in each image block and the morphological characteristics of different regions. For any image block, based on the pixel value distribution of different regions and the preset fixed pixel step size, the offset of the cytoplasmic region relative to other regions in the RGB space is obtained; based on the offset of the cytoplasmic region relative to other regions in the RGB space of each image block and the necrosis probability, the new cluster center corresponding to the cytoplasmic region in each image block is obtained; all pixels are iteratively clustered until the preset number of iterations is reached to obtain the optimized cluster center of the cytoplasmic region; Clustering is performed based on the optimized cluster centers corresponding to the cytoplasmic regions in each image block. The probability of new necrosis in each image block is analyzed, and necrotic blocks are selected for segmentation.
[0005] Furthermore, the method for obtaining the cytoplasmic region, the nuclear region, and the lipid-mucus region includes: The pixel values of the pixels in the pathological image are mapped to the RGB space, and K-means clustering is performed on all pixels to obtain multiple pixel clusters in the RGB space of the pathological image; If the central pixel of a pixel cluster has the largest red channel component value, the region formed by the pixels in the corresponding pixel cluster is taken as the cytoplasm region; if the central pixel of a pixel cluster has the largest blue channel component value, the region formed by the pixels in the corresponding pixel cluster is taken as the nucleus region; and the region formed by the pixels in the corresponding pixel cluster is taken as the lipid / mucus region.
[0006] Furthermore, the method for obtaining the necrosis probability includes: Obtain the mean value of the red channel and the mean value of the blue channel of each pixel in the RGB space for each image block; The number of pixels in the cytoplasm region is divided by the total number of pixels in the cytoplasm and nucleus regions, and this is used as the red weight. The first anomaly probability is obtained based on the red weight, the mean of the red channel, and the mean of the blue channel. The second anomaly probability of each image block is obtained based on the number of pixels in all cell nucleus regions, the number of cell nucleus regions, and the length and width difference of the minimum outer rectangle corresponding to each cell nucleus region. The number of cell nucleus regions and the length and width difference of the minimum outer rectangle are both positively correlated with the second anomaly probability, while the number of pixels is negatively correlated with the second anomaly probability. Obtain the product between the first and second abnormal probabilities and perform a normalized mapping to obtain the necrosis probability.
[0007] Furthermore, the method for obtaining the first anomaly probability includes: Calculate the difference between the positive integer 1 and the red weight, and use that as the blue weight; Obtain the first product of the red weight and the red channel mean, obtain the second product of the blue weight and the blue channel mean, and obtain the sum of the first and second products as the first anomaly probability.
[0008] Furthermore, the method for obtaining the second anomaly probability includes: Calculate the ratio of the number of pixels in all cell nucleus regions to the number of cell nucleus regions, and perform a negative correlation mapping as a weighting coefficient; Calculate the difference between the aspect ratio of the smallest outer rectangle corresponding to each nucleus region and the positive integer 1, and obtain the mean difference of all nucleus regions as the morphological abnormality coefficient; The product of the weighting coefficient and the morphological anomaly coefficient is obtained as the second anomaly probability.
[0009] Furthermore, the method for obtaining the offset of the cluster center includes: Obtain the mean of the three-dimensional channel vectors of all pixels in different regions in RGB space, and use it as the channel vector mean. The relative distance between the mean channel vectors of the cytoplasmic region and other regions is obtained as the color difference between the cytoplasmic region and other regions. The ratio between the preset fixed pixel step size and the color difference is obtained and used as the offset of the cytoplasmic region relative to other regions in the RGB space as the cluster center.
[0010] Furthermore, the method for obtaining the new cluster centers corresponding to the cytoplasmic regions includes: In the RGB space, the offset of the cluster center between the cytoplasmic region and the lipid mucus region is weighted according to the necrosis probability of each image block to obtain the corrected offset of the cluster center between the cytoplasmic region and the lipid mucus region. The corrected offset of the cluster center between the cytoplasm region and the lipid / mucus region and the offset of the cluster center between the cytoplasm region and the nucleus region are vectored together to form the deviation vector of the corresponding cluster center of the cytoplasm region from the overall value. The position of the corresponding cluster center of the cytoplasm region is updated based on the deviation vector of the overall value and used as the new cluster center.
[0011] Furthermore, the method for obtaining the necrotic blocks includes: If the probability of necrosis of an image block is greater than or equal to a preset necrosis threshold, the corresponding image block will be designated as a necrosis block.
[0012] Furthermore, the preset number of iterations is 20.
[0013] Furthermore, the preset necrosis threshold is 0.5.
[0014] The present invention has the following beneficial effects: This invention clusters all pixels in pathological images based on their color characteristics to obtain cytoplasmic, nuclear, and lipid / mucus regions. Unsupervised preliminary partitioning is achieved using color differences for rapid coarse segmentation. Multiple image blocks are obtained from the pathological image. Based on the pixel value distribution and morphological characteristics of different regions within each image block, the necrosis probability of each block is determined. Independent analysis of the pixel distribution and morphology of each block helps quantify the degree of cellular abnormality within the image block. For any image block, based on the pixel value distribution of different regions and a preset fixed pixel step size, the offset of the cytoplasmic region relative to other regions in RGB space is obtained. The fixed step size is adjusted using color difference to reduce... This invention achieves less over-segmentation by using the offset of the cytoplasmic region relative to other regions in the RGB space and the probability of necrosis to obtain new cluster centers for the cytoplasmic region in each image block. It iterative clustering of all pixels is performed until a preset number of iterations is reached to obtain optimized cluster centers for the cytoplasmic region, reducing the probability of misclassification of cytoplasm. Clustering is then performed based on the optimized cluster centers for the cytoplasmic region in each image block, and the new probability of necrosis in each image block is analyzed. Necrotic blocks are selected for segmentation, and the cluster centers are dynamically adjusted to adapt to the differences in necrosis characteristics of different tissue types, thus improving the segmentation accuracy of tumor necrosis regions. This invention improves segmentation accuracy by adaptively and dynamically adjusting the cluster centers in the clustering algorithm. Attached Figure Description
[0015] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 A flowchart illustrating an automatic segmentation method for necrotic regions in pathological images of gastrointestinal tumors, provided as an embodiment of the present invention. Figure 2 A flowchart illustrating a method for obtaining necrosis probability according to an embodiment of the present invention; Figure 3 This is a schematic diagram illustrating a cluster center update according to an embodiment of the present invention. Detailed Implementation
[0017] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of an automatic segmentation method for necrotic regions in pathological images of digestive tract tumors according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0018] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0019] The following describes in detail, with reference to the accompanying drawings, a specific scheme for an automatic segmentation method for necrotic regions in pathological images of digestive tract tumors provided by the present invention.
[0020] Please see Figure 1 The diagram illustrates a flowchart of an automatic segmentation method for necrotic regions in pathological images of gastrointestinal tumors according to an embodiment of the present invention. The specific method includes: Step S1: Obtain hematoxylin-eosin stained pathological images of gastrointestinal tumors.
[0021] In an embodiment of the present invention, to avoid the intermingling of cytoplasm and fatty mucus tissue, the stained pathological images are analyzed and processed. First, after surgery, patients with gastrointestinal malignant tumors are immediately fixed with 10% neutral buffered formalin for 24 to 48 hours. The specimens are dehydrated with graded ethanol, cleared with xylene, embedded in paraffin, and paraffin tissue blocks are prepared. 4-5 μm thick sections are prepared using a microtome, mounted on glass slides, and stained with hematoxylin-eosin (H&E) to make the cell nuclei appear blue and the cytoplasm pink to dark red. The stained slides are loaded onto a scanning platform, and the system executes an automatic focusing algorithm to ensure image clarity. A full-slide scan is completed using multi-field image acquisition and stitching technology, ultimately generating a standard full-field digital pathological image; that is, obtaining hematoxylin-eosin stained pathological images of gastrointestinal tumors.
[0022] It should be noted that after acquiring the pathological image, in the RGB space, each pixel corresponds to a three-dimensional channel vector (R,G,B). In order to eliminate the influence of uneven lighting and differences in staining batches on clustering, the pixel value of each channel is normalized to the range of [0,1]. The specific means are well known to those skilled in the art and will not be described in detail here.
[0023] Step S2: Based on the color characteristics of pixels in the pathological image, cluster all pixels to obtain the cytoplasmic region, the nucleus region, and the fat and mucus region; obtain multiple image blocks of the pathological image, and obtain the necrosis probability of each image block based on the pixel value distribution of different pixels in each image block and the morphological characteristics of different regions.
[0024] Hematoxylin-eosin staining can make the cell nucleus appear blue and the cytoplasm appear pink to dark red. After staining, the tissue section appears in three colors: red, blue and white. Similar regions on the image can be preliminarily classified by the color features of the pixels. Therefore, based on the color features of the pixels in the pathological image, all pixels are clustered to obtain the cytoplasmic region, the cell nucleus region and the lipid mucus region.
[0025] Preferably, in one embodiment of the present invention, the method for obtaining the cytoplasmic region, the nucleus region, and the lipid mucus region includes: The pixel values of the pixels in the pathological image are mapped to the RGB space, and K-means clustering is performed on all pixels to obtain multiple pixel clusters in the RGB space of the pathological image; If the central pixel of a pixel cluster has the largest red channel component value, the region formed by the pixels in the corresponding pixel cluster is taken as the cytoplasm region; if the central pixel of a pixel cluster has the largest blue channel component value, the region formed by the pixels in the corresponding pixel cluster is taken as the nucleus region; and the region formed by the pixels in the corresponding pixel cluster is taken as the lipid / mucus region.
[0026] It should be noted that the K-means clustering algorithm is used to cluster similar structures into one class, automatically classifying tissues belonging to different types. Considering that hematoxylin-eosin staining produces red, blue, and white tissue sections, in this embodiment of the invention, K is set to 3, resulting in 3 clusters and 3 color regions; the red region represents the cytoplasm, the blue region represents the nucleus, and the white region represents lipids and mucus. The specific methods used are well-known to those skilled in the art and will not be elaborated upon here.
[0027] To facilitate targeted local processing of images and obtain multiple image blocks of the pathological image, it should be noted that, considering that the average cell diameter is equivalent to 80 pixels in the image, in one embodiment of the present invention, the size of the image block is a range of 256×256 to cover multiple cell regions; in other embodiments of the present invention, the size of the block can be set according to specific circumstances, and will not be limited or elaborated here.
[0028] In tumor necrosis areas, cell nuclei exhibit condensation, fragmentation, and dissolution, resulting in numerous irregularly shaped fragments. Simultaneously, the cytoplasm becomes more eosinophilic, absorbing more eosin dye. Therefore, the eosinophilic cytoplasm produces a vivid pink and light red color. Nucleus condensation, fragmentation, and dissolution lead to deeper nuclear staining and the division into multiple irregularly shaped fragments. Therefore, based on the pixel value distribution of different pixels within each image block and the morphological characteristics of different regions, the necrosis probability of each image block is obtained.
[0029] Preferably, in one embodiment of the present invention, the method for obtaining the necrosis probability is described in [reference needed]. Figure 2 It shows a flowchart of a method for obtaining the probability of necrosis, including: Step S201: Obtain the mean value of the red channel and the mean value of the blue channel of each pixel in the RGB space for each image block.
[0030] In areas of cell necrosis, the shrinkage of the cell nucleus increases the density of nuclear staining, thus deepening the blue staining intensity. Furthermore, the increased eosinophilicity of the cytoplasm also leads to deeper cytoplasmic staining, increasing the pink staining intensity. Therefore, by quantifying the overall intensity of the red and blue channels in the image blocks using the mean, the greater the intensity, the greater the likelihood of necrosis.
[0031] Step S202: Obtain the ratio of the number of pixels in the cytoplasm region to the total number of pixels in the cytoplasm region and the nucleus region, and use this as the red weight; obtain the first anomaly probability based on the red weight, the mean of the red channel, and the mean of the blue channel.
[0032] The red weights reflect the proportion of cytoplasmic regions in the image blocks; the larger the proportion, the more likely necrosis is to occur.
[0033] It should be noted that, in one embodiment of the present invention, the method for obtaining the first anomaly probability includes: Calculate the difference between the positive integer 1 and the red weight, and use that as the blue weight; Obtain the first product of the red weight and the red channel mean, obtain the second product of the blue weight and the blue channel mean, and obtain the sum of the first and second products as the first anomaly probability.
[0034] Step S203: Based on the number of pixels in all cell nucleus regions, the number of cell nucleus regions, and the length and width difference of the minimum outer rectangle corresponding to each cell nucleus region, obtain the second anomaly probability of each image block. The number of cell nucleus regions and the length and width difference of the minimum outer rectangle are both positively correlated with the second anomaly probability, while the number of pixels is negatively correlated with the second anomaly probability.
[0035] It should be noted that in areas of cell necrosis, the cell nucleus undergoes nuclear shrinkage or division, resulting in a generally smaller area of the cell nucleus within the segment compared to the area of the cell nucleus in the active region. Therefore, the fewer pixels and the smaller the area within the cell nucleus, the more likely necrosis has occurred. The number of pixels in all cell nucleus regions is calculated as a ratio to the total number of cell nucleus regions, and the reciprocal is used for a negative correlation mapping, which serves as a weighting coefficient. The formula is expressed as follows: ,in, Indicates the number of regions in the cell nucleus. This represents the number of pixels in all cell nucleus regions; the smaller the number of pixels, the larger the number of cell nucleus regions, the more likely cell division will occur, and the smaller the cell nucleus area, the greater the probability of the second abnormality. Under normal circumstances, cells are evenly distributed with similar length and width. The difference in length and width of the smallest outer rectangle corresponding to each nucleus region reflects the morphological characteristics of the nucleus region. The greater the difference, the greater the morphological change, the more uneven the cell distribution, and the more likely necrosis may occur. The difference between the length-to-width ratio and a positive integer 1 reflects the difference between length and width. The greater the difference between the length-to-width ratio and a positive integer 1, the more the length-to-width ratio deviates from 1, the more inconsistent the length and width, and the greater the difference. The morphological characteristics of all nucleus regions are quantified by calculating the mean, which is used as a morphological abnormality coefficient. The formula is expressed as: ,in, Indicates the first The length of the smallest outer rectangle corresponds to each cell nucleus region; Indicates the first The width of the smallest outer rectangle corresponds to each cell nucleus region; Indicates the number of regions in the cell nucleus; This indicates that the absolute value is taken; that is, the greater the difference in length and width, the larger the result, the more abnormal the morphology of the cell nucleus region, and the greater the probability of the second anomaly. Therefore, the above weighting coefficient and morphological anomaly coefficient are multiplied together to obtain the probability of the second anomaly; the number of cell nucleus regions and the difference in length and width of the smallest outer rectangle are both positively correlated with the probability of the second anomaly, while the number of pixels is negatively correlated with the probability of the second anomaly.
[0036] Step S204: Obtain the product between the first abnormal probability and the second abnormal probability, and perform normalization mapping as the necrosis probability.
[0037] It should be noted that, in the embodiments of the present invention, normalization can be performed by linear normalization or a normalization function. The specific means are well known to those skilled in the art and will not be described in detail here.
[0038] Step S3: For any image block, based on the pixel value distribution of different regions and the preset fixed pixel step size, obtain the offset of the cytoplasmic region relative to other regions in the RGB space as the cluster center; based on the offset of the cytoplasmic region relative to other regions in the RGB space of each image block and the necrosis probability, obtain the new cluster center corresponding to the cytoplasmic region in each image block; perform iterative clustering on all pixels until the preset number of iterations is reached to obtain the optimized cluster center of the cytoplasmic region.
[0039] In necrotic regions, cell membrane boundaries are unclear, making it easy to separate cytoplasm into lipid and mucus. Therefore, dynamic offsetting is required, moving the cytoplasmic center away from easily confused areas. Regions with large overall color differences need to move smaller distances, while regions with small overall color differences need to move larger distances. A preset fixed pixel step size controls the pixel migration speed, avoiding excessively large or small steps, which helps adjust the cluster center. For any image block, based on the pixel value distribution of different regions and the preset fixed pixel step size, the offset of the cytoplasmic region relative to other regions in RGB space is obtained.
[0040] Preferably, in one embodiment of the present invention, the method for obtaining the offset of the cluster center includes: Obtain the mean of the three-dimensional channel vectors of all pixels in different regions in RGB space, and use it as the channel vector mean. The relative distance between the channel vectors of the cytoplasmic region and other regions is obtained as the color difference between the cytoplasmic region and other regions. The relative distance is calculated by Euclidean distance or Manhattan distance. The specific methods are well known to those skilled in the art and will not be described in detail here.
[0041] The ratio between the preset fixed pixel step size and the color difference is obtained and used as the offset of the cytoplasmic region relative to other regions in the RGB space as the cluster center.
[0042] It should be noted that the cluster center reflects the representative color obtained after clustering analysis of the pixel colors in the cytoplasm. It is the representative point of the feature space obtained after the iteration of the K-means algorithm, and represents the average value of the three-dimensional channel vector of all cytoplasmic region pixels.
[0043] It should be noted that, in order to avoid the cytoplasmic region corresponding to the cluster center shifting too much or too little during a single migration, in one embodiment of the present invention, the preset fixed pixel step size is 0.01; in other embodiments of the present invention, the size of the preset fixed pixel step size can be set according to specific circumstances, which will not be elaborated here.
[0044] The higher the probability of necrosis, the more likely pixels in the cytoplasm region are to be classified as lipid mucus regions. This necessitates correcting the distance between corresponding regions. A higher probability of necrosis also requires greater adjustment to the offset, necessitating more precise cluster centers to avoid misclassification of pixels with similar colors. Based on the offset of the cytoplasm region relative to other regions in the RGB space for each image block, and the probability of necrosis, a new cluster center corresponding to the cytoplasm region in each image block is obtained. Iterative clustering is performed on all pixels until a preset number of iterations is reached, resulting in optimized cluster centers for the cytoplasm region.
[0045] Preferably, in one embodiment of the present invention, the method for obtaining new cluster centers corresponding to cytoplasmic regions includes: In the RGB space, the offset of the cluster center between the cytoplasmic region and the lipid mucus region is weighted according to the necrosis probability of each image block to obtain the corrected offset of the cluster center between the cytoplasmic region and the lipid mucus region. The corrected offset of the cluster center between the cytoplasm region and the lipid / mucus region and the offset of the cluster center between the cytoplasm region and the nucleus region are vectored together to form the deviation vector of the corresponding cluster center of the cytoplasm region from the overall value. The position of the corresponding cluster center of the cytoplasm region is updated based on the deviation vector of the overall value and used as the new cluster center.
[0046] It should be noted that the displacement of the shift correction from the corresponding cluster center of the cytoplasmic region to the corresponding cluster center of the lipid / mucus region is used as the first shift vector; the displacement of the shift correction from the corresponding cluster center of the cytoplasmic region to the corresponding cluster center of the nucleus region is used as the second shift vector. The first and second shift vectors are added together to obtain the overall shift vector; the sum of the overall shift vector and the corresponding cluster center of the cytoplasmic region is calculated, which updates the position of the corresponding cluster center of the cytoplasmic region and serves as the new cluster center.
[0047] Based on this, such as Figure 3 It illustrates a schematic diagram of cluster center updates, where, in the RGB space, This indicates that the cell nucleus region corresponds to the cluster center. This indicates that the cytoplasmic regions correspond to cluster centers. This indicates that the cluster centers correspond to fatty mucus, and the cluster centers correspond to cytoplasmic regions. Cluster centers corresponding to the cell nucleus region Direction, displacement of the migration offset from the corresponding cluster center in the cytoplasmic region. This yields the second offset vector; along the cluster centers corresponding to the cytoplasmic regions... Cluster centers corresponding to fatty mucus regions Direction, displacement of the offset corrected from the corresponding cluster center in the cytoplasmic region. The first offset vector is obtained, and the cluster centers corresponding to the cytoplasmic regions are obtained by merging them. Pointing to new cluster centers The vector.
[0048] Based on this, K-means clustering is performed again on the pixels based on the new cluster centers corresponding to the cytoplasmic regions, thereby calculating the new necrosis probability and offset for each iteration, analyzing and obtaining new cluster centers, and repeating the iteration for a preset number of times. In the embodiment of the present invention, the preset number of iterations is 20, and the new cluster centers obtained after the last iteration are used as the optimized cluster centers for subsequent clustering of the cytoplasmic regions.
[0049] Step S4: Cluster the images according to the optimized cluster centers corresponding to the cytoplasmic regions in each image block, analyze the new necrosis probability of each image block, and select the necrotic blocks for segmentation.
[0050] Based on the optimized cluster centers corresponding to the cytoplasmic regions, the pixels are re-clustered using K-means. The necrosis probability of each image block is obtained according to the necrosis probability acquisition method in step S2, and subsequent necrosis block screening and segmentation are performed.
[0051] Preferably, in one embodiment of the present invention, the method for obtaining necrotic blocks includes: If the probability of necrosis of an image block is greater than or equal to a preset necrosis threshold, the corresponding image block will be designated as a necrosis block.
[0052] It should be noted that in one embodiment of the present invention, the preset necrosis threshold is 0.5. In other embodiments of the present invention, the preset necrosis threshold can be set according to specific circumstances, and will not be limited or elaborated here.
[0053] Based on this, all necrotic blocks in the stained pathological images were screened out, and all necrotic blocks were combined. That is, the necrotic blocks were subjected to binary masking, with a binary value of 1 representing the necrotic area and 0 representing other areas. Through morphological operations, small holes were filled and adjacent necrotic blocks were connected to form necrotic areas for segmentation. This avoids confusion between the cytoplasm and lipid mucus in the tumor necrotic area and improves the segmentation accuracy of the tumor necrotic area. The specific methods are well known to those skilled in the art and will not be described in detail here.
[0054] In summary, this invention clusters all pixels in a pathological image based on their color characteristics to obtain cytoplasmic, nuclear, and lipid / mucus regions. It then obtains multiple image blocks from the pathological image and, based on the pixel value distribution and morphological features of different regions within each block, determines the necrosis probability of that block. For any given image block, based on the pixel value distribution and a preset fixed pixel step size, it obtains the offset of the cytoplasmic region's cluster center relative to other regions in the RGB space. Based on this offset and the necrosis probability, it obtains a new cluster center for the cytoplasmic region in each block. It iterative clustering is performed on all pixels until a preset number of iterations is reached to obtain optimized cluster centers for the cytoplasmic region. Clustering is then performed based on these optimized cluster centers, and the new necrosis probability of each block is analyzed to select necrotic blocks for segmentation. This invention improves segmentation accuracy by adaptively and dynamically adjusting the cluster centers in the clustering algorithm.
[0055] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0056] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
Claims
1. A method for automatic segmentation of necrotic regions in pathological images of gastrointestinal tumors, characterized in that, The method includes: Obtaining hematoxylin-eosin stained pathological images of gastrointestinal tumors; Based on the color characteristics of pixels in the pathological image, all pixels are clustered to obtain the cytoplasmic region, the nucleus region, and the fat and mucus region; multiple image blocks of the pathological image are obtained, and the necrosis probability of each image block is obtained based on the pixel value distribution of different pixels in each image block and the morphological characteristics of different regions. For any image block, based on the pixel value distribution of different regions and the preset fixed pixel step size, the offset of the cytoplasmic region relative to other regions in the RGB space is obtained; based on the offset of the cytoplasmic region relative to other regions in the RGB space of each image block and the necrosis probability, the new cluster center corresponding to the cytoplasmic region in each image block is obtained; all pixels are iteratively clustered until the preset number of iterations is reached to obtain the optimized cluster center of the cytoplasmic region; Clustering is performed based on the optimized cluster centers corresponding to the cytoplasmic regions in each image block. The probability of new necrosis in each image block is analyzed, and necrotic blocks are selected for segmentation.
2. The method for automatic segmentation of necrotic regions in pathological images of digestive tract tumors according to claim 1, characterized in that, The methods for obtaining the cytoplasmic region, the nuclear region, and the lipid / mucus region include: The pixel values of the pixels in the pathological image are mapped to the RGB space, and K-means clustering is performed on all pixels to obtain multiple pixel clusters in the RGB space of the pathological image; If the central pixel of a pixel cluster has the largest red channel component value, the region formed by the pixels in the corresponding pixel cluster is taken as the cytoplasm region; if the central pixel of a pixel cluster has the largest blue channel component value, the region formed by the pixels in the corresponding pixel cluster is taken as the nucleus region; and the region formed by the pixels in the corresponding pixel cluster is taken as the lipid / mucus region.
3. The method for automatic segmentation of necrotic regions in pathological images of digestive tract tumors according to claim 1, characterized in that, The method for obtaining the necrosis probability includes: Obtain the mean value of the red channel and the mean value of the blue channel of each pixel in the RGB space for each image block; The number of pixels in the cytoplasm region is divided by the total number of pixels in the cytoplasm and nucleus regions, and this is used as the red weight. The first anomaly probability is obtained based on the red weight, the mean of the red channel, and the mean of the blue channel. The second anomaly probability of each image block is obtained based on the number of pixels in all cell nucleus regions, the number of cell nucleus regions, and the length and width difference of the minimum outer rectangle corresponding to each cell nucleus region. The number of cell nucleus regions and the length and width difference of the minimum outer rectangle are both positively correlated with the second anomaly probability, while the number of pixels is negatively correlated with the second anomaly probability. Obtain the product between the first and second abnormal probabilities and perform a normalized mapping to obtain the necrosis probability.
4. The method for automatic segmentation of necrotic regions in pathological images of digestive tract tumors according to claim 3, characterized in that, The method for obtaining the first anomaly probability includes: Calculate the difference between the positive integer 1 and the red weight, and use that as the blue weight; Obtain the first product of the red weight and the red channel mean, obtain the second product of the blue weight and the blue channel mean, and obtain the sum of the first and second products as the first anomaly probability.
5. The method for automatic segmentation of necrotic regions in pathological images of digestive tract tumors according to claim 3, characterized in that, The methods for obtaining the second anomaly probability include: Calculate the ratio of the number of pixels in all cell nucleus regions to the number of cell nucleus regions, and perform a negative correlation mapping as a weighting coefficient; Calculate the difference between the aspect ratio of the smallest outer rectangle corresponding to each nucleus region and the positive integer 1, and obtain the mean difference of all nucleus regions as the morphological abnormality coefficient; The product of the weighting coefficient and the morphological anomaly coefficient is obtained as the second anomaly probability.
6. The method for automatic segmentation of necrotic regions in pathological images of digestive tract tumors according to claim 1, characterized in that, The method for obtaining the offset of the cluster center includes: Obtain the mean of the three-dimensional channel vectors of all pixels in different regions in RGB space, and use it as the channel vector mean. The relative distance between the mean channel vectors of the cytoplasmic region and other regions is obtained as the color difference between the cytoplasmic region and other regions. The ratio between the preset fixed pixel step size and the color difference is obtained and used as the offset of the cytoplasmic region relative to other regions in the RGB space as the cluster center.
7. The method for automatic segmentation of necrotic regions in pathological images of digestive tract tumors according to claim 1, characterized in that, The method for obtaining the new cluster centers corresponding to the cytoplasmic regions includes: In the RGB space, the offset of the cluster center between the cytoplasmic region and the lipid mucus region is weighted according to the necrosis probability of each image block to obtain the corrected offset of the cluster center between the cytoplasmic region and the lipid mucus region. The corrected offset of the cluster center between the cytoplasm region and the lipid / mucus region and the offset of the cluster center between the cytoplasm region and the nucleus region are vectored together to form the deviation vector of the corresponding cluster center of the cytoplasm region from the overall value. The position of the corresponding cluster center of the cytoplasm region is updated based on the deviation vector of the overall value and used as the new cluster center.
8. The method for automatic segmentation of necrotic regions in pathological images of digestive tract tumors according to claim 1, characterized in that, The method for obtaining the necrotic blocks includes: If the probability of necrosis of an image block is greater than or equal to a preset necrosis threshold, the corresponding image block will be designated as a necrosis block.
9. The method for automatic segmentation of necrotic regions in pathological images of digestive tract tumors according to claim 1, characterized in that, The preset number of iterations is 20.
10. The method for automatic segmentation of necrotic regions in pathological images of digestive tract tumors according to claim 8, characterized in that, The preset necrosis threshold is 0.5.