CN115272362A - Method and device for segmenting effective area of digital pathology full-field image - Google Patents
Method and device for segmenting effective area of digital pathology full-field image Download PDFInfo
- Publication number
- CN115272362A CN115272362A CN202210710971.XA CN202210710971A CN115272362A CN 115272362 A CN115272362 A CN 115272362A CN 202210710971 A CN202210710971 A CN 202210710971A CN 115272362 A CN115272362 A CN 115272362A
- Authority
- CN
- China
- Prior art keywords
- image
- tissue
- area
- processed
- thumbnail
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/04—Context-preserving transformations, e.g. by using an importance map
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/40—Image enhancement or restoration using histogram techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/70—Denoising; Smoothing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10024—Color image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10056—Microscopic image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20021—Dividing image into blocks, subimages or windows
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Analysis (AREA)
Abstract
Description
技术领域technical field
本申请涉及图像处理技术领域,特别是涉及一种数字病理全场图像有效区域分割方法、装置。The present application relates to the technical field of image processing, in particular to a method and a device for segmenting effective regions of digital pathological full-field images.
背景技术Background technique
随着数字病理全场图像扫描技术的发展,出现了数字扫描仪,将病理切片进行扫描成像,生成一个超过十亿像素级别的超高分辨率全场图文件。With the development of digital pathological full-field image scanning technology, digital scanners have emerged to scan pathological slices and generate an ultra-high-resolution full-field image file of more than one billion pixels.
目前对数字病理全场图像进行人工智能分析的主流做法是使用滑动窗口方法,将数字病理全场图像切分成几百上千个固定大小的小图片,然后将这些小图片一次送入到GPU中进行计算分析,最终将所有小图片的分析的结果进行统计和汇总,形成最终的数字病理全场图像的分析结果。At present, the mainstream method for artificial intelligence analysis of digital pathology full-field images is to use the sliding window method to divide digital pathology full-field images into hundreds or thousands of small pictures of fixed sizes, and then send these small pictures to the GPU at one time. Computational analysis is performed, and finally the analysis results of all the small pictures are counted and summarized to form the final digital pathology full-field image analysis results.
然而,一张数字病理全场图像上存在大量的空白区域和无关区域。有效的组织区域可能只占到整张数字病理全场图像的十分之一甚至更少,直接对整张数字病理全场图像进行分析,不仅会浪费大量的分析时间和算力在无关的区域上,而且人工智能算法无法有效识别无关区域的杂质、染液或者是文字记号,这样也会干扰人工智能分析的准确性。However, there are a large number of blank areas and irrelevant areas on a digital pathology full-field image. The effective tissue area may only account for one-tenth or even less of the entire digital pathology full-field image. Directly analyzing the entire digital pathology full-field image will not only waste a lot of analysis time and computing power in irrelevant areas In addition, artificial intelligence algorithms cannot effectively identify impurities, dye solutions or text marks in irrelevant areas, which will also interfere with the accuracy of artificial intelligence analysis.
发明内容Contents of the invention
基于此,有必要针对上述技术问题,提供一种数字病理全场图像有效区域分割方法。Based on this, it is necessary to provide a method for segmenting effective regions of digital pathology full-field images for the above technical problems.
一种数字病理全场图像有效区域分割方法,所述方法包括:A digital pathological full-field image effective region segmentation method, the method comprising:
获取数字病理全场图像按照预设缩放比例处理的待处理组织缩略图像;Obtain the thumbnail image of the tissue to be processed processed by the digital pathology full-field image according to the preset zoom ratio;
去除待处理组织缩略图像上的噪声,得到组织效果图像;Remove the noise on the thumbnail image of the tissue to be processed to obtain the tissue effect image;
将组织效果图像转化为灰度图,并使用直方图均衡化算法增强灰度图像的对比度,得到组织增强图像;Convert the tissue effect image into a grayscale image, and use the histogram equalization algorithm to enhance the contrast of the grayscale image to obtain a tissue enhanced image;
对组织增强图像进行高斯模糊,并使用阈值法将图像转化为二值图像;Perform Gaussian blurring on the tissue-enhanced image, and convert the image into a binary image using a threshold method;
对二值图像按照前景和背景进行后处理优化,得到组织区域优化图像;Perform post-processing optimization on the binary image according to the foreground and background, and obtain the optimized image of the tissue area;
根据组织区域优化图像的灰度值梯度变化,确定目标区域的外围轮廓坐标,并根据预设缩放比例,将外围轮廓坐标转换至全场图坐标。According to the gray value gradient change of the optimized image of the tissue area, the peripheral contour coordinates of the target area are determined, and the peripheral contour coordinates are converted to the full-field map coordinates according to the preset scaling ratio.
在其中一个实施例中,获取数字病理全场图像按照预设缩放比例处理的待处理组织缩略图像,还包括:根据预设缩放比例,将数字病理全场图像缩放成待处理组织缩略图像。In one of the embodiments, acquiring the thumbnail image of the tissue to be processed processed by the digital pathology full-field image according to the preset zoom ratio further includes: scaling the digital pathology full-field image into the thumbnail image of the tissue to be processed according to the preset zoom ratio .
在其中一个实施例中,所述噪声包括文字噪声、阴影噪声和异物噪声;In one of the embodiments, the noise includes text noise, shadow noise and foreign object noise;
去除待处理组织缩略图像上的噪声,得到组织效果图像,包括:Remove the noise on the thumbnail image of the tissue to be processed, and obtain the tissue effect image, including:
将待处理组织缩略图像从RGB色彩空间转换为HSV色彩空间,得到HSV组织色彩图像;Convert the thumbnail image of the tissue to be processed from the RGB color space to the HSV color space to obtain the HSV tissue color image;
对HSV组织色彩图像中H的值和S的值均低于色彩阈值的像素点,将该像素点采用白色覆盖,得到组织效果图像。For the pixel in the HSV tissue color image whose H value and S value are both lower than the color threshold, the pixel is covered with white to obtain the tissue effect image.
在其中一个实施例中,使用直方图均衡化算法增强灰度图像的对比度,得到组织增强图像,包括:In one of the embodiments, a histogram equalization algorithm is used to enhance the contrast of the grayscale image to obtain a tissue enhanced image, including:
将灰度图像分割成预设数目的图像块;Divide the grayscale image into a preset number of image blocks;
对每个所述图像块使用直方图均衡化算法增强对比度后,再组合得到组织增强图像。After using a histogram equalization algorithm to enhance the contrast of each of the image blocks, they are combined to obtain a tissue-enhanced image.
在其中一个实施例中,对生成的二值图像进行后处理优化,还包括:对二值图像采用形态学闭操作去除前景区域中的空洞,并采用形态学开操作去除前景区域外的零碎目标;其中,前景区域为有效的组织或细胞区域,零碎目标包括零碎前景区域和零碎错误区域。In one of the embodiments, performing post-processing optimization on the generated binary image further includes: using a morphological closing operation on the binary image to remove holes in the foreground area, and using a morphological opening operation to remove fragmented objects outside the foreground area ; Among them, the foreground area is an effective tissue or cell area, and the fragmented target includes a fragmented foreground area and a fragmented error area.
上述生成的二值图像中,前景为有效的组织或细胞区域,背景则为无关区域。在生成的原始二值图像中,存在部分在有效区域内的零碎背景空洞,以及部分在组织区域外的零碎前景区域,这些零碎的错误位置需要通过后处理优化来去掉。在本发明中,对原始二值图像采用了形态学闭操作来去除前景区域中的空洞,使用形态学开操作来去除游离于大片前景区域外的零碎目标。在去除这些错误后,再对二值图像的前景进行一定的膨胀处理,使得前景的范围可以完全包括有效的组织或细胞区域。根据二值图的灰度值梯度变化,求出前景的边缘轮廓坐标,再乘以第一步的缩放比例,得到有效区域在全场图原图上的轮廓坐标。In the binary image generated above, the foreground is an effective tissue or cell area, and the background is an irrelevant area. In the generated original binary image, there are fragmentary background holes in the effective area and fragmentary foreground areas outside the tissue area. These fragmentary error positions need to be removed by post-processing optimization. In the present invention, the morphological closing operation is used for the original binary image to remove the holes in the foreground area, and the morphological opening operation is used to remove the fragmented objects outside the large foreground area. After these errors are removed, the foreground of the binary image is expanded to a certain extent, so that the range of the foreground can completely include the effective tissue or cell area. According to the gradient change of the gray value of the binary image, the edge contour coordinates of the foreground are obtained, and then multiplied by the scaling ratio of the first step to obtain the contour coordinates of the effective area on the original image of the full-field image.
一种数字病理全场图像有效区域分割装置,所述装置包括:A digital pathology full-field image effective area segmentation device, said device comprising:
缩略图获取模块,用于获取数字病理全场图像按照预设缩放比例处理的待处理组织缩略图像;A thumbnail image acquisition module, configured to acquire a thumbnail image of the tissue to be processed processed by the digital pathology full-field image according to a preset scaling ratio;
噪声处理模块,用于去除待处理组织缩略图像上的噪声,得到组织效果图像;The noise processing module is used to remove the noise on the thumbnail image of the tissue to be processed to obtain the tissue effect image;
对比度增强模块,用于将组织效果图像转化为灰度图,并使用直方图均衡化算法增强灰度图像的对比度,得到组织增强图像;The contrast enhancement module is used to convert the tissue effect image into a grayscale image, and uses a histogram equalization algorithm to enhance the contrast of the grayscale image to obtain a tissue enhanced image;
二值图像转化模块,用于对组织增强图像进行高斯模糊,并使用阈值法将图像转化为二值图像;The binary image conversion module is used to perform Gaussian blur on the tissue enhanced image, and convert the image into a binary image using a threshold method;
后处理模块,用于对二值图像按照前景和背景进行后处理优化,得到组织区域优化图像;The post-processing module is used to perform post-processing optimization on the binary image according to the foreground and background to obtain an optimized image of the tissue region;
轮廓坐标计算模块,用于根据组织区域优化图像的灰度值梯度变化,确定目标区域的外围轮廓坐标,并根据预设缩放比例,将外围轮廓坐标转换至全场图坐标。The contour coordinate calculation module is used to optimize the gray value gradient change of the image according to the tissue area, determine the peripheral contour coordinates of the target area, and convert the peripheral contour coordinates to the full field map coordinates according to the preset scaling ratio.
一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现以下步骤:A computer device, comprising a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
获取数字病理全场图像按照预设缩放比例处理的待处理组织缩略图像;Obtain the thumbnail image of the tissue to be processed processed by the digital pathology full-field image according to the preset zoom ratio;
去除待处理组织缩略图像上的噪声,得到组织效果图像;Remove the noise on the thumbnail image of the tissue to be processed to obtain the tissue effect image;
将组织效果图像转化为灰度图,并使用直方图均衡化算法增强灰度图像的对比度,得到组织增强图像;Convert the tissue effect image into a grayscale image, and use the histogram equalization algorithm to enhance the contrast of the grayscale image to obtain a tissue enhanced image;
对组织增强图像进行高斯模糊,并使用阈值法将图像转化为二值图像;Perform Gaussian blurring on the tissue-enhanced image, and convert the image into a binary image using a threshold method;
对二值图像按照前景和背景进行后处理优化,得到组织区域优化图像;Perform post-processing optimization on the binary image according to the foreground and background, and obtain the optimized image of the tissue area;
根据组织区域优化图像的灰度值梯度变化,确定目标区域的外围轮廓坐标,并根据预设缩放比例,将外围轮廓坐标转换至全场图坐标。According to the gray value gradient change of the optimized image of the tissue area, the peripheral contour coordinates of the target area are determined, and the peripheral contour coordinates are converted to the full-field map coordinates according to the preset scaling ratio.
一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现以下步骤:A computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
获取数字病理全场图像按照预设缩放比例处理的待处理组织缩略图像;Obtain the thumbnail image of the tissue to be processed processed by the digital pathology full-field image according to the preset zoom ratio;
去除待处理组织缩略图像上的噪声,得到组织效果图像;Remove the noise on the thumbnail image of the tissue to be processed to obtain the tissue effect image;
将组织效果图像转化为灰度图,并使用直方图均衡化算法增强灰度图像的对比度,得到组织增强图像;Convert the tissue effect image into a grayscale image, and use the histogram equalization algorithm to enhance the contrast of the grayscale image to obtain a tissue enhanced image;
对组织增强图像进行高斯模糊,并使用阈值法将图像转化为二值图像;Perform Gaussian blurring on the tissue-enhanced image, and convert the image into a binary image using a threshold method;
对二值图像按照前景和背景进行后处理优化,得到组织区域优化图像;Perform post-processing optimization on the binary image according to the foreground and background, and obtain the optimized image of the tissue area;
根据组织区域优化图像的灰度值梯度变化,确定目标区域的外围轮廓坐标,并根据预设缩放比例,将外围轮廓坐标转换至全场图坐标。According to the gray value gradient change of the optimized image of the tissue area, the peripheral contour coordinates of the target area are determined, and the peripheral contour coordinates are converted to the full-field map coordinates according to the preset scaling ratio.
上述一种数字病理全场图像有效区域分割方法、装置,通过对有效区域快速聚焦,可以快速定位分割出有效的组织或细胞区域,使得人工智能算法只对有效的区域进行分析,从而节省了大量的分析时间和算力,同时也提升了人工智能分析的鲁棒性和准确性。The above-mentioned method and device for segmenting effective areas of digital pathological full-field images can quickly locate and segment effective tissue or cell areas by quickly focusing on the effective areas, so that the artificial intelligence algorithm only analyzes the effective areas, thereby saving a lot of time. The analysis time and computing power are improved, and the robustness and accuracy of artificial intelligence analysis are also improved.
附图说明Description of drawings
图1为一个实施例中数字病理全场图像有效区域分割方法流程图;Fig. 1 is a flow chart of a method for segmenting an effective area of a digital pathological full-field image in an embodiment;
图2为一个实施例中处理效果示意图;Fig. 2 is a schematic diagram of processing effect in an embodiment;
图3为一个实施例中数字病理全场图像有效区域分割装置的结构示意图;Fig. 3 is a structural schematic diagram of an effective area segmentation device for a digital pathological full-field image in an embodiment;
图4为一个实施例中计算机设备的内部结构图。Figure 4 is an internal block diagram of a computer device in one embodiment.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solution and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application, and are not intended to limit the present application.
在一个实施例中,如图1所示,提供了一种数字病理全场图像有效区域分割方法,包括以下步骤:In one embodiment, as shown in Figure 1, a method for valid area segmentation of a digital pathological full-field image is provided, comprising the following steps:
步骤S110,获取数字病理全场图像按照预设缩放比例处理的待处理组织缩略图像。Step S110, acquiring the thumbnail image of the tissue to be processed processed according to the preset scaling ratio of the digital pathology full-field image.
其中,在数字病理全场图像上确定有效组织或是细胞区域,首先需要获得病理切片的全局视野。在染色和制片合格的切片上,即使是在较为低倍的视野下,也是可以明显区分出有效组织所在的区域的。在充分平衡低倍视野节省的计算时间和损失边缘精度的前提下,本发明获取的缩略图的放大倍率为0.625倍。得到缩略图后,将在缩略图上计算出的有效区域轮廓坐标根据缩放比例重新映射回全场图原图。在本发明中得到缩略图放大倍率为1.25倍,如若数字病理全场图是使用放大倍率为40倍的扫描仪扫描的,则缩放比例为40/0.625=64。可知缩略图的边长是全场图原图的六十四分之一。Among them, to determine the effective tissue or cell area on the digital pathological full-field image, it is first necessary to obtain the global view of the pathological section. On the stained and prepared slides, even in a relatively low-power field of view, the area where the effective tissue is located can be clearly distinguished. On the premise of fully balancing the calculation time saved by the low-magnification field of view and the loss of edge precision, the magnification of the thumbnail image acquired by the present invention is 0.625 times. After the thumbnail is obtained, the outline coordinates of the effective area calculated on the thumbnail are remapped back to the original full-field image according to the scaling ratio. In the present invention, the magnification of the thumbnail image is 1.25 times. If the digital pathological full-field image is scanned by a scanner with a magnification of 40 times, the zoom ratio is 40/0.625=64. It can be seen that the side length of the thumbnail image is one sixty-fourth of the original image of the full-field image.
步骤S120,去除待处理组织缩略图像上的噪声,得到组织效果图像。Step S120, removing noise on the thumbnail image of the tissue to be processed to obtain a tissue effect image.
其中,将缩略图由RGB(R:红,G:绿,B:蓝)色彩空间转换为HSV(H:色相,S:饱和度,V:明度)色彩空间,通过使用大量切片进行实验可以得知缩略图上的这些噪声的H和S通道的值明显要低于正常的组织区域,因此对H和S通道的值做阈值处理,当某个位置的H和S的值低于阈值时,便可以确定这个位置位于这些噪声干扰物上,接着将这些位置直接用白色进行覆盖,以达到去除噪声的效果。Among them, the thumbnail is converted from the RGB (R: red, G: green, B: blue) color space to the HSV (H: hue, S: saturation, V: lightness) color space, which can be obtained by using a large number of slices for experiments. It is known that the values of the H and S channels of these noises on the thumbnail are obviously lower than the normal tissue area, so the values of the H and S channels are thresholded. When the values of H and S at a certain position are lower than the threshold, It can be determined that this position is located on these noise interferers, and then these positions are directly covered with white to achieve the effect of removing noise.
步骤S130,将组织效果图像转化为灰度图,并使用直方图均衡化算法增强灰度图像的对比度,得到组织增强图像。Step S130, converting the tissue effect image into a grayscale image, and using a histogram equalization algorithm to enhance the contrast of the grayscale image to obtain a tissue enhanced image.
其中,针对部分染色较浅的切片设计。使用的是限制对比度的自适应直方图均衡化(CLAHE)方法实现的。此方法是将图像分割成大小相同的小块,再分别对每个小块进行直方图均衡化的。还可以通过限制对比度来防止噪点也被增强。Among them, it is designed for some lightly stained slices. This is achieved using the Contrast-Limited Adaptive Histogram Equalization (CLAHE) method. This method divides the image into small blocks of the same size, and then performs histogram equalization on each small block separately. It is also possible to prevent noise from being enhanced as well by limiting the contrast.
步骤S140,对组织增强图像进行高斯模糊,并使用阈值法将图像转化为二值图像。Step S140, performing Gaussian blurring on the enhanced tissue image, and converting the image into a binary image using a threshold method.
其中,先通过高斯滤波器对图像进行降噪处理,除了降噪还可以使组织的轮廓边缘更加平滑。接着将图像的灰度值归一化到[0 , 1]的区间内,设定阈值,使用阈值法,将图像进行二值化处理,灰度值高于阈值的区域为背景,灰度值低于阈值的区域为前景。Among them, the Gaussian filter is used to denoise the image first, in addition to denoising, it can also make the outline of the tissue smoother. Then normalize the gray value of the image to the interval [0, 1], set the threshold, and use the threshold method to binarize the image. The area whose gray value is higher than the threshold is the background, and the gray value Areas below the threshold are foreground.
步骤S150,对二值图像按照前景和背景进行后处理优化,得到组织区域优化图像。Step S150, perform post-processing optimization on the binary image according to foreground and background, to obtain an optimized tissue region image.
其中,生成的二值图像中,前景为有效的组织或细胞区域,背景则为无关区域。在生成的原始二值图像中,存在部分在有效区域内的零碎背景空洞,以及部分在组织区域外的零碎前景区域,这些零碎的错误位置需要通过后处理优化来去掉。在本发明中,对原始二值图像采用了形态学闭操作来去除前景区域中的空洞,使用形态学开操作来去除游离于大片前景区域外的零碎目标。在去除这些错误后,再对二值图像的前景进行一定的膨胀处理,使得前景的范围可以完全包括有效的组织或细胞区域。根据二值图的灰度值梯度变化,求出前景的边缘轮廓坐标,再乘以第一步的缩放比例,得到有效区域在全场图原图上的轮廓坐标。Among them, in the generated binary image, the foreground is an effective tissue or cell area, and the background is an irrelevant area. In the generated original binary image, there are fragmentary background holes in the effective area and fragmentary foreground areas outside the tissue area. These fragmentary error positions need to be removed by post-processing optimization. In the present invention, the morphological closing operation is used for the original binary image to remove the holes in the foreground area, and the morphological opening operation is used to remove the fragmented objects outside the large foreground area. After these errors are removed, the foreground of the binary image is expanded to a certain extent, so that the range of the foreground can completely include the effective tissue or cell area. According to the gradient change of the gray value of the binary image, the edge contour coordinates of the foreground are obtained, and then multiplied by the scaling ratio of the first step to obtain the contour coordinates of the effective area on the original image of the full-field image.
步骤S160,根据组织区域优化图像的灰度值梯度变化,确定目标区域的外围轮廓坐标,并根据预设缩放比例,将外围轮廓坐标转换至全场图坐标。Step S160, determine the peripheral contour coordinates of the target area according to the gradient change of the gray value of the optimized image of the tissue region, and convert the peripheral contour coordinates to the full-field image coordinates according to the preset scaling ratio.
其中,根据灰度值梯度变化确定目标区域的外轮廓坐标,可以采用Canny算子、Sobel算子、LOG算子或Laplacian算子进行边缘检测,得到目标区域的外轮廓坐标。Among them, the outer contour coordinates of the target area are determined according to the gradient change of the gray value, and Canny operator, Sobel operator, LOG operator or Laplacian operator can be used for edge detection to obtain the outer contour coordinates of the target area.
上述数字病理全场图像有效区域分割方法中,获取数字病理全场图像的缩略图像,并得到缩放比例;去除缩略图上的文字、阴影和异物等噪声;将缩略图转化为灰度图;使用直方图均衡化算法增强灰度图像的对比度;对对比度增强后的灰度图像进行高斯模糊后,使用阈值法将图像转化为二值图像;对生成的二值图像进行后处理优化;根据梯度确定有效区域的外围轮廓坐标,并根据第一步所获得的缩放比例,将坐标映射到全场图上,可以快速定位分割出有效的组织或细胞区域,使得人工智能算法只对有效的区域进行分析,从而节省了大量的分析时间和算力,同时也提升了人工智能分析的鲁棒性和准确性。In the effective area segmentation method of the digital pathology full-field image above, the thumbnail image of the digital pathology full-field image is obtained, and the zoom ratio is obtained; noises such as text, shadows and foreign objects on the thumbnail are removed; the thumbnail is converted into a grayscale image; Use the histogram equalization algorithm to enhance the contrast of the grayscale image; after performing Gaussian blur on the contrast-enhanced grayscale image, use the threshold method to convert the image into a binary image; optimize the post-processing of the generated binary image; according to the gradient Determine the outer contour coordinates of the effective area, and map the coordinates to the full-field map according to the scaling ratio obtained in the first step, which can quickly locate and segment effective tissue or cell areas, so that the artificial intelligence algorithm can only perform on the effective area. Analysis, which saves a lot of analysis time and computing power, and also improves the robustness and accuracy of artificial intelligence analysis.
在其中一个实施例中,所述获取数字病理全场图像按照预设缩放比例处理的待处理组织缩略图像,还包括:根据预设缩放比例,将数字病理全场图像缩放成待处理组织缩略图像。In one of the embodiments, the acquiring the thumbnail image of the tissue to be processed processed by the digital pathology full-field image according to the preset zoom ratio further includes: scaling the digital pathology full-field image into the thumbnail image of the tissue to be processed according to the preset zoom ratio. thumbnail image.
在其中一个实施例中,所述噪声包括文字噪声、阴影噪声和异物噪声。去除待处理组织缩略图像上的噪声,得到组织效果图像,还包括:将待处理组织缩略图像从RGB色彩空间转换为HSV色彩空间,得到HSV组织色彩图像;对HSV组织色彩图像中H的值和S的值均低于色彩阈值的像素点,将该像素点采用白色覆盖,得到组织效果图像。In one of the embodiments, the noise includes text noise, shadow noise and foreign object noise. The noise on the thumbnail image of the tissue to be processed is removed to obtain the tissue effect image, which also includes: converting the thumbnail image of the tissue to be processed from the RGB color space to the HSV color space to obtain the HSV tissue color image; the H in the HSV tissue color image The pixels whose value and S value are lower than the color threshold value are covered with white to obtain the tissue effect image.
在其中一个实施例中,使用直方图均衡化算法增强灰度图像的对比度,得到组织增强图像,还包括:将灰度图像分割成预设数目的图像块;对每个所述图像块使用直方图均衡化算法增强对比度后,再组合得到组织增强图像。In one of the embodiments, using a histogram equalization algorithm to enhance the contrast of the grayscale image to obtain a tissue enhanced image also includes: dividing the grayscale image into a preset number of image blocks; using a histogram for each of the image blocks After the image equalization algorithm enhances the contrast, it is combined to obtain a tissue-enhanced image.
在其中一个实施例中,对组织增强图像进行高斯模糊,并使用阈值法将图像转化为二值图像,还包括:对组织增强图像通过高斯滤波器处理,得到降噪二值图像;将降噪二值图像的灰度值归一化到[0 , 1]的区间内,并根据设定灰度阈值,将灰度值高于设定灰度阈值的区域作为背景区域,将灰度值低于或等于设定灰度阈值的区域作为前景区域,得到关于背景区域和前景区域的二值图像。In one of the embodiments, Gaussian blur is performed on the tissue-enhanced image, and the threshold method is used to convert the image into a binary image, which also includes: processing the tissue-enhanced image through a Gaussian filter to obtain a noise-reduced binary image; The grayscale value of the binary image is normalized to the interval [0, 1], and according to the set grayscale threshold, the area with a grayscale value higher than the set grayscale threshold is used as the background area, and the grayscale value is lower than that of the background area. The area equal to or equal to the set gray threshold is taken as the foreground area, and a binary image of the background area and the foreground area is obtained.
在其中一个实施例中,对生成的二值图像进行后处理优化,包括:对二值图像采用形态学闭操作去除前景区域中的空洞,并采用形态学开操作去除前景区域外的零碎目标;其中,前景区域为有效的组织或细胞区域,零碎目标包括零碎前景区域和零碎错误区域。In one of the embodiments, the post-processing optimization of the generated binary image includes: using a morphological closing operation on the binary image to remove holes in the foreground area, and using a morphological opening operation to remove fragmentary objects outside the foreground area; Wherein, the foreground area is a valid tissue or cell area, and the fragmented target includes a fragmented foreground area and a fragmented error area.
其中,如图2所示,生成的二值图像中,前景区域为有效的组织或细胞区域,如图2中有效区域,背景区域则为无关区域;在生成的二值图像中,存在部分在有前景区域内的零碎背景空洞,如图2中有效区域中的空洞;以及部分在大片组织区域外的零碎前景区域,零碎前景区域是指脱离大片组织区域的一些碎小的组织区域,这种区域为制片时不小心附带的组织碎片,如图2中染液杂质;还有零碎错误区域,零碎错误区域为图像中的杂质区域,比如杂质包括玻璃碎片、记号笔印记等,如图2中标记文字噪声和异物噪声,这些零碎目标需要通过后处理优化来去掉。在本发明中,对生成的二值图像采用了形态学闭操作来去除前景区域中的空洞,使用形态学开操作来去除游离于大片前景区域外的零碎目标。在去除这些错误后,再对二值图像的前景进行一定的膨胀处理,使得前景的范围可以完全包括有效的组织或细胞区域,根据二值图的灰度值梯度变化,求出前景的边缘轮廓坐标,再乘以第一步的缩放比例,得到有效区域在全场图原图上的轮廓坐标。Among them, as shown in Figure 2, in the generated binary image, the foreground area is an effective tissue or cell area, such as the effective area in Figure 2, and the background area is an irrelevant area; in the generated binary image, there are parts in There are fragmented background holes in the foreground area, such as the holes in the effective area in Figure 2; and fragmented foreground areas outside the large tissue area. The fragmented foreground area refers to some small tissue areas that are separated from the large tissue area. The area is the tissue fragments accidentally attached to the film, as shown in Figure 2. There are also fragmented error areas, which are the impurity areas in the image. For example, impurities include glass fragments, marker marks, etc., as shown in Figure 2. Marked text noise and foreign object noise, these fragmentary objects need to be removed through post-processing optimization. In the present invention, a morphological closing operation is used on the generated binary image to remove holes in the foreground area, and a morphological opening operation is used to remove fragmentary objects that are free from a large area of the foreground area. After removing these errors, the foreground of the binary image is expanded to a certain extent, so that the range of the foreground can completely include the effective tissue or cell area, and the edge contour of the foreground is calculated according to the gradient change of the gray value of the binary image Coordinates are multiplied by the scaling ratio of the first step to obtain the contour coordinates of the effective area on the original image of the full-field image.
本实施例中,对零碎目标过滤,能够有利于后期人工智能算法对有效区域的分析,提高处理效率。In this embodiment, the filtering of fragmented objects can facilitate the analysis of the effective area by the artificial intelligence algorithm in the later stage and improve the processing efficiency.
应该理解的是,虽然图1的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图1中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the various steps in the flow chart of FIG. 1 are displayed sequentially as indicated by the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least some of the steps in FIG. 1 may include multiple steps or stages, and these steps or stages may not necessarily be executed at the same time, but may be executed at different times, and the execution sequence of these steps or stages may also be It is not necessarily performed sequentially, but may be performed alternately or alternately with other steps or at least a part of steps or stages in other steps.
在一个实施例中,如图3所示,提供了一种数字病理全场图像有效区域分割装置,所述装置包括:缩略图获取模块310、噪声处理模块320、对比度增强模块330、二值图像转化模块340、后处理模块350和轮廓坐标计算模块360,其中:缩略图获取模块310,用于获取数字病理全场图像按照预设缩放比例处理的待处理组织缩略图像;噪声处理模块320,用于去除待处理组织缩略图像上的噪声声,得到组织效果图像;对比度增强模块330,用于将组织效果图像转化为灰度图,并使用直方图均衡化算法增强灰度图像的对比度,得到组织增强图像;二值图像转化模340,用于对组织增强图像进行高斯模糊,并使用阈值法将图像转化为二值图像;后处理模块350,用于对二值图像按照前景和背景进行后处理优化,得到组织区域优化图像;轮廓坐标计算模块360,用于根据组织区域优化图像的灰度值梯度变化,确定目标区域的外围轮廓坐标,并根据预设缩放比例,将外围轮廓坐标转换至全场图坐标。In one embodiment, as shown in FIG. 3 , a device for segmenting an effective area of a digital pathological full-field image is provided, and the device includes: a thumbnail image acquisition module 310, a noise processing module 320, a contrast enhancement module 330, a binary image The conversion module 340, the post-processing module 350 and the contour coordinate calculation module 360, wherein: the thumbnail image acquisition module 310 is used to acquire the thumbnail image of the tissue to be processed processed by the digital pathology full-field image according to the preset zoom ratio; the noise processing module 320, It is used to remove noise on the thumbnail image of the tissue to be processed to obtain a tissue effect image; the contrast enhancement module 330 is used to convert the tissue effect image into a grayscale image, and use a histogram equalization algorithm to enhance the contrast of the grayscale image, Obtain the enhanced tissue image; the binary image conversion module 340 is used to perform Gaussian blurring on the enhanced tissue image, and converts the image into a binary image using the threshold method; the post-processing module 350 is used to perform the binary image according to the foreground and background Post-processing optimization to obtain an optimized image of the tissue area; the contour coordinate calculation module 360 is used to determine the peripheral contour coordinates of the target area according to the gradient change of the gray value of the tissue region optimized image, and convert the peripheral contour coordinates according to the preset scaling ratio to full-field map coordinates.
在其中一个实施例中,所述缩略图获取模块310,还用于根据预设缩放比例,将数字病理全场图像缩放成待处理组织缩略图像。In one of the embodiments, the thumbnail
在其中一个实施例中,噪声处理模块320,包括:HSV组织色彩图像转换单元,用于将待处理组织缩略图像从RGB色彩空间转换为HSV色彩空间,得到HSV组织色彩图像;组织效果图像获取单元,用于对HSV组织色彩图像中H的值和S的值均低于色彩阈值的像素点,将该像素点采用白色覆盖,得到组织效果图像。In one of the embodiments, the
在其中一个实施例中,所述对比度增强模块330,包括:分割单元,用于将灰度图像分割成预设数目的图像块;对比度增强单元,用于对每个所述图像块使用直方图均衡化算法增强对比度后,再组合得到组织增强图像。In one of the embodiments, the contrast enhancement module 330 includes: a segmentation unit for dividing the grayscale image into a preset number of image blocks; a contrast enhancement unit for using a histogram for each of the image blocks After the equalization algorithm enhances the contrast, it is combined to obtain a tissue enhanced image.
在其中一个实施例中,二值图像转化模块340,包括:降噪单元,用于对组织增强图像通过高斯滤波器处理,得到降噪二值图像;二值图像转化单元,用于将降噪二值图像的灰度值归一化到[0 , 1]的区间内,并根据设定灰度阈值,将灰度值高于设定灰度阈值的区域作为背景区域,将灰度值低于或等于设定灰度阈值的区域作为前景区域,得到关于背景区域和前景区域的二值图像。In one of the embodiments, the binary
在其中一个实施例中,所述后处理模块350,还用于对二值图像采用形态学闭操作去除前景区域中的空洞,并采用形态学开操作去除前景区域外的零碎目标;其中,前景区域为有效的组织或细胞区域,零碎目标包括零碎前景区域和零碎错误区域。In one of the embodiments, the
关于数字病理全场图像快速分割有效区域的装置的具体限定可以参见上文中对于图像分割有效区域方法的限定,在此不再赘述。上述数字病理全场图像快速分割有效区域的装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图4所示。该计算机设备包括通过系统总线连接的处理器、存储器和网络接口。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于存储缩略图数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种快速有效的区域聚焦方法。For the specific limitations of the device for quickly segmenting the effective area of a digital pathological full-field image, please refer to the above-mentioned definition of the method for image segmentation effective area, which will not be repeated here. Each module in the above-mentioned device for quickly segmenting the effective area of the digital pathological full-field image can be realized in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, and can also be stored in the memory of the computer device in the form of software, so that the processor can invoke and execute the corresponding operations of the above-mentioned modules. In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure may be as shown in FIG. 4 . The computer device includes a processor, memory and a network interface connected by a system bus. Wherein, the processor of the computer device is used to provide calculation and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs and databases. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The computer device's database is used to store thumbnail data. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a fast and effective area focusing method is realized.
本领域技术人员可以理解,图4中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in Figure 4 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation to the computer equipment on which the solution of the application is applied. The specific computer equipment can be More or fewer components than shown in the figures may be included, or some components may be combined, or have a different arrangement of components.
在一个实施例中,还提供了一种计算机设备,包括存储器和处理器,存储器中存储有计算机程序,该处理器执行计算机程序时实现上述各方法实施例中的步骤。In one embodiment, there is also provided a computer device, including a memory and a processor, where a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现上述各方法实施例中的步骤。In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps in the foregoing method embodiments are implemented.
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined arbitrarily. To make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be It is considered to be within the range described in this specification.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only represent several implementation modes of the present application, and the description thereof is relatively specific and detailed, but it should not be construed as limiting the scope of the patent for the invention. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the scope of protection of the patent application should be based on the appended claims.
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210710971.XA CN115272362A (en) | 2022-06-22 | 2022-06-22 | Method and device for segmenting effective area of digital pathology full-field image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210710971.XA CN115272362A (en) | 2022-06-22 | 2022-06-22 | Method and device for segmenting effective area of digital pathology full-field image |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115272362A true CN115272362A (en) | 2022-11-01 |
Family
ID=83761557
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210710971.XA Pending CN115272362A (en) | 2022-06-22 | 2022-06-22 | Method and device for segmenting effective area of digital pathology full-field image |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115272362A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117333373A (en) * | 2023-12-01 | 2024-01-02 | 武汉宇微光学软件有限公司 | Curve polygon image scaling method, system and electronic equipment |
WO2024104388A1 (en) * | 2022-11-18 | 2024-05-23 | 杭州海康慧影科技有限公司 | Ultrasonic image processing method and apparatus, and electronic device and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109949906A (en) * | 2019-03-22 | 2019-06-28 | 上海鹰瞳医疗科技有限公司 | Pathological slice image processing and model training method and equipment |
CN112330688A (en) * | 2020-11-02 | 2021-02-05 | 腾讯科技(深圳)有限公司 | Image processing method and device based on artificial intelligence and computer equipment |
CN114359352A (en) * | 2022-01-07 | 2022-04-15 | 腾讯科技(深圳)有限公司 | Image processing method, apparatus, device, storage medium, and computer program product |
-
2022
- 2022-06-22 CN CN202210710971.XA patent/CN115272362A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109949906A (en) * | 2019-03-22 | 2019-06-28 | 上海鹰瞳医疗科技有限公司 | Pathological slice image processing and model training method and equipment |
CN112330688A (en) * | 2020-11-02 | 2021-02-05 | 腾讯科技(深圳)有限公司 | Image processing method and device based on artificial intelligence and computer equipment |
CN114359352A (en) * | 2022-01-07 | 2022-04-15 | 腾讯科技(深圳)有限公司 | Image processing method, apparatus, device, storage medium, and computer program product |
Non-Patent Citations (3)
Title |
---|
周越: "人工智能基础与进阶(Python编程)", vol. 2, 31 March 2022, 上海交通大学出版社, pages: 194 * |
崔吉 等: "工业视觉实用教程", vol. 1, 31 October 2018, 上海交通大学出版社, pages: 59 * |
黄少罗 等: "MATLAB 2020图形与图像处理从入门到精通", vol. 1, 28 February 2021, 机械工业出版社, pages: 225 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024104388A1 (en) * | 2022-11-18 | 2024-05-23 | 杭州海康慧影科技有限公司 | Ultrasonic image processing method and apparatus, and electronic device and storage medium |
CN117333373A (en) * | 2023-12-01 | 2024-01-02 | 武汉宇微光学软件有限公司 | Curve polygon image scaling method, system and electronic equipment |
CN117333373B (en) * | 2023-12-01 | 2024-02-23 | 武汉宇微光学软件有限公司 | Curve polygon image scaling method, system and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101795823B1 (en) | Text enhancement of a textual image undergoing optical character recognition | |
JP6100744B2 (en) | Color document image segmentation and binarization using automatic restoration | |
US11156564B2 (en) | Dirt detection on screen | |
JP2010525486A (en) | Image segmentation and image enhancement | |
CN110309806B (en) | A gesture recognition system and method based on video image processing | |
CN109214996B (en) | Image processing method and device | |
CN107038704B (en) | Retina image exudation area segmentation method and device and computing equipment | |
CN115205194B (en) | Image processing-based method, system and device for detecting coverage rate of armyworm plate | |
US11068740B2 (en) | Particle boundary identification | |
CN107123124B (en) | Retina image analysis method and device and computing equipment | |
CN115272362A (en) | Method and device for segmenting effective area of digital pathology full-field image | |
CN114283156A (en) | Method and device for removing document image color and handwriting | |
CN116681606A (en) | A method, system, device and medium for enhancing underwater uneven illumination images | |
CN114972209B (en) | Cervical pathology image processing method and device | |
CN111311610A (en) | Image segmentation method and terminal device | |
CN111445402A (en) | Image denoising method and device | |
CN110930358A (en) | Solar panel image processing method based on self-adaptive algorithm | |
Kiragu et al. | An improved enhancement of degraded binary text document images using morphological and single scale retinex operations | |
CN114596210A (en) | Noise estimation method, device, terminal equipment and computer readable storage medium | |
CN111415365B (en) | Image detection method and device | |
CN112381084A (en) | Automatic contour recognition method for tomographic image | |
CN112581411B (en) | Image defogging method and terminal | |
WO2024016791A1 (en) | Method and apparatus for processing graphic symbol, and computer-readable storage medium | |
Kaur et al. | Hand gesture image enhancement for improved recognition and subsequent analysis | |
CN111369491B (en) | Image stain detection method, device, system and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |