CN107705336B - A method for adjusting the coloring components of pathological images - Google Patents
A method for adjusting the coloring components of pathological images Download PDFInfo
- Publication number
- CN107705336B CN107705336B CN201710947445.4A CN201710947445A CN107705336B CN 107705336 B CN107705336 B CN 107705336B CN 201710947445 A CN201710947445 A CN 201710947445A CN 107705336 B CN107705336 B CN 107705336B
- Authority
- CN
- China
- Prior art keywords
- pathological
- dye
- channel
- dyeing
- saturation
- 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.)
- Active
Links
- 230000001575 pathological effect Effects 0.000 title claims abstract description 83
- 238000000034 method Methods 0.000 title claims abstract description 53
- 239000006103 coloring component Substances 0.000 title claims description 9
- 239000000975 dye Substances 0.000 claims abstract description 65
- 238000004043 dyeing Methods 0.000 claims abstract description 45
- 238000000926 separation method Methods 0.000 claims abstract description 11
- 238000003745 diagnosis Methods 0.000 claims abstract description 7
- 230000015572 biosynthetic process Effects 0.000 claims abstract description 4
- 238000003786 synthesis reaction Methods 0.000 claims abstract description 4
- 230000003287 optical effect Effects 0.000 claims description 29
- 238000010186 staining Methods 0.000 claims description 29
- 238000004040 coloring Methods 0.000 claims description 23
- 239000003086 colorant Substances 0.000 claims description 15
- 230000009466 transformation Effects 0.000 claims description 13
- WZUVPPKBWHMQCE-UHFFFAOYSA-N Haematoxylin Chemical group C12=CC(O)=C(O)C=C2CC2(O)C1C1=CC=C(O)C(O)=C1OC2 WZUVPPKBWHMQCE-UHFFFAOYSA-N 0.000 claims description 12
- 238000012937 correction Methods 0.000 claims description 12
- 239000011159 matrix material Substances 0.000 claims description 11
- 238000004364 calculation method Methods 0.000 claims description 10
- 238000013507 mapping Methods 0.000 claims description 7
- 238000002835 absorbance Methods 0.000 claims description 6
- YQGOJNYOYNNSMM-UHFFFAOYSA-N eosin Chemical compound [Na+].OC(=O)C1=CC=CC=C1C1=C2C=C(Br)C(=O)C(Br)=C2OC2=C(Br)C(O)=C(Br)C=C21 YQGOJNYOYNNSMM-UHFFFAOYSA-N 0.000 claims description 5
- 238000012360 testing method Methods 0.000 claims description 3
- SXEHKFHPFVVDIR-UHFFFAOYSA-N [4-(4-hydrazinylphenyl)phenyl]hydrazine Chemical compound C1=CC(NN)=CC=C1C1=CC=C(NN)C=C1 SXEHKFHPFVVDIR-UHFFFAOYSA-N 0.000 claims description 2
- 230000002708 enhancing effect Effects 0.000 claims description 2
- 230000004927 fusion Effects 0.000 claims description 2
- 239000003795 chemical substances by application Substances 0.000 claims 1
- 230000001131 transforming effect Effects 0.000 claims 1
- 230000000694 effects Effects 0.000 abstract description 11
- 238000012545 processing Methods 0.000 description 7
- 230000003044 adaptive effect Effects 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 2
- 210000000805 cytoplasm Anatomy 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000003384 imaging method Methods 0.000 description 2
- 238000007447 staining method Methods 0.000 description 2
- 108010077544 Chromatin Proteins 0.000 description 1
- 102000010834 Extracellular Matrix Proteins Human genes 0.000 description 1
- 108010037362 Extracellular Matrix Proteins Proteins 0.000 description 1
- 235000005811 Viola adunca Nutrition 0.000 description 1
- 240000009038 Viola odorata Species 0.000 description 1
- 235000013487 Viola odorata Nutrition 0.000 description 1
- 235000002254 Viola papilionacea Nutrition 0.000 description 1
- 244000172533 Viola sororia Species 0.000 description 1
- 230000003190 augmentative effect Effects 0.000 description 1
- 210000003855 cell nucleus Anatomy 0.000 description 1
- 210000003483 chromatin Anatomy 0.000 description 1
- 238000003759 clinical diagnosis Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 210000002744 extracellular matrix Anatomy 0.000 description 1
- 238000007490 hematoxylin and eosin (H&E) staining Methods 0.000 description 1
- 210000003705 ribosome Anatomy 0.000 description 1
- 210000001519 tissue Anatomy 0.000 description 1
- 230000003313 weakening effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/90—Dynamic range modification of images or parts thereof
-
- 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/30—Subject of image; Context of image processing
- G06T2207/30004—Biomedical image processing
- G06T2207/30096—Tumor; Lesion
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Nitrogen And Oxygen Or Sulfur-Condensed Heterocyclic Ring Systems (AREA)
- Image Processing (AREA)
Abstract
本发明公开了一种病理图像染色成分调节方法,首先通过对采集的病理切片在色调、饱和度、亮度(HSV)空间矫正了病理切片的亮度和饱和度,通过对矫正所述病理切片的饱和度和亮度、染色成分分离、染色成分调节、染色成分合成,实现对对单一染色成分的含量进行调节的算法,达到了对病理图像中不同染色剂独立调节的效果,有效地完成染色分离的任务,辅助病理医生的诊断。
The invention discloses a method for adjusting the dyeing components of pathological images. First, the brightness and saturation of the pathological slices are corrected in the hue, saturation, and brightness (HSV) space of the collected pathological slices, and the saturation of the pathological slices is corrected by correcting the saturation of the pathological slices. Degree and brightness, separation of dyeing components, adjustment of dyeing components, and synthesis of dyeing components, realize the algorithm of adjusting the content of a single dyeing component, achieve the effect of independent adjustment of different dyes in pathological images, and effectively complete the task of dyeing separation , to assist in the diagnosis of pathologists.
Description
技术领域technical field
本发明涉及数字图像处理领域,具体而言,涉及一种病理图像染色成分调节方法。The invention relates to the field of digital image processing, in particular, to a method for adjusting dyeing components of pathological images.
背景技术Background technique
数字病理图像是病理切片通过全自动显微镜或光学放大系统,扫描采集得到高分辨数字图像,已广泛的应用于病理学临床诊断当中。病理切片的颜色是经过染色剂着色得到的,最常用的染色方法是苏木精伊红(H-E)染色。然而,染色过程中人工操作手法、染色剂配比的差异等人为因素,会造成病理切片的染色质量存在差异;同时,切片扫描过程中光照环境的差异,也使得采集得到的数字病理图像的亮度和饱和度存在着较大差异。这些差异将对病理医生的诊断造成妨碍,影响诊断准确性的判断,因此需要对数字病理图像进行颜色矫正。Digital pathological images are high-resolution digital images obtained by scanning and collecting pathological sections through an automatic microscope or optical magnification system, which have been widely used in pathological clinical diagnosis. The color of pathological sections is obtained by staining with dyes, and the most commonly used staining method is hematoxylin and eosin (H-E) staining. However, human factors such as manual operation techniques and differences in the ratio of dyes during the staining process will cause differences in the staining quality of pathological sections; at the same time, the difference in lighting environment during the section scanning process also makes the collected digital pathological images Brightness There is a big difference with saturation. These differences will hinder the pathologist's diagnosis and affect the judgment of diagnostic accuracy, so it is necessary to perform color correction on digital pathological images.
随着数字图像处理技术的不断发展,一些应用于自然场景图像的颜色增强、矫正的方法已经成熟,并广泛应用于视觉与多媒体系统、生物医学、工业工程以及航空航天等领域,包括直方图均衡化算法、Retinex算法以及基于颜色空间变换的增强方法等。这些算法的通用流程如图1所示。With the continuous development of digital image processing technology, some methods for color enhancement and correction applied to natural scene images have matured, and are widely used in vision and multimedia systems, biomedicine, industrial engineering, aerospace and other fields, including histogram equalization Algorithm, Retinex algorithm and enhancement method based on color space transformation, etc. The general flow of these algorithms is shown in Figure 1.
直方图均衡化算法是一种自适应的增强方法,输出结果为算法经过计算得到的最优效果,医生并不能对结果进行调节,与直方图均衡化方法相对应的可调方法为直方图规定化算法,通过规定图像直方图的形状、值域等来改善图像质量;相比之下,Retinex算法和基于空间变换的增强算法是参数可调的增强方法。三种方法均可以对病理图像进行人为的色彩调节,然而,病理图像的颜色是通过两种或多种染色剂着色而得到的,染色剂所对应的颜色有着特定的意义,例如,苏木精染色剂可以将染色质与胞质内的核糖体染成紫蓝色,伊红染色剂可以将细胞质和细胞外基质中的成分染成红色。医生在诊断过程中需要的是在不影响其他染色剂的前提下,对每种染色剂成分单独调节,达到增强或削弱这种染色剂的强度的效果。以上这些方法均是针对用红绿蓝(RGB)通道存储的自然图像设计的,应用于病理图像时,调节单个通道将不可避免的影响到每种染色成分,均不能按照医生的需求很好的完成病理图像染色调节的任务。The histogram equalization algorithm is an adaptive enhancement method. The output result is the optimal effect calculated by the algorithm. The doctor cannot adjust the result. The adjustment method corresponding to the histogram equalization method is the histogram regulation. In contrast, Retinex algorithm and enhancement algorithm based on spatial transformation are enhancement methods with adjustable parameters. All three methods can artificially adjust the color of the pathological image. However, the color of the pathological image is obtained by coloring with two or more dyes, and the color corresponding to the dye has a specific meaning, such as hematoxylin. The stain can stain chromatin and ribosomes in the cytoplasm to violet blue, and the eosin stain can stain the components in the cytoplasm and extracellular matrix red. What the doctor needs in the diagnosis process is to adjust the components of each dye individually to enhance or weaken the intensity of the dye without affecting other dyes. The above methods are all designed for natural images stored in red, green and blue (RGB) channels. When applied to pathological images, adjusting a single channel will inevitably affect each coloring component, which cannot be very good according to the needs of doctors. Complete the task of adjusting the staining of pathological images.
发明内容SUMMARY OF THE INVENTION
本发明的目的在于提供一种病理图像染色成分调节方法,以解决现有图像处理技术不能对病理图像中的不同染色剂成分分离开,实现对病理图象中不同染色剂独立调节的问题。The purpose of the present invention is to provide a method for adjusting the coloring components of a pathological image, so as to solve the problem that the existing image processing technology cannot separate the different coloring agents in the pathological image and realize the independent adjustment of the different coloring agents in the pathological image.
为实现本发明的目的,采用以下技术方案:For realizing the purpose of the present invention, adopt following technical scheme:
一种病理图像染色成分调节方法,包括如下步骤:A method for adjusting the dyeing components of a pathological image, comprising the following steps:
(1).采集病理切片:将病理切片采集到计算机中,用RGB通道表示,其中像素点坐标记为(x,y);(1). Collect pathological slices: collect the pathological slices into the computer, which are represented by RGB channels, where the pixel coordinates are marked as (x, y);
(2).矫正所述病理切片的饱和度和亮度,包含以下三个步骤:(2). Correcting the saturation and brightness of the pathological slice, including the following three steps:
a.将所述病理切片由所述RGB通道变换到HSV通道;a. Transform the pathological section from the RGB channel to the HSV channel;
b.划定所述病理切片的饱和度S通道数值最低的5%的像素作为背景区域像素;统计所述背景区域像素的均值来估计背景区域的饱和度,并表示为Sback,同时统计所述背景区域像素点在亮度通道V的均值,作为背景区域的亮度值,并表示为Vback;之后,以所述背景区域变换成白色为目标,线性拉伸整张所述病理切片的饱和度和亮度,同时保持色调不变;b. Delineate the pixel with the lowest 5% of the saturation S channel value of the pathological slice as the background area pixel; count the mean value of the background area pixels to estimate the saturation of the background area, and express it as S back , and at the same time count all the pixels in the background area. The mean value of the pixels of the background area in the luminance channel V, as the luminance value of the background area, and expressed as V back ; Afterwards, with the background area being transformed into white as the target, the saturation of the entire described pathological slice is linearly stretched and brightness, while keeping the hue unchanged;
c.将所述步骤b增强后的病理图像反变换到RGB通道,完成病理图像饱和度和亮度的矫正;c. Inversely transform the enhanced pathological image in step b to the RGB channel to complete the correction of the saturation and brightness of the pathological image;
(3).染色成分分离:在所述步骤2变换后的RGB通道中,由所述通道c(c=R,G,B)的光密度Oc(x,y)与染色剂s的着色强度As(x,y)获得所述光密度到所述染色剂s的着色强度的映射关系,利用所述映射关系,通过颜色反卷积算法完成图像的染色分离;涉及公式为:(3). Separation of dyeing components: in the RGB channel transformed in step 2, the coloring by the optical density O c (x, y) of the channel c (c=R, G, B) and the coloring agent s The intensity A s (x, y) obtains the mapping relationship between the optical density and the coloring intensity of the dye s, and using the mapping relationship, the color deconvolution algorithm is used to complete the image The dye separation of ; the formula involved is:
其中,所述A0为染色剂着色强度的最大值,所述A0=1;Wherein, the A 0 is the maximum value of the coloring strength of the dye, and the A 0 =1;
(4).染色成分调节:在得到每种染色剂的着色强度As′(x,y)之后,根据诊断需要对其进行调节;令所述染色剂s的调节率为ps,其中所述ps>0,调节后的染色剂着色强度计算公式为:(4) Adjustment of dyeing components: after obtaining the coloring intensity A s '(x, y) of each dye, adjust it according to the needs of diagnosis; let the adjustment rate of the dye s be p s , where all Said p s > 0, the formula for calculating the tinting strength of the adjusted dye is:
其中,所述ps>1代表加强染色成份s的着色强度,ps<1代表减弱染色成分s的着色强度;Wherein, the p s >1 represents enhancing the tinting strength of the dyeing component s, and p s <1 represents reducing the tinting intensity of the dyeing component s;
(5).染色成分合成:在所述步骤(4)调整染色成分后,将染色数据进行融合,反变换回RGB通道。(5) Synthesis of dyeing components: After adjusting the dyeing components in the step (4), the dyeing data is fused and inversely transformed back to RGB channels.
如上所述的病理图像染色成分调节方法,优选地,步骤1中所述像素坐标(x,y)的R、G、B三通道的数值表示为:In the above-mentioned method for adjusting the staining components of pathological images, preferably, the numerical values of the R, G, and B channels of the pixel coordinates (x, y) in step 1 are expressed as:
I(x,y)=[Ir(x,y),Ig(x,y),Ib(x,y)] (3)I(x,y)=[ Ir (x,y),Ig(x,y), Ib ( x ,y)] (3)
其中Ir(x,y)、Ig(x,y)、Ib(x,y)分别表示红绿蓝三个颜色通道的数值,且Ic(x,y)∈[0,1],c=r,g,b。where I r (x, y), I g (x, y), and I b (x, y) represent the values of the three color channels of red, green and blue, respectively, and I c (x, y)∈[0,1] ,c=r,g,b.
如上所述的病理图像染色成分调节方法,优选地,所述步骤a中变换通道时,涉及变换的公式如下:In the above-mentioned method for adjusting the dyeing components of pathological images, preferably, when the channel is changed in the step a, the formula involved in the transformation is as follows:
其中,所述H(x,y),S(x,y)和V(x,y)分别代表所述像素点(x,y)的色调、饱和度和亮度。Wherein, the H(x,y), S(x,y) and V(x,y) respectively represent the hue, saturation and brightness of the pixel point (x,y).
如上所述的病理图像染色成分调节方法,优选地,在所述步骤b中,所述线性拉伸整张所述病理切片的饱和度和亮度是指处理后的所述病理切片的背景饱和度且背景亮度涉及计算公式如下:In the above-mentioned method for adjusting the staining components of pathological images, preferably, in the step b, the saturation and brightness of the linearly stretched entire pathological slice refer to the background saturation of the processed pathological slice and background brightness The calculation formula involved is as follows:
其中,所述和代表点(x,y)的增强结果;Among them, the and The enhancement result of the representative point (x, y);
在所述步骤c中,涉及变换公式如下:In the step c, the transformation formula involved is as follows:
其中,所述表示的整数部分,所述表示饱和度、亮度校正后的病理图像中点(x,y)的值。如上所述的病理图像染色成分调节方法,优选地,通道c(c=r,g,b)的所述光密度Oc(x,y)的计算公式如下所示:Among them, the express the integer part of the Indicates the value of the point (x, y) in the pathological image after saturation and brightness correction. In the above-mentioned method for adjusting the staining components of pathological images, preferably, the calculation formula of the optical density O c (x, y) of the channel c (c=r, g, b) is as follows:
其中,所述I0,c为单通道最大值,所述I0,c=1。Wherein, the I 0,c is the maximum value of a single channel, and the I 0,c =1.
如上所述的病理图像染色成分调节方法,优选地,在所述步骤(3)中所述染色剂为单独染色剂着色时,所述光密度Oc(x,y)与染色剂着色度A成正比,所述染色剂为多种染色剂着色时,光密度等于各所述染色剂在通道c上光密度的和,当染色剂为苏木精-伊红-二氨基联苯胺时,所述苏木精记为H,所述伊红记为E,所述二氨基联苯胺记为DAB,其所述光密度Oc(x,y)和染色剂的着色强度As(x,y)的转换关系如下:In the above-mentioned method for adjusting the coloring components of pathological images, preferably, in the step (3), when the coloring agent is colored by a single coloring agent, the optical density O c (x, y) is related to the coloring degree A of the coloring agent. In direct proportion, when the dye is colored by multiple dyes, the optical density is equal to the sum of the optical densities of each of the dyes on channel c. When the dye is hematoxylin-eosin-diaminobenzidine, the Described hematoxylin is denoted as H, described eosin is denoted as E, described diaminobenzidine is denoted as DAB, its described optical density O c (x, y) and the tinting strength of dyeing agent As ( x , y ) and the conversion relationship is as follows:
其中,所述s=H,E,DAB,代表所述染色剂s在通道c上的吸光率,对于染色剂s和通道c是一个常量,可以经由单一所述染色剂染色测试得到,所述染色剂为H-E-DAB染色时,通道c对三种所述染色剂H,E和DAB的吸光率矩阵为Wherein, the s=H, E, DAB, represents the absorbance of the dye s on channel c, For the dye s and channel c is a constant, which can be obtained through the dyeing test of a single said dye, when the dye is HE-DAB staining, the absorbance of channel c to the three dyes H, E and DAB The matrix is
令make
O=[Or(x,y),Og(x,y),Ob(x,y)]T,O=[O r (x,y),O g (x,y),O b (x,y)] T ,
A=[AH(x,y),AE(x,y),ADAB(x,y)]T,A=[A H (x,y),A E (x,y),A DAB (x,y)] T ,
公式(8)简写为:Formula (8) is abbreviated as:
O=M·A (9)O=M·A (9)
令D=M-1,由(7)式可得每种所述染色剂着色强度为:Let D=M -1 , from the formula (7), the tinting strength of each of the dyes can be obtained as:
A=D·OA = D · O
(10)(10)
其中,D称作颜色反卷积矩阵,表示着光密度到染色剂着色强度的映射关系,当所述染色剂为H-E-DAB染色时,反卷积矩阵为:Among them, D is called the color deconvolution matrix, which represents the mapping relationship between the optical density and the coloring intensity of the dye. When the dye is H-E-DAB dyeing, the deconvolution matrix is:
向量A=[AH(x,y),AE(x,y),ADAB(x,y)]T即为分解后的染色强度,由于所述A是光密度O的线性变换,所以所述A仍处于在光密度空间,将其反变换为线性空间,完成图像的染色分离。The vector A=[A H (x, y), A E (x, y), A DAB (x, y)] T is the decomposed staining intensity. Since the A is a linear transformation of the optical density O, so The A is still in optical density space, inversely transform it into linear space to complete the image staining separation.
如上所述的病理图像染色成分调节方法,优选地,在所述步骤5中,所述染色为苏木精-伊红-二氨基联苯胺染色时,所述染色数据进行融合采用的计算公式如下:In the above-mentioned method for adjusting the staining components of pathological images, preferably, in the step 5, when the staining is hematoxylin-eosin-diaminobenzidine staining, the calculation formula used for fusion of the staining data is as follows :
计算所得为调节之后的结果。Calculated is the result after adjustment.
本发明提供的一种数字病理图像染色成分调节方法,首先通过在色调、饱和度、亮度(HSV)空间矫正了病理图象的亮度和饱和度,然后利用颜色返卷积算法实现对单一染色成分的含量进行调节的算法,达到了对病理图象中不同染色剂独立调节的效果,有效地完成染色分离的任务,辅助病理医生的诊断。The invention provides a method for adjusting the dyeing components of a digital pathological image. First, the brightness and saturation of the pathological image are corrected in the hue, saturation, and brightness (HSV) space, and then the color deconvolution algorithm is used to realize the adjustment of a single dyeing component. The algorithm that adjusts the content of , achieves the effect of independent adjustment of different dyes in pathological images, effectively completes the task of dye separation, and assists pathologists in diagnosis.
附图说明Description of drawings
图1是现有技术中数字图像增强流程图。FIG. 1 is a flow chart of digital image enhancement in the prior art.
图2是本发明方法的流程图。Figure 2 is a flow chart of the method of the present invention.
图3是本发明优选的实施例1中四张病理切片处理后的效果图。FIG. 3 is an effect diagram of four pathological sections after processing in the preferred embodiment 1 of the present invention.
图4为本发明优选的实施例2中的原始图像。FIG. 4 is the original image in the preferred embodiment 2 of the present invention.
图5为本发明优选的实施例2中原图4调节后的效果图。FIG. 5 is an effect diagram after adjustment of the original FIG. 4 in the preferred embodiment 2 of the present invention.
具体实施方式Detailed ways
在现有技术中一般的病理图像调节方法是在RGB通道或HSV通道进行的,每种染色剂的染色信息会同时分布在RGB通道或HSV通道,而一般的病理图像调节方法只能在RGB空间或HSV空间中对单一通道进行调节,此处涉及两个问题:1)单独调节RGB空间或HSV空间的一个通道会同时对每种染色成分产生影响;2)想要对一种染色成分进行调节需要按比例同时调节RGB空间或HSV空间的三个通道。所以一般的病理图像调节方法很难做到对单一染色成分进行调节。In the prior art, the general pathological image adjustment method is carried out in the RGB channel or the HSV channel, and the staining information of each dye will be distributed in the RGB channel or the HSV channel at the same time, while the general pathological image adjustment method can only be used in the RGB space. Or adjusting a single channel in HSV space, two problems are involved here: 1) Adjusting a channel in RGB space or HSV space alone will affect each coloring component at the same time; 2) Want to adjust one coloring component Three channels of RGB space or HSV space need to be scaled simultaneously. Therefore, it is difficult for general pathological image adjustment methods to adjust a single stained component.
本发明中利用颜色返卷积算法将病理图像变换到染色剂空间,即变换后每种染色剂都由单一通道控制,这样一来就可以通过调节变换后的某通道的数值来实现单一染色成分的调节,同时不对其他染色成分产生影响。下面请参考附图并结合实施例来详细说明本发明。In the present invention, the color deconvolution algorithm is used to transform the pathological image into the dye space, that is, after the transformation, each dye is controlled by a single channel, so that a single dye component can be realized by adjusting the value of a certain channel after the transformation. adjustment without affecting other dyeing components. The present invention will be described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
实施例1Example 1
一种病理图像染色成分调节方法,具体流程如图2所示,包括如下步骤:A method for adjusting the dyeing components of a pathological image, the specific process is shown in Figure 2, and includes the following steps:
1.采集病理切片1. Collection of pathological sections
通过病理切片扫描设备将病理图像输入到计算机中,将图像在RGB颜色空间中进行表示,其中像素坐标为(x,y)的R、G、B三通道的数值表示为:The pathological image is input into the computer through the pathological slice scanning equipment, and the image is represented in the RGB color space.
I(x,y)=[Ir(x,y),Ig(x,y),Ib(x,y)] (3)I(x,y)=[ Ir (x,y),Ig(x,y), Ib ( x ,y)] (3)
其中Ir(x,y)、Ig(x,y)、Ib(x,y)分别表示红绿蓝三个颜色通道的数值,且Ic(x,y)∈[0,1],c=r,g,b。where I r (x, y), I g (x, y), and I b (x, y) represent the values of the three color channels of red, green and blue, respectively, and I c (x, y)∈[0,1] ,c=r,g,b.
2.饱和度和亮度矫正2. Saturation and Brightness Correction
病理图像扫描时由于光照条件不佳等原因会造成图像的饱和度和亮度较差的情况。所以,需要进行病理图像亮度饱和度矫正。病理切片的背景区域(无组织覆盖的区域)不包含任何内容,一般情况下背景区域为纯白色时整个切片成像效果最佳。本方法以此为基础,实现整张切片饱和度和亮度的矫正。具体方法包含以下三个步骤:When the pathological image is scanned, the saturation and brightness of the image will be poor due to poor lighting conditions and other reasons. Therefore, it is necessary to correct the brightness and saturation of pathological images. The background area (area without tissue coverage) of the pathological section does not contain any content. Generally, the imaging effect of the entire section is best when the background area is pure white. Based on this, this method realizes the correction of the saturation and brightness of the entire slice. The specific method includes the following three steps:
a.将图像I(x,y)由RGB空间变换到HSV空间,涉及变换公式如下:a. Transform the image I(x,y) from RGB space to HSV space, and the transformation formula involved is as follows:
其中,H(x,y),S(x,y)和V(x,y)分别代表点(x,y)的色调、饱和度和亮度。Among them, H(x,y), S(x,y) and V(x,y) represent the hue, saturation and brightness of the point (x,y), respectively.
b.在整张切片中,背景区域的饱和度总是最低的。因此,划定饱和度S通道数值最低的5%的像素作为背景区域像素,然后统计这些像素的均值来估计背景区域的饱和度,并表示为Sback,同时统计这些像素点在亮度通道V的均值,作为背景区域的亮度值,并表示为Vback。最后以将背景区域变换成白色为目标,线性拉伸整张切片的饱和度和亮度,即尽量保证处理后切片的背景饱和度且背景亮度同时保持色调不变,涉及计算公式如下:b. In the whole slice, the saturation of the background area is always the lowest. Therefore, the pixels with the lowest 5% value of the saturation S channel are defined as the pixels of the background area, and then the average value of these pixels is calculated to estimate the saturation of the background area, which is expressed as S back , and these pixels are counted in the luminance channel V at the same time. The mean value, as the luminance value of the background area, and denoted as V back . Finally, aiming to transform the background area into white, linearly stretch the saturation and brightness of the entire slice, that is, try to ensure the background saturation of the slice after processing. and background brightness While keeping the hue unchanged, the calculation formula involved is as follows:
其中和代表点(x,y)的增强结果。in and Represents the augmented result for the point (x,y).
c.将增强后后的结果反变换到RGB空间,完成病理图像饱和度和亮度的矫正,涉及变换公式如下:c. Inversely transform the enhanced result to RGB space to complete the correction of the saturation and brightness of the pathological image. The transformation formula involved is as follows:
其中表示的整数部分,表示饱和度、亮度校正后的病理图像中点(x,y)的值。in express the integer part of , Indicates the value of the point (x, y) in the pathological image after saturation and brightness correction.
采用步骤2所述的方法对4张病理切片进行处理,结果如图3所示,其中(a)、(b)、(c)、(d)为四张成像条件较差的数字病理切片,每张切片的左半部分为原图,右半部份为采用本发明方法处理后的增强效果。从图中可以看出,本发明的方法能够有效的调整病理图像的饱和度和亮度。The method described in step 2 was used to process four pathological slices, and the results are shown in Figure 3, where (a), (b), (c), and (d) are four digital pathological slices with poor imaging conditions, The left half of each slice is the original image, and the right half is the enhanced effect processed by the method of the present invention. It can be seen from the figure that the method of the present invention can effectively adjust the saturation and brightness of the pathological image.
3.染色成分分离3. Separation of dyeing components
在RGB通道中,通道c(c=r,g,b)的光密度计算公式为:In the RGB channel, the optical density calculation formula of channel c (c=r, g, b) is:
其中,I0,c为单通道最大值,(本方法中所以I0,c=1。在单独染色剂着色时,光密度Oc(x,y)与染色剂着色度A成正比,用多种染色剂着色时,光密度等于各染色剂在通道c上光密度的和,以H-E-DAB染色为例,光密度Oc(x,y)(c=r,g,b)和染色剂的着色强度As(x,y)(s=H,E,DAB)的转换关系如下:Among them, I 0, c is the single-channel maximum value, (in this method So I 0,c =1. When coloring with a single colorant, the optical density O c (x, y) is proportional to the coloring degree A of the colorant. When coloring with multiple colorants, the optical density is equal to the sum of the optical densities of each colorant on channel c, with HE - DAB dyeing as an example, the conversion relationship between the optical density O c (x, y) (c=r, g, b) and the coloring intensity of the dye As (x, y) ( s =H, E, DAB) is as follows :
其中,代表染色剂s在通道c上的吸光率,对于染色剂s和通道c是一个常量,可以经由单一染色剂染色测试得到,以H-E-DAB染色为例,通道c对三种染色剂H,E和DAB的吸光率矩阵为in, represents the absorbance of dye s on channel c, For the dye s and channel c, it is a constant, which can be obtained by a single dye staining test. Taking HE-DAB staining as an example, the absorbance matrix of channel c for three dyes H, E and DAB is:
令O=[Or(x,y),Og(x,y),Ob(x,y)]T,A=[AH(x,y),AE(x,y),ADAB(x,y)]T,公式(6)可以简写为:Let O=[O r (x,y),O g (x,y),O b (x,y)] T ,A=[A H (x,y),A E (x,y),A DAB (x,y)] T , formula (6) can be abbreviated as:
O=M·A (9)O=M·A (9)
令D=M-1,由(7)式可得每种染色剂着色强度为:Let D=M -1 , from the formula (7), the tinting strength of each colorant can be obtained as:
A=D·O (10)A=D·O (10)
其中,D称作颜色反卷积矩阵,表示着光密度到染色剂着色强度的映射关系,以H-E-DAB染色为例,反卷积矩阵为:Among them, D is called the color deconvolution matrix, which represents the mapping relationship between the optical density and the coloring intensity of the dye. Taking H-E-DAB dyeing as an example, the deconvolution matrix is:
向量A=[AH(x,y),AE(x,y),ADAB(x,y)]T即为分解后的染色强度,由于A是光密度O的线性变换,所以A仍处于在光密度空间,将其反变换为线性空间,完成图像的染色分离,涉及公式为:The vector A=[A H (x, y), A E (x, y), A DAB (x, y)] T is the decomposed staining intensity. Since A is a linear transformation of the optical density O, A is still In the optical density space, inversely transform it into a linear space to complete the image The dye separation involving the formula is:
A0为染色剂着色强度的最大值,本方法中为对应RGB通道的取值范围([0,1]),取A0=1。A 0 is the maximum value of the coloring intensity of the dye, which is the value range ([0, 1]) of the corresponding RGB channel in this method, and A 0 =1 is taken.
4.染色成分调节4. Adjustment of dyeing components
在得到每种染色剂的着色强度As′(x,y)之后,医生可以根据诊断需要对其进行调节。令染色剂的调节率为ps其中,所述ps>0,调节后的染色剂着色强度计算公式为:After obtaining the tinting intensity As'( x ,y) of each stain, the doctor can adjust it according to the diagnostic needs. Let the adjustment rate of the dyeing agent be p s , where the p s > 0, and the formula for calculating the coloring intensity of the adjusted dyeing agent is:
其中ps>1代表加强染色成份s的着色强度,ps<1代表减弱染色成分s的着色强度。where ps > 1 represents the enhancement of the tinting strength of the dyeing component s , and ps <1 represents the weakening of the tinting strength of the dyeing component s.
5.染色成分合成5. Synthesis of dyeing components
在调整染色成分后,需要将染色数据进行融合,反变换回RGB通道。以H-E-DAB染色为例,计算公式如下:After adjusting the coloring components, the coloring data needs to be fused and inversely transformed back to RGB channels. Taking H-E-DAB staining as an example, the calculation formula is as follows:
计算所得即为调节之后的结果。Calculated It is the result after adjustment.
。图5展示了经HE染色的数字病理图像经本发明染色调节方法处理的效果。H-E-染色是最常用的染色方法,H代表苏木精染色剂,可以将细胞核染成蓝紫色,E代表伊红染色剂,可以将基质染成粉红色。HE染色的病理图像可以看作未进行DAB染色的H-E-DAB染色图像,故同样可以使用公式(11)提供的返卷积矩阵进行处理,只需令公式(13)中的pDAB=1,只调节pH,pE即可。不同pH,pE取值时的染色调节方法如图5所示。结果可见,使用本发明的方法,病理图像两种染色成分达到了独立调节的效果。. FIG. 5 shows the effect of processing the HE-stained digital pathological image by the staining adjustment method of the present invention. HE-staining is the most commonly used staining method, H stands for hematoxylin stain, which can stain cell nuclei blue-violet, and E represents eosin stain, which can stain matrix pink. HE-stained pathological images can be regarded as HE-DAB-stained images without DAB staining, so the deconvolution matrix provided by formula (11) can also be used for processing, just make p DAB =1 in formula (13), Only adjust pH and pE . The dyeing adjustment method at different pH and pE values is shown in Figure 5. It can be seen from the results that, using the method of the present invention, the two staining components of the pathological image can achieve the effect of independent adjustment.
本发明的方法可以分为两部分,第一部分为基于HSV空间的病理图像饱和度、亮度调节,第2步的内容;第二部分为基于颜色返卷积的颜色成份调节,第3,4,5步的内容。其中,第一部分为自适应的图像调节方法,不需要人为干预,对整张病理图像进行了颜色矫正,相对于其他颜色矫正方法更具针对性。第二部分为医生根据诊断需要手动设定参数ps,以调节染色剂着色强度为目的图像增强方法。以往的图像调节方法都是在RGB空间进行的,而用户很难通过在RGB调节亮度、饱和度的方式获得调节单一染色剂染色浓度的效果。本发明利用颜色返卷积算法,将病理图像变换到染色空间,然后在染色空间调节各染色剂的着色强度,最后反变换为RGB空间,达到单一染色剂调节的效果。The method of the present invention can be divided into two parts, the first part is the adjustment of pathological image saturation and brightness based on HSV space, the content of the second step; the second part is the color component adjustment based on color deconvolution, the third, the fourth, 5 steps of content. Among them, the first part is an adaptive image adjustment method, which does not require human intervention, and performs color correction on the entire pathological image, which is more targeted than other color correction methods. The second part is an image enhancement method for the doctor to manually set the parameter ps according to the diagnosis needs, in order to adjust the coloring intensity of the dye. The previous image adjustment methods are all performed in RGB space, and it is difficult for users to obtain the effect of adjusting the dyeing density of a single dye by adjusting the brightness and saturation in RGB. The invention uses the color deconvolution algorithm to transform the pathological image into the dyeing space, then adjusts the coloring intensity of each dye in the dyeing space, and finally inversely transforms it into the RGB space to achieve the effect of adjusting a single dye.
Claims (6)
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710246205 | 2017-04-15 | ||
CN2017102462051 | 2017-04-15 |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107705336A CN107705336A (en) | 2018-02-16 |
CN107705336B true CN107705336B (en) | 2021-08-06 |
Family
ID=61184206
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710947445.4A Active CN107705336B (en) | 2017-04-15 | 2017-10-12 | A method for adjusting the coloring components of pathological images |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107705336B (en) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109544529A (en) * | 2018-11-19 | 2019-03-29 | 南京信息工程大学 | Pathological image data enhancement methods towards deep learning model training and study |
WO2020107156A1 (en) * | 2018-11-26 | 2020-06-04 | 深圳先进技术研究院 | Automated classification method and device for breast medical ultrasound images |
CN109785943A (en) * | 2018-12-21 | 2019-05-21 | 程俊美 | A kind of monitoring of pathology and diagnostic message processing system and method |
CN110060245A (en) * | 2019-04-15 | 2019-07-26 | 青岛大学 | A kind of gastric cancer lymph node dyeing pathological image automatic identifying method based on deep neural network |
CN110223305B (en) * | 2019-06-12 | 2021-09-10 | 志诺维思(北京)基因科技有限公司 | Cell segmentation method, cell segmentation device, and readable storage medium |
CN110298905A (en) * | 2019-07-02 | 2019-10-01 | 麦克奥迪(厦门)医疗诊断系统有限公司 | It is a kind of to be sliced the method and apparatus for generating digital slices based on biological sample |
CN110706237B (en) * | 2019-09-06 | 2023-06-06 | 上海衡道医学病理诊断中心有限公司 | Diamino benzidine separation and evaluation method based on YCbCr color space |
CN111539883B (en) * | 2020-04-20 | 2023-04-14 | 福建帝视信息科技有限公司 | Digital pathological image H & E dyeing restoration method based on strong reversible countermeasure network |
CN113469939B (en) * | 2021-05-26 | 2022-05-03 | 透彻影像(北京)科技有限公司 | HER-2 immunohistochemical automatic interpretation system based on characteristic curve |
CN115236078A (en) * | 2022-07-12 | 2022-10-25 | 黑龙江省农业科学院食品加工研究所 | Method for measuring skin retention degree of processed rice |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102460156A (en) * | 2009-06-03 | 2012-05-16 | 日本电气株式会社 | Pathologic tissue image analyzing apparatus, pathologic tissue image analyzing method, and pathologic tissue image analyzing program |
CN103635176A (en) * | 2011-03-21 | 2014-03-12 | 卡拉莱特有限公司 | Systems for custom coloration |
WO2014065950A1 (en) * | 2012-10-26 | 2014-05-01 | Google Inc. | Video chat encoding pipeline |
KR101428923B1 (en) * | 2013-04-23 | 2014-08-08 | 충북대학교 산학협력단 | System and Method for Automatic Extraction of Component Packaging Regions in PCB |
CN104700375A (en) * | 2015-03-27 | 2015-06-10 | 麦克奥迪(厦门)医疗诊断系统有限公司 | Method for improving pathology image visual effect based on main component analyzing |
CN105488836A (en) * | 2015-11-16 | 2016-04-13 | 武汉海达数云技术有限公司 | Circular colored tape point cloud rendering method based on elevation distribution characteristics |
CN105893649A (en) * | 2015-03-23 | 2016-08-24 | 温州大学 | Optimal model based interactive image recolorating method |
-
2017
- 2017-10-12 CN CN201710947445.4A patent/CN107705336B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102460156A (en) * | 2009-06-03 | 2012-05-16 | 日本电气株式会社 | Pathologic tissue image analyzing apparatus, pathologic tissue image analyzing method, and pathologic tissue image analyzing program |
CN103635176A (en) * | 2011-03-21 | 2014-03-12 | 卡拉莱特有限公司 | Systems for custom coloration |
WO2014065950A1 (en) * | 2012-10-26 | 2014-05-01 | Google Inc. | Video chat encoding pipeline |
KR101428923B1 (en) * | 2013-04-23 | 2014-08-08 | 충북대학교 산학협력단 | System and Method for Automatic Extraction of Component Packaging Regions in PCB |
CN105893649A (en) * | 2015-03-23 | 2016-08-24 | 温州大学 | Optimal model based interactive image recolorating method |
CN104700375A (en) * | 2015-03-27 | 2015-06-10 | 麦克奥迪(厦门)医疗诊断系统有限公司 | Method for improving pathology image visual effect based on main component analyzing |
CN105488836A (en) * | 2015-11-16 | 2016-04-13 | 武汉海达数云技术有限公司 | Circular colored tape point cloud rendering method based on elevation distribution characteristics |
Also Published As
Publication number | Publication date |
---|---|
CN107705336A (en) | 2018-02-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107705336B (en) | A method for adjusting the coloring components of pathological images | |
Zhou et al. | Color retinal image enhancement based on luminosity and contrast adjustment | |
CN105654437B (en) | A kind of Enhancement Method of pair of low-light (level) image | |
CN103886565B (en) | Nighttime color image enhancement method based on purpose optimization and histogram equalization | |
CN110570360B (en) | A robust and comprehensive low-quality illumination image enhancement method based on Retinex | |
Abd Halim et al. | Nucleus segmentation technique for acute leukemia | |
CN110473152A (en) | Based on the image enchancing method for improving Retinex algorithm | |
CN106485674A (en) | A kind of low light image Enhancement Method based on integration technology | |
Jiang et al. | Color image enhancement with brightness preservation using a histogram specification approach | |
Pierre et al. | Luminance-hue specification in the RGB space | |
CN106657816A (en) | ORB algorithm based multipath rapid video splicing algorithm with image registering and image fusion in parallel | |
CN111667446B (en) | image processing method | |
TW202021330A (en) | Image zooming method and device | |
CN107833256B (en) | The method and device of pseudo- coloring for digital picture | |
CN109636739B (en) | Detail processing method and device for enhancing image saturation | |
CN117689762B (en) | Endoscopic image staining method and system | |
CN110969583A (en) | Image background processing method and system | |
CN111815548A (en) | Medium-long wave dual-waveband infrared image fusion method | |
CN112233024A (en) | Medium-long wave dual-waveband infrared image fusion method based on difference characteristic color mapping | |
Terai et al. | Color image contrast enhancement by retinex model | |
Eldahshan et al. | Segmentation framework on digital microscope images for acute lymphoblastic leukemia diagnosis based on HSV Color Space | |
JP2009050035A (en) | Image processing method, image processing system, and image processing program | |
CN111007020B (en) | Double-frame four-spectrum imaging method and application | |
CN106462964B (en) | Method and digital microscope for being split to color image | |
CN113591630A (en) | Certificate photo automatic processing method, system, terminal equipment 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |