CN105574882A - Lung segmentation extraction method and system based on CT image of chest cross section - Google Patents
Lung segmentation extraction method and system based on CT image of chest cross section Download PDFInfo
- Publication number
- CN105574882A CN105574882A CN201511023356.8A CN201511023356A CN105574882A CN 105574882 A CN105574882 A CN 105574882A CN 201511023356 A CN201511023356 A CN 201511023356A CN 105574882 A CN105574882 A CN 105574882A
- Authority
- CN
- China
- Prior art keywords
- region
- image
- lung
- area
- connected region
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0012—Biomedical image inspection
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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/10072—Tomographic images
- G06T2207/10081—Computed x-ray tomography [CT]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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/30061—Lung
Landscapes
- Engineering & Computer Science (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
- Radiology & Medical Imaging (AREA)
- Quality & Reliability (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Apparatus For Radiation Diagnosis (AREA)
Abstract
本发明提供一种基于胸部横断面CT图像的肺部分割提取方法以及系统,所述方法包括:获取胸部横断面的CT图像;对所述的CT图像进行预处理;对预处理后的CT图像进行阈值分割;对阈值分割后的CT图像进行肺区域提取。本发明能够实现对肺区域的精准分割,保证肺实质区域分割的完整性,避免由于肺区域的边缘缺失及区域的缺失而在后续诊断过程中造成漏诊的问题。
The present invention provides a lung segmentation and extraction method and system based on a chest cross-sectional CT image, the method comprising: acquiring a chest cross-sectional CT image; preprocessing the CT image; preprocessing the preprocessed CT image Carry out threshold segmentation; perform lung region extraction on the CT image after threshold segmentation. The present invention can realize the precise segmentation of the lung region, ensure the integrity of the segmentation of the lung parenchyma region, and avoid the problem of missed diagnosis in the subsequent diagnosis process due to the lack of edges and regions of the lung region.
Description
技术领域technical field
本发明关于医学图像信息技术领域,特别是关于胸部横断面的CT图像处理技术,具体的讲是一种基于胸部横断面CT图像的肺部分割提取方法及系统。The present invention relates to the technical field of medical image information, in particular to CT image processing technology of chest cross-section, specifically a lung segmentation and extraction method and system based on chest cross-sectional CT images.
背景技术Background technique
目前,肺癌已成为世界各国最常见的恶性肿瘤之一。尽管基于肺癌的临床多学科综合治疗技术取得了长足的进步,但大部分肺癌患者的5年生存率仍少于15%,其主要原因是80%患者在就诊时已属于肺癌晚期,失去了手术治疗的最佳时期。因此如何提高肺癌早期诊断率尤为重要。At present, lung cancer has become one of the most common malignant tumors in the world. Although the clinical multidisciplinary comprehensive treatment technology based on lung cancer has made great progress, the 5-year survival rate of most lung cancer patients is still less than 15%. The best time for treatment. Therefore, how to improve the early diagnosis rate of lung cancer is particularly important.
随着计算机技术与医学图像信息技术的发展,基于医学影像的计算机辅助诊断(ComputerAidedDiagnosis,CAD)对提高医生(特别是基层医院医生)的正确诊断率有了极大的帮助。从事肺结节CAD系统研究的科研机构以美国与日本居多。在肺结节CAD系统的肺实质提取阶段,Hu等人采用基于阈值和区域生长方法提取肺实质,然后基于动态规划算法分离左右肺,基于数学形态学的开、闭运算平滑肺壁。Ukil用提取出气管树的肺区域分割方法来提高肺门部位的分割准确性。Araiato和Sensakovic研究了肺区域分割作为计算机辅助诊断系统的重要性,研究证明不正确的肺区域分割方法将会造成5%-17%的结节丢失。With the development of computer technology and medical image information technology, computer-aided diagnosis (Computer Aided Diagnosis, CAD) based on medical imaging has greatly helped to improve the correct diagnosis rate of doctors (especially doctors in primary hospitals). Most of the scientific research institutions engaged in the research of pulmonary nodule CAD system are in the United States and Japan. In the lung parenchyma extraction stage of the pulmonary nodule CAD system, Hu et al. used threshold and region growing methods to extract the lung parenchyma, then separated the left and right lungs based on the dynamic programming algorithm, and smoothed the lung wall based on the opening and closing operations based on mathematical morphology. Ukil uses the lung region segmentation method that extracts the tracheal tree to improve the segmentation accuracy of the hilum. Araiato and Sensakovic studied the importance of lung region segmentation as a computer-aided diagnosis system, and the study proved that incorrect lung region segmentation methods would cause 5%-17% nodules to be lost.
目前,全球共有8个通过美国食品和药品管理局(FoodandDrugAdministration,FDA)认证的基于CT影像的肺癌CAD系统,其中一个是R2Technology公司的ImageCheckerCTLN-1000系统,该系统于2004年获得了FDA认证。ImageCheckerCTLN-1000系统提供对层厚在0.5mm-3min之间的CT影像进行实时、全自动的结节检测功能,能检测的结节为直径在4min以上的实体型结节。还包括飞利浦公司推出的Pulmopackage、GE公司推出的GERapidScreenDigitalLungVCAR等。At present, there are 8 lung cancer CAD systems based on CT images certified by the US Food and Drug Administration (FDA) in the world, one of which is the ImageCheckerCTLN-1000 system of R2Technology, which was certified by the FDA in 2004. The ImageCheckerCTLN-1000 system provides a real-time, fully automatic nodule detection function for CT images with a slice thickness between 0.5mm and 3min. The nodules that can be detected are solid nodules with a diameter of more than 4min. Also includes Pulmopackage launched by Philips, GE RapidScreenDigitalLungVCAR launched by GE, etc.
肺部区域自动分割是任何肺部计算机辅助诊断系统的一个必要处理过程,特别是肺结节CAD系统。目前,肺部区域的分割方法大多数是基于肺区域与背景区域在灰度值上有较大的区别,这些算法主要包括:阈值分割、区域生长和联通标记等,最后再通过形态学运算去除肺部区域孤岛与填补肺部区域内及边缘空洞。Automatic segmentation of lung regions is an essential process for any lung computer-aided diagnosis system, especially for pulmonary nodule CAD systems. At present, most lung region segmentation methods are based on the large difference in gray value between the lung region and the background region. These algorithms mainly include: threshold segmentation, region growth, and connectivity marking, etc., and finally remove the Lung area islanding and filling of voids in and around the lung area.
由于CT图像背景很复杂,带有病灶的CT图像更复杂,增加了分割难度。因此,如果仅仅靠形态学运算对提取的肺部区域进行处理,很容易造成肺区域的边缘缺失及区域的缺失,而缺失区域往往是病灶所在区域,从而在后续诊断过程中造成漏诊。Due to the complex background of CT images, CT images with lesions are more complex, which increases the difficulty of segmentation. Therefore, if only morphological operations are used to process the extracted lung region, it is easy to cause loss of the edge and region of the lung region, and the missing region is often the area where the lesion is located, resulting in missed diagnosis in the subsequent diagnosis process.
因此,如何研究和开发出一种新的方案,以避免由于肺区域的边缘缺失及区域的缺失而在后续诊断过程中造成漏诊的问题是本领域亟待解决的技术难题。Therefore, how to research and develop a new solution to avoid the problem of missed diagnosis in the subsequent diagnosis process due to the loss of the edge of the lung region and the loss of the region is a technical problem to be solved urgently in this field.
发明内容Contents of the invention
为了克服现有技术存在的上述技术问题,本发明提供了一种基于胸部横断面CT图像的肺部分割提取方法以及系统,通过对胸部横断面的CT图像进行预处理,然后进行阈值分割以及肺区域提取,能够实现对肺区域的精准分割,保证肺实质区域分割的完整性。In order to overcome the above-mentioned technical problems existing in the prior art, the present invention provides a lung segmentation and extraction method and system based on chest cross-sectional CT images. By preprocessing the chest cross-sectional CT images, threshold segmentation and lung Region extraction can achieve accurate segmentation of lung regions and ensure the integrity of lung parenchymal region segmentation.
本发明的目的之一是,提供一种基于胸部横断面CT图像的肺部分割提取方法,所述方法包括:获取胸部横断面的CT图像;对所述的CT图像进行预处理;对预处理后的CT图像进行阈值分割;对阈值分割后的CT图像进行肺区域提取。One of the objects of the present invention is to provide a method for lung segmentation and extraction based on chest cross-sectional CT images, the method comprising: obtaining a chest cross-sectional CT image; preprocessing the CT image; Threshold segmentation is performed on the CT image after threshold segmentation; lung region extraction is performed on the CT image after threshold segmentation.
在本发明的优选实施方式中,采用中值滤波与小波去噪的联合去噪方法对所述的CT图像进行预处理。In a preferred embodiment of the present invention, the CT image is preprocessed using a joint denoising method of median filtering and wavelet denoising.
在本发明的优选实施方式中,对预处理后的CT图像进行阈值分割包括:从预处理后的CT图像中确定出灰度值小于0的像素;将灰度值小于0的像素置为0,得到第一图像;确定所述第一图像的灰度直方图;确定所述灰度直方图中两波峰间的波谷,视为分割阈值;根据所述的分割阈值对所述的第一图像进行初步二值分割,得到第二图像;对所述的第二图像进行取反,得到第三图像;采用形态学开运算对所述第三图像进行去除处理,得到二值图像;对所述的二值图像中的连通区域按照从左到右、从上到下的策略进行区域标号,得到阈值分割后的CT图像。In a preferred embodiment of the present invention, performing threshold segmentation on the preprocessed CT image includes: determining pixels with grayscale values less than 0 from the preprocessed CT image; setting pixels with grayscale values less than 0 as 0 , to obtain the first image; determine the gray histogram of the first image; determine the valley between the two peaks in the gray histogram, as the segmentation threshold; according to the segmentation threshold for the first image Carrying out preliminary binary segmentation to obtain a second image; inverting the second image to obtain a third image; using a morphological opening operation to remove the third image to obtain a binary image; The connected regions in the binary image of are marked according to the strategy from left to right and from top to bottom, and the CT image after threshold segmentation is obtained.
在本发明的优选实施方式中,对阈值分割后的CT图像进行肺区域提取包括:从阈值分割后的CT图像中提取出区域标号后的连通区域;判断区域标号为2的连通区域的最左端像素所在列是否大于20;当判断为是时,判断区域标号为2的连通区域的最右端像素所在列是否小于290列;当判断为是时,判断区域标号为2的连通区域的面积是否大于2000;当判断为是时,所述区域标号为2的连通区域为左边肺区域。In a preferred embodiment of the present invention, performing lung region extraction on the CT image after threshold segmentation includes: extracting connected regions with region labels from the CT images after threshold segmentation; Whether the column of the pixel is greater than 20; when it is judged to be yes, whether the column of the rightmost pixel of the connected region with the region label 2 is less than 290 columns; when judged to be yes, whether the area of the connected region with the region label 2 is greater than 2000; when the judgment is yes, the connected region with the region number 2 is the left lung region.
在本发明的优选实施方式中,对阈值分割后的CT图像进行肺区域提取还包括:从区域标号不为1和2的连通区域中选取出面积大于2000的连通区域,即为右边肺区域。In a preferred embodiment of the present invention, extracting the lung region from the thresholded CT image further includes: selecting a connected region with an area greater than 2000 from the connected regions whose region labels are not 1 and 2, that is, the right lung region.
在本发明的优选实施方式中,对阈值分割后的CT图像进行肺区域提取包括:从阈值分割后的CT图像中提取出区域标号后的连通区域;判断区域标号为2的连通区域的最左端像素所在列是否大于20;当判断为是时,判断区域标号为2的连通区域的面积是否大于2000;当判断为是时,判断区域标号为2的连通区域的最右端像素所在列是否小于290列;当判断为否时,所述区域标号为2的连通区域为左右肺粘连肺区域。In a preferred embodiment of the present invention, performing lung region extraction on the CT image after threshold segmentation includes: extracting connected regions with region labels from the CT images after threshold segmentation; Whether the column where the pixel is located is greater than 20; when the judgment is yes, determine whether the area of the connected region with the region number 2 is greater than 2000; Row; when the judgment is no, the connected area labeled 2 in the area is the left and right lung adhesion lung area.
在本发明的优选实施方式中,对阈值分割后的CT图像进行肺区域提取包括:从阈值分割后的CT图像中提取出区域标号后的连通区域;判断区域标号为2的连通区域的最左端像素所在列是否大于20;当判断为是时,判断区域标号为2的连通区域的最右端像素所在列是否小于290列;当判断为否时,根据所述的CT图像确定所述区域标号为3的连通区域是否为左边肺区域。In a preferred embodiment of the present invention, performing lung region extraction on the CT image after threshold segmentation includes: extracting connected regions with region labels from the CT images after threshold segmentation; Whether the column where the pixel is located is greater than 20; when it is judged to be yes, whether the column where the rightmost pixel of the connected region whose area label is 2 is located is less than 290 columns; when it is judged to be no, determine that the area label is Whether the connected region of 3 is the left lung region.
在本发明的优选实施方式中,对阈值分割后的CT图像进行肺区域提取包括:从阈值分割后的CT图像中提取出区域标号后的连通区域;判断区域标号为2的连通区域的最右端像素所在列是否小于290列;当判断为是时,判断区域标号为2的连通区域的最左端像素所在列是否大于20;当判断为否时,根据所述的CT图像确定所述区域标号为3的连通区域是否为左边肺区域。In a preferred embodiment of the present invention, the extraction of the lung region from the CT image after threshold segmentation includes: extracting the connected region after the region label from the CT image after threshold segmentation; Whether the column where the pixel is located is less than 290 columns; when it is judged to be yes, whether the column where the leftmost pixel of the connected region whose area label is 2 is located is greater than 20; when it is judged to be no, determine that the area label is Whether the connected region of 3 is the left lung region.
在本发明的优选实施方式中,根据所述的CT图像确定所述区域标号为3的连通区域是否为左边肺区域包括:判断区域标号为2的连通区域最左端像素所在列是否小于2;当判断为是时,判断区域标号为3的连通区域的最右端像素所在列是否小于290;当判断为是时,判断区域标号为3的连通区域的面积是否大于2000;当判断为是时,所述区域标号为3的连通区域为左边肺区域。In a preferred embodiment of the present invention, determining whether the connected region labeled 3 is the left lung region according to the CT image includes: judging whether the column of the leftmost pixel of the connected region labeled 2 is less than 2; When the judgment is yes, it is judged whether the column of the rightmost pixel of the connected region with the region number 3 is less than 290; when the judgment is yes, whether the area of the connected region with the region number 3 is greater than 2000; The connected region labeled 3 in the above region is the left lung region.
在本发明的优选实施方式中,根据所述的CT图像确定所述区域标号为3的连通区域是否为左边肺部还包括:从区域标号不为1、2、3和4的连通区域中选取出面积大于2000的连通区域,即为右边肺区域。In a preferred embodiment of the present invention, determining whether the connected region labeled 3 is the left lung according to the CT image further includes: selecting from the connected regions not labeled 1, 2, 3 and 4 The connected region with an area greater than 2000 is the right lung region.
在本发明的优选实施方式中,对阈值分割后的CT图像进行肺区域提取包括:从阈值分割后的CT图像中提取出区域标号后的连通区域;从所述连通区域中确定出区域集合,所述区域集合包括了多个区域,每个区域均满足最左端像素所在列小于2且面积大于100000;从所述区域集合中确定出区域标号最大的区域,称为开始区域;从所述连通区域中筛选出疑似区域,所述疑似区域的区域标号大于所述开始区域的区域标号;从所述疑似区域中确定出目标区域,所述目标区域的面积大于2000,所述目标区域即为肺区域。In a preferred embodiment of the present invention, performing lung region extraction on the CT image after threshold segmentation includes: extracting connected regions with region labels from the CT image after threshold segmentation; determining a region set from the connected regions, The set of regions includes a plurality of regions, and each region satisfies that the column of the leftmost pixel is less than 2 and the area is greater than 100,000; the region with the largest region label is determined from the set of regions, which is called the starting region; from the connected A suspected area is screened out from the area, and the area label of the suspected area is greater than the area label of the starting area; the target area is determined from the suspected area, and the area of the target area is greater than 2000, and the target area is the lung area.
本发明的目的之一是,提供了一种基于胸部横断面CT图像的肺部分割提取系统,所述的系统包括CT图像获取装置,用于获取胸部横断面的CT图像;预处理装置,用于对所述的CT图像进行预处理;阈值分割装置,用于对预处理后的CT图像进行阈值分割;肺区域提取装置,用于对阈值分割后的CT图像进行肺区域提取。One of the objects of the present invention is to provide a system for lung segmentation and extraction based on chest cross-sectional CT images, the system includes a CT image acquisition device for obtaining CT images of chest cross-sections; a preprocessing device for The method is to preprocess the CT image; the threshold segmentation device is used to perform threshold segmentation on the preprocessed CT image; the lung region extraction device is used to perform lung region extraction on the thresholded CT image.
在本发明的优选实施方式中,采用中值滤波与小波去噪的联合去噪方法对所述的CT图像进行预处理。In a preferred embodiment of the present invention, the CT image is preprocessed using a joint denoising method of median filtering and wavelet denoising.
在本发明的优选实施方式中,所述的阈值分割装置包括:确定模块,用于从预处理后的CT图像中确定出灰度值小于0的像素;第一图像确定模块,用于将灰度值小于0的像素置为0,得到第一图像;直方图确定模块,用于确定所述第一图像的灰度直方图;分割阈值确定模块,用于确定所述灰度直方图中两波峰间的波谷,视为分割阈值;第二图像确定模块,用于根据所述的分割阈值对所述的第一图像进行初步二值分割,得到第二图像;第三图像确定模块,用于对所述的第二图像进行取反,得到第三图像;二值图像确定模块,用于采用形态学开运算对所述第三图像进行去除处理,得到二值图像;区域标号模块,用于对所述的二值图像中的连通区域按照从左到右、从上到下的策略进行区域标号,得到阈值分割后的CT图像。In a preferred embodiment of the present invention, the threshold segmentation device includes: a determination module, configured to determine pixels with a gray value less than 0 from the preprocessed CT image; a first image determination module, configured to convert the gray Pixels with a degree value less than 0 are set to 0 to obtain the first image; the histogram determination module is used to determine the gray histogram of the first image; the segmentation threshold determination module is used to determine the two grayscale histograms in the gray histogram The valley between the peaks is regarded as a segmentation threshold; the second image determination module is used to perform preliminary binary segmentation on the first image according to the segmentation threshold to obtain a second image; the third image determination module is used to Invert the second image to obtain a third image; a binary image determination module is used to remove the third image by using a morphological opening operation to obtain a binary image; a region label module is used to The connected regions in the binary image are labeled according to the strategy from left to right and from top to bottom to obtain the CT image after threshold segmentation.
在本发明的优选实施方式中,所述的肺区域提取装置包括:连通区域提取模块,用于从阈值分割后的CT图像中提取出区域标号后的连通区域;第一判断模块,用于判断区域标号为2的连通区域的最左端像素所在列是否大于20;第二判断模块,用于当所述的第一判断模块判断为是时,判断区域标号为2的连通区域的最右端像素所在列是否小于290列;第三判断模块,用于当所述的第二判断模块判断为是时,判断区域标号为2的连通区域的面积是否大于2000;第一肺部确定模块,用于当所述第三判断模块判断为是时,确定出所述区域标号为2的连通区域为左边肺区域。In a preferred embodiment of the present invention, the lung region extraction device includes: a connected region extraction module, used to extract connected regions with region labels from the CT image after threshold segmentation; a first judging module, used to judge Whether the column where the leftmost pixel of the connected region whose region label is 2 is greater than 20; the second judging module is used to judge whether the rightmost pixel of the connected region whose region is marked as 2 is located when the first judging module is judged to be yes. Whether the column is less than 290 columns; the third judging module is used to determine whether the area of the connected region whose area label is 2 is greater than 2000 when the second judging module judges as yes; the first lung determining module is used when When the third judging module judges yes, it determines that the connected region with the region number 2 is the left lung region.
所述的阈值分割装置还包括:第二肺部确定模块,用于从区域标号不为1和2的连通区域中选取出面积大于2000的连通区域,即为右边肺区域。The threshold segmentation device further includes: a second lung determination module, configured to select a connected region with an area greater than 2000 from the connected regions whose region numbers are not 1 and 2, namely the right lung region.
在本发明的优选实施方式中,所述的阈值分割装置还包括:第四判断模块,用于当所述的第一判断模块判断为是时,判断区域标号为2的连通区域的面积是否大于2000;第五判断模块,用于当所述第四判断模块判断为是时,判断区域标号为2的连通区域的最右端像素所在列是否小于290列;第三肺部确定模块,用于当所述第四判断模块判断为否时,确定出所述区域标号为2的连通区域为左右肺粘连肺区域。In a preferred embodiment of the present invention, the threshold segmentation device further includes: a fourth judging module, used for judging whether the area of the connected region labeled 2 is larger than 2000; the fifth judging module, used to determine whether the column of the rightmost pixel of the connected region whose region label is 2 is less than 290 columns when the fourth judging module judges as yes; the third lung determining module, used when When the fourth judging module judges no, it determines that the connected region with the region number 2 is the region of left and right lung adhesions.
在本发明的优选实施方式中,所述的肺区域提取装置包括:第六判断模块,用于判断区域标号为2的连通区域的最右端像素所在列是否小于290列;第七判断模块,用于当所述第六判断模块判断为是时,判断区域标号为2的连通区域的最左端像素所在列是否大于20;当所述第七判断模块判断为否时,所述的肺区域提取装置还包括:第四肺部确定模块,用于根据所述的CT图像确定所述区域标号为3的连通区域是否为左边肺区域。In a preferred embodiment of the present invention, the lung region extraction device includes: a sixth judging module, used to judge whether the column of the rightmost pixel of the connected region whose region number is 2 is less than 290 columns; a seventh judging module, using When the sixth judging module judges yes, it judges whether the column of the leftmost pixel of the connected region labeled 2 is greater than 20; when the seventh judging module judges no, the lung region extraction device It also includes: a fourth lung determining module, configured to determine whether the connected region labeled 3 is the left lung region according to the CT image.
在本发明的优选实施方式中,当所述第二判断模块判断为否时,所述的肺区域提取装置还包括:第四肺部确定模块,用于根据所述的CT图像确定所述区域标号为3的连通区域是否为左边肺区域。In a preferred embodiment of the present invention, when the second judging module judges no, the lung region extraction device further includes: a fourth lung determining module, configured to determine the region according to the CT image Whether the connected region labeled 3 is the left lung region.
在本发明的优选实施方式中,所述的第四肺部确定模块包括:第一判断单元,用于判断区域标号为2的连通区域最左端像素所在列是否小于2;第二判断单元,用于当所述第一判断单元判断为是时,判断区域标号为3的连通区域的最右端像素所在列是否小于290;第三判断单元,用于当所述第二判断单元判断为是时,判断区域标号为3的连通区域的面积是否大于2000;第一肺部确定单元,用于当所述第三判断单元判断为是时,确定出所述区域标号为3的连通区域为左边肺区域。In a preferred embodiment of the present invention, the fourth lung determination module includes: a first judging unit for judging whether the column of the leftmost pixel of the connected region with the region number 2 is less than 2; a second judging unit for When the first judging unit judges yes, judging whether the column of the rightmost pixel of the connected region labeled 3 is less than 290; the third judging unit is used to, when the second judging unit judges yes, Judging whether the area of the connected region marked as 3 is greater than 2000; the first lung determining unit is used to determine that the connected region marked as 3 is the left lung region when the third judging unit judges as yes .
在本发明的优选实施方式中,所述的第四肺部确定模块还包括:第二部确定单元,用于从区域标号不为1、2、3和4的连通区域中选取出面积大于2000的连通区域,即为右边肺区域。在本发明的优选实施方式中,所述的肺区域提取装置包括:区预计和确定模块,用于从所述连通区域中确定出区域集合,所述区域集合包括了多个区域,每个区域均满足最左端像素所在列小于2且面积大于100000;开始区域确定模块,用于从所述区域集合中确定出区域标号最大的区域,称为开始区域;疑似区域确定模块,用于从所述连通区域中筛选出疑似区域,所述疑似区域的区域标号大于所述开始区域的区域标号;目标区域确定模块,用于从所述疑似区域中确定出目标区域,所述目标区域的面积大于2000,所述目标区域即为肺区域。In a preferred embodiment of the present invention, the fourth lung determination module further includes: a second determination unit, configured to select an area larger than 2000 from connected areas whose area numbers are not 1, 2, 3, and 4; The connected area of is the right lung area. In a preferred embodiment of the present invention, the lung region extraction device includes: a region prediction and determination module, configured to determine a region set from the connected regions, the region set includes a plurality of regions, each region All satisfying that the column where the leftmost pixel is located is less than 2 and the area is greater than 100,000; the start area determination module is used to determine the area with the largest area label from the set of areas, which is called the start area; the suspected area determination module is used to determine from the A suspected area is screened out from the connected area, and the area label of the suspected area is greater than the area label of the starting area; the target area determination module is used to determine the target area from the suspected area, and the area of the target area is greater than 2000 , the target area is the lung area.
本发明的有益效果在于,提供了一种基于胸部横断面CT图像的肺部分割提取方法以及系统,通过对胸部横断面的CT图像进行预处理,然后进行阈值分割以及肺区域提取,能够实现对肺区域的精准分割,保证肺实质区域分割的完整性,避免由于肺区域的边缘缺失及区域的缺失而在后续诊断过程中造成漏诊的问题。The beneficial effect of the present invention is that it provides a lung segmentation and extraction method and system based on chest cross-sectional CT images, by preprocessing the chest cross-sectional CT images, and then performing threshold segmentation and lung region extraction, it is possible to realize the The precise segmentation of the lung area ensures the integrity of the segmentation of the lung parenchyma, and avoids the problem of missed diagnosis in the subsequent diagnosis process due to the lack of edges and areas of the lung area.
为让本发明的上述和其他目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附图式,作详细说明如下。In order to make the above and other objects, features and advantages of the present invention more comprehensible, preferred embodiments will be described in detail below together with the accompanying drawings.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.
图1为本发明实施例提供的一种基于胸部横断面CT图像的肺部分割提取方法的流程图;Fig. 1 is a flow chart of a lung segmentation and extraction method based on a chest cross-sectional CT image provided by an embodiment of the present invention;
图2为图1中的步骤S103的具体流程图;Fig. 2 is the specific flowchart of step S103 in Fig. 1;
图3为图1中的步骤S104的实施方式一的流程图;FIG. 3 is a flowchart of Embodiment 1 of step S104 in FIG. 1;
图4为图1中的步骤S104的实施方式二的流程图;FIG. 4 is a flowchart of the second embodiment of step S104 in FIG. 1;
图5为图1中的步骤S104的实施方式三的流程图;FIG. 5 is a flow chart of the third embodiment of step S104 in FIG. 1;
图6为图1中的步骤S104的实施方式四的流程图;FIG. 6 is a flowchart of Embodiment 4 of step S104 in FIG. 1;
图7为图1中的步骤S104的实施方式五的流程图;FIG. 7 is a flowchart of Embodiment 5 of step S104 in FIG. 1;
图8为图7中的步骤S704的实施方式一的流程图;FIG. 8 is a flowchart of Embodiment 1 of step S704 in FIG. 7;
图9为图7中的步骤S704的实施方式二的流程图;FIG. 9 is a flowchart of the second embodiment of step S704 in FIG. 7;
图10为图1中的步骤S104的实施方式六的流程图;FIG. 10 is a flowchart of Embodiment 6 of step S104 in FIG. 1;
图11为本发明实施例提供的一种基于胸部横断面CT图像的肺部分割提取系统的结构框图;FIG. 11 is a structural block diagram of a lung segmentation and extraction system based on a chest cross-sectional CT image provided by an embodiment of the present invention;
图12为本发明实施例提供的一种基于胸部横断面CT图像的肺部分割提取系统中阈值分割装置的结构框图;Fig. 12 is a structural block diagram of a threshold segmentation device in a lung segmentation and extraction system based on a chest cross-sectional CT image provided by an embodiment of the present invention;
图13为本发明实施例提供的一种基于胸部横断面CT图像的肺部分割提取系统中肺区域提取装置的实施方式一的结构框图;13 is a structural block diagram of Embodiment 1 of a lung region extraction device in a lung segmentation and extraction system based on a chest cross-sectional CT image provided by an embodiment of the present invention;
图14为本发明实施例提供的一种基于胸部横断面CT图像的肺部分割提取系统中肺区域提取装置的实施方式二的结构框图;14 is a structural block diagram of Embodiment 2 of a lung region extraction device in a lung segmentation and extraction system based on a chest cross-sectional CT image provided by an embodiment of the present invention;
图15为本发明实施例提供的一种基于胸部横断面CT图像的肺部分割提取系统中肺区域提取装置的实施方式三的结构框图;15 is a structural block diagram of Embodiment 3 of a lung region extraction device in a lung segmentation and extraction system based on a chest cross-sectional CT image provided by an embodiment of the present invention;
图16为本发明实施例提供的一种基于胸部横断面CT图像的肺部分割提取系统中肺区域提取装置的实施方式四的结构框图;Fig. 16 is a structural block diagram of Embodiment 4 of a lung region extraction device in a lung segmentation and extraction system based on a chest cross-sectional CT image provided by an embodiment of the present invention;
图17为本发明实施例提供的一种基于胸部横断面CT图像的肺部分割提取系统中肺区域提取装置的实施方式五的结构框图;Fig. 17 is a structural block diagram of Embodiment 5 of a lung region extraction device in a lung segmentation and extraction system based on a chest cross-sectional CT image provided by an embodiment of the present invention;
图18为本发明实施例提供的一种基于胸部横断面CT图像的肺部分割提取系统中第四肺部确定模块的实施方式一的结构框图;Fig. 18 is a structural block diagram of Embodiment 1 of the fourth lung determination module in a lung segmentation and extraction system based on chest cross-sectional CT images provided by an embodiment of the present invention;
图19为本发明实施例提供的一种基于胸部横断面CT图像的肺部分割提取系统中第四肺部确定模块的实施方式二的结构框图;19 is a structural block diagram of Embodiment 2 of the fourth lung determination module in a lung segmentation and extraction system based on chest cross-sectional CT images provided by an embodiment of the present invention;
图20为本发明实施例提供的一种基于胸部横断面CT图像的肺部分割提取系统中肺区域提取装置的实施方式六的结构框图;Fig. 20 is a structural block diagram of Embodiment 6 of a lung region extraction device in a lung segmentation and extraction system based on a chest cross-sectional CT image provided by an embodiment of the present invention;
图21为本发明提供的具体实施例中连通区域标号的示意图一;Figure 21 is a first schematic diagram of the connected area labels in the specific embodiment provided by the present invention;
图22为本发明提供的具体实施例中连通区域标号的示意图二;Fig. 22 is a second schematic diagram of the connected area labels in the specific embodiment provided by the present invention;
图23为本发明提供的具体实施例中肺区域提取的流程示意图;Fig. 23 is a schematic flow chart of lung region extraction in a specific embodiment provided by the present invention;
图24为本发明提供的实施例一中提取的肺区域的示意图;Figure 24 is a schematic diagram of the lung region extracted in Example 1 provided by the present invention;
图25为本发明提供的实施例一中肺实质区域的示意图;Figure 25 is a schematic diagram of the lung parenchyma region in Example 1 provided by the present invention;
图26为本发明提供的实施例二中提取的肺区域的示意图;Figure 26 is a schematic diagram of the lung region extracted in Example 2 provided by the present invention;
图27为本发明提供的实施例二中肺实质区域的示意图;Figure 27 is a schematic diagram of the lung parenchyma region in Example 2 provided by the present invention;
图28为本发明提供的实施例三中提取的肺区域的示意图;Figure 28 is a schematic diagram of the lung region extracted in Example 3 provided by the present invention;
图29为本发明提供的实施例三中肺实质区域的示意图。Fig. 29 is a schematic diagram of the lung parenchyma region in Example 3 provided by the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
在基于CT图像的肺癌计算机辅助诊断中,肺区域的正确完整的提取尤为重要,是肺结节提取的基础。本发明针对现有技术中胸部横切面CT图像背景复杂,正确完整的提取肺部区域极其困难的问题,提出了一种基于胸部横断面CT图像的肺部分割提取方法以及系统。In the computer-aided diagnosis of lung cancer based on CT images, the correct and complete extraction of lung regions is particularly important, which is the basis of lung nodule extraction. Aiming at the problem in the prior art that the chest cross-sectional CT image has a complex background and it is extremely difficult to correctly and completely extract the lung region, the present invention proposes a lung segmentation and extraction method and system based on the chest cross-sectional CT image.
下面首先介绍本发明的关键术语。The key terms of the present invention are firstly introduced below.
形态学运算(Morphologyoperations),是针对二值图象依据数学形态学(MathematicalMorphology)的集合论方法发展起来的图象处理方法。通常形态学图象处理表现为一种邻域运算形式,一种特殊定义的邻域称之为“结构元素”(StructureElement),在每个象素位置上它与二值图象对应的区域进行特定的逻辑运算,逻辑运算的结果为输出图像的相应像素,主要包括:腐蚀、膨胀、开运算和闭运算Morphology operations are image processing methods developed for binary images based on the set theory method of Mathematical Morphology. Usually, morphological image processing is performed as a form of neighborhood operation. A specially defined neighborhood is called a "structural element" (StructureElement). Specific logic operations, the result of the logic operation is the corresponding pixel of the output image, mainly including: erosion, expansion, opening operation and closing operation
肺结节(Lungnodule),在肺部CT图像上呈现结节状的病灶,孤立型实体结节、胸膜型结节、粘连血管型结节、毛玻璃结节和空洞型结节。Pulmonary nodules (Lungnodule), nodular lesions appear on lung CT images, solitary solid nodules, pleural nodules, adherent vascular nodules, ground glass nodules, and cavitary nodules.
计算机辅助诊断CAD是指通过影像学、医学图像处理技术以及其他可能的生理、生化手段,结合计算机的分析计算,辅助发现病灶,提高诊断的准确率。Computer-aided diagnosis (CAD) refers to the use of imaging, medical image processing technology, and other possible physiological and biochemical means, combined with computer analysis and calculation, to assist in the detection of lesions and improve the accuracy of diagnosis.
图1为本发明提出的一种基于胸部横断面CT图像的肺部分割提取方法的具体流程图,由图1可知,所述的方法包括:Fig. 1 is the specific flowchart of a kind of lung segmentation extraction method based on chest cross-sectional CT image that the present invention proposes, as can be seen from Fig. 1, described method comprises:
S101:获取胸部横断面的CT图像。S101: Acquire a CT image of a chest cross section.
在具体的实施方式中,胸部横断面的CT图像一般为DICOM格式。In a specific embodiment, the chest cross-sectional CT image is generally in DICOM format.
S102:对所述的CT图像进行预处理;S102: Preprocessing the CT image;
在具体的实施方式中,可采用中值滤波与小波去噪的联合去噪方法对所述的CT图像进行预处理去除噪声。In a specific implementation manner, the CT image may be preprocessed to remove noise by using a joint denoising method of median filtering and wavelet denoising.
S103:对预处理后的CT图像进行阈值分割。图2为步骤S103的具体流程图。S103: Perform threshold segmentation on the preprocessed CT image. FIG. 2 is a specific flowchart of step S103.
S104:对阈值分割后的CT图像进行肺区域提取。在具体的实施方式中,本发明可通过预先设定的模板对CT图像进行肺区域提取。S104: Perform lung region extraction on the CT image after threshold segmentation. In a specific implementation, the present invention can perform lung region extraction on CT images through a preset template.
图2为步骤S103的具体流程图,由图2可知,该步骤具体包括:Fig. 2 is the specific flowchart of step S103, as can be seen from Fig. 2, this step specifically comprises:
S201:从预处理后的CT图像中确定出灰度值小于0的像素;S201: Determine the pixels whose gray value is less than 0 from the preprocessed CT image;
S202:将灰度值小于0的像素置为0,得到第一图像。S202: Set pixels whose grayscale values are less than 0 to 0 to obtain a first image.
由于DICOM图像的灰度值范围为[-1024,1024],而人体区域包括肺区域的灰度值都大于0,因此首先通过固定阈值0,将小于0的灰度值置为0。Since the gray value range of the DICOM image is [-1024,1024], and the gray value of the human body area including the lung area is greater than 0, the gray value of less than 0 is set to 0 by fixing the threshold value 0 first.
S203:确定所述第一图像的灰度直方图;S203: Determine the grayscale histogram of the first image;
S204:确定所述灰度直方图中两波峰间的波谷,视为分割阈值;S204: Determine a valley between two peaks in the grayscale histogram as a segmentation threshold;
S205:根据所述的分割阈值对所述的第一图像进行初步二值分割,得到第二图像;S205: Perform preliminary binary segmentation on the first image according to the segmentation threshold to obtain a second image;
在具体的实施方式中,还可采用Ostu算法估算分割阈值,初步分割肺部区域(经验阈值为500)。In a specific embodiment, an Ostu algorithm can also be used to estimate the segmentation threshold, and initially segment the lung region (the empirical threshold is 500).
S206:对所述的第二图像进行取反,得到第三图像;S206: Invert the second image to obtain a third image;
S207:采用形态学开运算对所述第三图像进行去除处理,得到二值图像;S207: Perform a removal process on the third image by using a morphological opening operation to obtain a binary image;
S208:对所述的二值图像中的连通区域按照从左到右、从上到下的策略进行区域标号,得到阈值分割后的CT图像。S208: Label the connected regions in the binary image according to the strategy from left to right and from top to bottom to obtain a CT image after threshold segmentation.
采用形态学开运算去除二值图像中面积较小的连通区域,然后对图像进行区域标号(该区域是指连通区域)。在具体的实施方式中,对第三图像进行开运算,结构元素为半径为2的圆,目的去除孤立“小岛”获得二值图像。图21、图22分别为本发明提供的具体实施例中连通区域标号的示意。The morphological opening operation is used to remove the smaller connected regions in the binary image, and then the image is marked with regions (the regions refer to the connected regions). In a specific embodiment, an opening operation is performed on the third image, and the structural element is a circle with a radius of 2, with the purpose of removing isolated "islands" to obtain a binary image. Fig. 21 and Fig. 22 are schematic diagrams of the labels of the connected areas in the specific embodiments provided by the present invention.
在本发明的其他实施方式中,肺实质区域分割,还可以通过双高斯混合模型的概率密度分布实现阈值分割,然后通过数学形态学运算孤岛去除与缺损修补。In other embodiments of the present invention, the segmentation of lung parenchyma region can also implement threshold segmentation through the probability density distribution of the double Gaussian mixture model, and then remove islands and repair defects through mathematical morphological operations.
图3为步骤S104的实施方式一的流程图,由图3可知,在实施方式一中,通过预先设定的模板对肺区域进行提取,该步骤具体包括:Fig. 3 is a flow chart of the first embodiment of step S104. It can be seen from Fig. 3 that in the first embodiment, the lung region is extracted through a preset template, and this step specifically includes:
S301:从阈值分割后的CT图像中提取出区域标号后的连通区域。以图22为例,提取出的连通区域为区域标号为1的连通区域以及区域标号为2的连通区域。以图21为例,提取出的连通区域为区域标号依次为1至5的连通区域。S301: Extract connected regions with region labels from the CT image after threshold segmentation. Taking FIG. 22 as an example, the extracted connected regions are the connected region with the region number 1 and the connected region with the region number 2. Taking FIG. 21 as an example, the extracted connected regions are connected regions whose region numbers are 1 to 5 in sequence.
S302:判断区域标号为2的连通区域的最左端像素所在列是否大于20,也即对应索引是否大于10000;S302: Determine whether the column of the leftmost pixel of the connected region whose region number is 2 is greater than 20, that is, whether the corresponding index is greater than 10000;
S303:当判断为是时,判断区域标号为2的连通区域的最右端像素所在列是否小于290列,也即对应索引是否小于150000;S303: When the judgment is yes, judge whether the column of the rightmost pixel of the connected region labeled 2 is less than 290 columns, that is, whether the corresponding index is less than 150000;
S304:当判断为是时,判断区域标号为2的连通区域的面积(包含的像素点数)是否大于2000;S304: When the judgment is yes, whether the area (the number of pixels included) of the connected region whose region label is 2 is greater than 2000 is judged;
S305:当判断为是时,所述区域标号为2的连通区域为左边肺区域。在这里是以观察者为参考,与解剖学中不一致。S305: When the judgment is yes, the connected region whose region number is 2 is the left lung region. Observer-referenced here, not consistent with anatomy.
在实施方式一中,判断标号为2的连通区域是否为左肺,即判断该连通区域是否满足条件1(判断2区域最左端像素所在列是否大于20(对应索引大于10000))、条件2(判断2区域最右端像素所在列是否小于290列(对应索引小于150000))、条件3(判断区域2的面积(包含的像素点数)是否大于2000)。当且仅当三个条件都满足,可以判断2区域为左肺区域。In Embodiment 1, it is judged whether the connected region labeled 2 is the left lung, that is, it is judged whether the connected region satisfies condition 1 (judging whether the column of the leftmost pixel of region 2 is greater than 20 (the corresponding index is greater than 10000)), condition 2 ( Judging whether the column of the rightmost pixel in area 2 is less than 290 columns (the corresponding index is less than 150000)), condition 3 (judging whether the area of area 2 (the number of pixels included) is greater than 2000). If and only if the three conditions are met, it can be judged that region 2 is the left lung region.
图4为步骤S104的实施方式二的流程图,由图4可知,在实施方式二中,通过预先设定的模板对肺区域进行提取,该步骤具体包括:FIG. 4 is a flow chart of the second embodiment of step S104. It can be seen from FIG. 4 that in the second embodiment, the lung region is extracted through a preset template, and this step specifically includes:
S401:从阈值分割后的CT图像中提取出区域标号后的连通区域。以图22为例,提取出的连通区域为区域标号为1的连通区域以及区域标号为2的连通区域。以图21为例,提取出的连通区域为区域标号依次为1至5的连通区域。S401: Extract connected regions with region labels from the CT image after threshold segmentation. Taking Fig. 22 as an example, the extracted connected regions are the connected region with region number 1 and the connected region with region number 2. Taking FIG. 21 as an example, the extracted connected regions are connected regions whose region numbers are 1 to 5 in sequence.
S402:判断区域标号为2的连通区域的最左端像素所在列是否大于20,也即对应索引是否大于10000;S402: Determine whether the column of the leftmost pixel of the connected region whose region number is 2 is greater than 20, that is, whether the corresponding index is greater than 10000;
S403:当判断为是时,判断区域标号为2的连通区域的最右端像素所在列是否小于290列,也即对应索引是否小于150000;S403: When the judgment is yes, judge whether the column of the rightmost pixel of the connected region labeled 2 is less than 290 columns, that is, whether the corresponding index is less than 150000;
S404:当判断为是时,判断区域标号为2的连通区域的面积(包含的像素点数)是否大于2000;S404: When the judgment is yes, judge whether the area (the number of pixels included) of the connected region whose region label is 2 is greater than 2000;
S405:当判断为是时,所述区域标号为2的连通区域为左边肺区域。在这里是以观察者为参考,与解剖学中不一致。S405: When the judgment is yes, the connected region whose region number is 2 is the left lung region. Observer-referenced here, not consistent with anatomy.
S406:从区域标号不为1和2的连通区域中选取出面积大于2000的连通区域,即为右边肺区域。S406: Select a connected region with an area larger than 2000 from the connected regions whose region labels are not 1 and 2, which is the right lung region.
在实施方式二中,首先判断标号为2的连通区域是否为左肺,即判断该连通区域是否满足条件1、条件2、条件3。当且仅当三个条件都满足,可以判断标号为2的区域为左肺区域,同时,标号为1区域为人体与CT间的空隙区域,然后从标号为3区域开始搜索寻找面积大于2000的连通区域,如果存在将其视为右肺,否则断层影像只找到一个肺区域。In the second embodiment, it is firstly judged whether the connected region marked with 2 is the left lung, that is, it is judged whether the connected region satisfies condition 1, condition 2, and condition 3. If and only if the three conditions are met, it can be judged that the area marked 2 is the left lung area, and at the same time, the area marked 1 is the gap area between the human body and CT, and then search from the area marked 3 to find the area larger than 2000 If there is a connected area, it is regarded as the right lung, otherwise the tomographic image only finds one lung area.
图5为步骤S104的实施方式三的流程图,由图5可知,在实施方式三中,通过预先设定的模板对肺区域进行提取,该步骤具体包括:FIG. 5 is a flow chart of the third embodiment of step S104. It can be seen from FIG. 5 that in the third embodiment, the lung region is extracted through a preset template, and this step specifically includes:
S501:从阈值分割后的CT图像中提取出区域标号后的连通区域。以图22为例,提取出的连通区域为区域标号为1的连通区域以及区域标号为2的连通区域。以图21为例,提取出的连通区域为区域标号依次为1至5的连通区域。S501: Extract connected regions with region labels from the CT image after threshold segmentation. Taking Fig. 22 as an example, the extracted connected regions are the connected region with region number 1 and the connected region with region number 2. Taking FIG. 21 as an example, the extracted connected regions are connected regions whose region numbers are 1 to 5 in sequence.
S502:判断区域标号为2的连通区域的最左端像素所在列是否大于20,也即对应索引是否大于10000。该步骤判断标号为2的连通区域是否满足条件1。S502: Determine whether the column of the leftmost pixel of the connected region whose region number is 2 is greater than 20, that is, whether the corresponding index is greater than 10000. This step judges whether the connected region labeled 2 satisfies condition 1.
S503:当判断为是时,判断区域标号为2的连通区域的面积(包含的像素点数)是否大于2000,该步骤判断标号为2的连通区域是否满足条件3。S503: When the judgment is yes, it is judged whether the area (the number of pixels included) of the connected region labeled 2 is greater than 2000, and this step judges whether the connected region labeled 2 satisfies the condition 3.
S504:当判断为是时,判断区域标号为2的连通区域的最右端像素所在列是否小于290列,也即对应索引是否小于150000,该步骤判断标号为2的连通区域是否满足条件2。S504: When the judgment is yes, judge whether the column of the rightmost pixel of the connected region labeled 2 is less than 290 columns, that is, whether the corresponding index is less than 150000, and this step judges whether the connected region labeled 2 satisfies condition 2.
S505:当判断为否时,所述区域标号为2的连通区域为左右肺粘连肺区域。S505: When the judgment is no, the connected area with the area number 2 is the left and right lung adhesion lung area.
在实施方式三中,首先判断标号为2的连通区域是否满足条件1、条件3、条件2。当且仅当条件2不满足即2区域的最右端像素所在列不小于290时,可以判断标号为2的区域为左右肺粘连的肺区域。In Embodiment 3, it is first judged whether the connected region labeled 2 satisfies condition 1, condition 3, and condition 2. If and only if the condition 2 is not satisfied, that is, the column of the rightmost pixel of the 2 area is not less than 290, it can be judged that the area labeled 2 is the lung area with the adhesion of the left and right lungs.
图6为步骤S104的实施方式四的流程图,由图6可知,在实施方式四中,通过预先设定的模板对肺区域进行提取,该步骤具体包括:FIG. 6 is a flow chart of the fourth embodiment of step S104. It can be seen from FIG. 6 that in the fourth embodiment, the lung region is extracted through a preset template, and this step specifically includes:
S601:从阈值分割后的CT图像中提取出区域标号后的连通区域。以图22为例,提取出的连通区域为区域标号为1的连通区域以及区域标号为2的连通区域。以图21为例,提取出的连通区域为区域标号依次为1至5的连通区域。S601: Extract connected regions with region labels from the thresholded CT image. Taking Fig. 22 as an example, the extracted connected regions are the connected region with region number 1 and the connected region with region number 2. Taking FIG. 21 as an example, the extracted connected regions are connected regions whose region numbers are 1 to 5 in sequence.
S602:判断区域标号为2的连通区域的最左端像素所在列是否大于20,也即对应索引是否大于10000。该步骤判断标号为2的连通区域是否满足条件1。S602: Determine whether the column of the leftmost pixel of the connected region whose region number is 2 is greater than 20, that is, whether the corresponding index is greater than 10000. This step judges whether the connected region labeled 2 satisfies condition 1.
S603:当判断为是时,判断区域标号为2的连通区域的最右端像素所在列是否小于290列,也即对应索引是否小于150000,该步骤判断标号为2的连通区域是否满足条件2。S603: When the judgment is yes, judge whether the column of the rightmost pixel of the connected region labeled 2 is less than 290 columns, that is, whether the corresponding index is less than 150000, and this step judges whether the connected region labeled 2 satisfies condition 2.
S604:当判断为否时,根据所述的CT图像确定所述区域标号为3的连通区域是否为左边肺区域。S604: When the judgment is no, determine whether the connected region with the region number 3 is the left lung region according to the CT image.
在实施方式四中,首先判断标号为2的连通区域是否满足条件1、条件2。当且仅当条件1满足条件2不满足时,根据所述的CT图像确定所述区域标号为3的连通区域是否为左边肺区域。In Embodiment 4, it is first judged whether the connected region labeled 2 satisfies condition 1 and condition 2. If and only if condition 1 is satisfied and condition 2 is not satisfied, determine whether the connected region labeled 3 is the left lung region according to the CT image.
图7为步骤S104的实施方式五的流程图,由图7可知,在实施方式五中,通过预先设定的模板对肺区域进行提取,该步骤具体包括:FIG. 7 is a flow chart of the fifth embodiment of step S104. It can be seen from FIG. 7 that in the fifth embodiment, the lung region is extracted through a preset template, and this step specifically includes:
S701:从阈值分割后的CT图像中提取出区域标号后的连通区域。以图22为例,提取出的连通区域为区域标号为1的连通区域以及区域标号为2的连通区域。以图21为例,提取出的连通区域为区域标号依次为1至5的连通区域。S701: Extract connected regions with region labels from the CT image after threshold segmentation. Taking Fig. 22 as an example, the extracted connected regions are the connected region with region number 1 and the connected region with region number 2. Taking FIG. 21 as an example, the extracted connected regions are connected regions whose region numbers are 1 to 5 in sequence.
S702:判断区域标号为2的连通区域的最右端像素所在列是否小于290列,也即对应索引是否小于150000,该步骤判断标号为2的连通区域是否满足条件2。S702: Determine whether the column of the rightmost pixel of the connected region labeled 2 is less than 290 columns, that is, whether the corresponding index is less than 150000. This step determines whether the connected region labeled 2 satisfies condition 2.
S703:当判断为是时,判断区域标号为2的连通区域的最左端像素所在列是否大于20,也即对应索引是否大于10000。该步骤判断标号为2的连通区域是否满足条件1。S703: When the judgment is yes, it is judged whether the column of the leftmost pixel of the connected region whose region number is 2 is greater than 20, that is, whether the corresponding index is greater than 10000. This step judges whether the connected region labeled 2 satisfies condition 1.
S704:当判断为否时,根据所述的CT图像确定所述区域标号为3的连通区域是否为左边肺区域。S704: When the judgment is no, determine whether the connected region with the region number 3 is the left lung region according to the CT image.
在实施方式五中,首先判断标号为2的连通区域是否满足条件1、条件2。当且仅当条件1不满足条件2满足时,根据所述的CT图像确定所述区域标号为3的连通区域是否为左边肺区域。In Embodiment 5, it is first judged whether the connected region labeled 2 satisfies condition 1 and condition 2. If and only if condition 1 is not satisfied and condition 2 is satisfied, it is determined whether the connected region labeled 3 is the left lung region according to the CT image.
图8为图6中的步骤S604、图7中的步骤S704的实施方式一的流程图,由图8可知,在实施方式一中,根据所述的CT图像确定所述区域标号为3的连通区域是否为左边肺区域具体包括:Fig. 8 is a flow chart of the first embodiment of step S604 in Fig. 6 and step S704 in Fig. 7. It can be seen from Fig. 8 that in the first embodiment, the connectivity of the area labeled 3 is determined according to the CT image. Whether the area is the left lung area specifically includes:
S801:判断区域标号为2的连通区域最左端像素所在列是否小于2,也即对应索引是否小于1000;S801: Determine whether the column of the leftmost pixel of the connected region whose region number is 2 is less than 2, that is, whether the corresponding index is less than 1000;
S802:当判断为是时,判断区域标号为3的连通区域的最右端像素所在列是否小于290列,也即对应索引是否小于150000;S802: When the judgment is yes, judge whether the column of the rightmost pixel of the connected region labeled 3 is less than 290 columns, that is, whether the corresponding index is less than 150000;
S803:当判断为是时,判断区域标号为3的连通区域的面积(包含的像素点数)是否大于2000;S803: When the determination is yes, determine whether the area (the number of pixels included) of the connected region whose region number is 3 is greater than 2000;
S804:当判断为是时,所述区域标号为3的连通区域为左边肺区域。S804: When the judgment is yes, the connected region whose region number is 3 is the left lung region.
在该实施方式中,判断标号为3的连通区域是否为左肺,即判断该连通区域是否满足最左端像素所在列是否小于2、判断标号为3的连通区域最右端像素所在列是否小于290列(对应索引小于150000)、判断标号为3的连通区域的面积(包含的像素点数)是否大于2000)。当且仅当三个条件都满足,可以判断3区域为左肺区域。In this embodiment, judging whether the connected region labeled 3 is the left lung, that is, judging whether the connected region satisfies whether the column of the leftmost pixel is less than 2, and judging whether the column of the rightmost pixel of the connected region labeled 3 is less than 290 columns (the corresponding index is less than 150000), and judge whether the area of the connected region labeled 3 (the number of pixels included) is greater than 2000). If and only if the three conditions are met, it can be judged that the area 3 is the left lung area.
图9为图6中的步骤S604、图7中的步骤S704的实施方式二的流程图,由图9可知,在该实施方式中,根据所述的CT图像确定所述区域标号为3的连通区域是否为左边肺区域具体包括:Fig. 9 is a flow chart of the second embodiment of step S604 in Fig. 6 and step S704 in Fig. 7. It can be seen from Fig. 9 that in this embodiment, the connectivity of the region labeled 3 is determined according to the CT image. Whether the area is the left lung area specifically includes:
S901:判断区域标号为2的连通区域最左端像素所在列是否小于2,也即对应索引是否小于1000;S901: Determine whether the column of the leftmost pixel of the connected region whose region number is 2 is less than 2, that is, whether the corresponding index is less than 1000;
S902:当判断为是时,判断区域标号为3的连通区域的最右端像素所在列是否小于290列,也即对应索引是否小于150000;S902: When the judgment is yes, judge whether the column of the rightmost pixel of the connected region labeled 3 is less than 290 columns, that is, whether the corresponding index is less than 150000;
S903:当判断为是时,判断区域标号为3的连通区域的面积(包含的像素点数)是否大于2000;S903: When the judgment is yes, it is judged whether the area (the number of pixels included) of the connected region whose region number is 3 is greater than 2000;
S904:当判断为是时,所述区域标号为3的连通区域为左边肺区域。S904: When the judgment is yes, the connected region whose region number is 3 is the left lung region.
S905:从区域标号不为1和2的连通区域中选取出面积大于2000的连通区域,即为右边肺区域。S905: Select a connected region with an area greater than 2000 from the connected regions whose region labels are not 1 and 2, which is the right lung region.
在该实施方式中,判断标号为3的连通区域是否为左肺,即判断该连通区域是否满足最左端像素所在列是否小于2、判断标号为3的连通区域最右端像素所在列是否小于290列(对应索引小于150000)、判断标号为3的连通区域的面积(包含的像素点数)是否大于2000)。当且仅当三个条件都满足,可以判断标号为3的区域为左肺区域,标号为1的区域和标号为2的区域为人体与CT间的空隙区域,然后从标号为4的区域开始搜索寻找面积大于2000的连通区域,如果存在将其视为右肺,否则断层影像只找到一个肺区域。In this embodiment, judging whether the connected region labeled 3 is the left lung, that is, judging whether the connected region satisfies whether the column of the leftmost pixel is less than 2, and judging whether the column of the rightmost pixel of the connected region labeled 3 is less than 290 columns (the corresponding index is less than 150000), and judge whether the area of the connected region labeled 3 (the number of pixels included) is greater than 2000). If and only if the three conditions are met, it can be judged that the area marked 3 is the left lung area, the area marked 1 and the area marked 2 are the gap area between the human body and CT, and then start from the area marked 4 Search to find a connected region with an area greater than 2000, if it exists, it will be regarded as the right lung, otherwise, only one lung region will be found in the tomographic image.
图10为步骤S104的实施方式六的流程图,由图10可知,在实施方式六中,上述实施方式一至实施方式五的条件均不满足,通过预先设定的模板对肺区域进行提取,该步骤具体包括:Fig. 10 is a flow chart of the sixth embodiment of step S104. It can be seen from Fig. 10 that in the sixth embodiment, none of the conditions of the first embodiment to the fifth embodiment are satisfied, and the lung region is extracted through a preset template. The steps specifically include:
S1001:从阈值分割后的CT图像中提取出区域标号后的连通区域。以图22为例,提取出的连通区域为区域标号为1的连通区域以及区域标号为2的连通区域。以图21为例,提取出的连通区域为区域标号依次为1至5的连通区域。S1001: Extract connected regions with region labels from the CT image after threshold segmentation. Taking Fig. 22 as an example, the extracted connected regions are the connected region with region number 1 and the connected region with region number 2. Taking FIG. 21 as an example, the extracted connected regions are connected regions whose region numbers are 1 to 5 in sequence.
S1002:从所述连通区域中确定出区域集合,所述区域集合包括了多个区域,每个区域均满足最左端像素所在列小于2且面积大于100000。S1002: Determine a region set from the connected regions, the region set includes a plurality of regions, and each region satisfies that the column where the leftmost pixel is located is less than 2 and the area is greater than 100,000.
在具体的实施方式中,依次判断每个连通区域的最左端像素所在列是否小于2,当判断为是时,继续判断该连通区域的面积是否大于100000,当判断为是时,该连通区域即可作为区域集合中的区域。In a specific embodiment, it is judged sequentially whether the column where the leftmost pixel of each connected region is located is less than 2, and when the judgment is yes, continue to judge whether the area of the connected region is greater than 100,000, when the judgment is yes, the connected region is Available as a region in a region collection.
S1003:从所述区域集合中确定出区域标号最大的区域,称为开始区域;S1003: Determine the area with the largest area label from the set of areas, which is called the starting area;
S1004:从所述连通区域中筛选出疑似区域,所述疑似区域的区域标号大于所述开始区域的区域标号。S1004: Screen out a suspected region from the connected regions, where the region label of the suspected region is greater than the region label of the starting region.
S1005:从所述疑似区域中确定出目标区域,所述目标区域的面积大于2000,所述目标区域即为肺区域。S1005: Determine a target area from the suspected area, where the area of the target area is larger than 2000, and the target area is the lung area.
在实施方式六中,首先判断人体与CT间的空隙区域标号,级依次遍历所有连通区域,搜索出最后一个满足区域最左端像素所在列小于2(对应索引小于1000),且区域面积大于100000的区域,该区域即开始区域为人体与CT间的空隙区域,将该区域标号记为start。从start+1区域开始遍历所有连通区域,将其面积从大到小排列,选取所有面积大于2000的区块组合视为肺区域。In Embodiment 6, first judge the label of the gap area between the human body and the CT, and then traverse all the connected areas sequentially, and search for the last one that satisfies the fact that the leftmost pixel of the area is located in a column less than 2 (the corresponding index is less than 1000), and the area area is greater than 100,000 area, the start area is the gap area between the human body and the CT, and this area is marked as start. Start from the start+1 region to traverse all connected regions, arrange their areas from large to small, and select all block combinations with an area greater than 2000 as lung regions.
如上所述,即为本发明提出的一种基于胸部横断面CT图像的肺部分割提取方法,通过对胸部横断面的CT图像进行预处理,然后进行阈值分割,最后根据预先设定的模板进行肺区域提取,能够实现对肺区域的精准分割,保证肺实质区域分割的完整性。As mentioned above, it is a method of lung segmentation and extraction based on chest cross-sectional CT images proposed by the present invention, by preprocessing the chest cross-sectional CT images, then performing threshold segmentation, and finally performing lung segmentation according to a preset template. The lung area extraction can realize the precise segmentation of the lung area and ensure the integrity of the lung parenchymal area segmentation.
图11为本发明实施例提供的一种基于胸部横断面CT图像的肺部分割提取系统的结构框图,由图11可知,所述的系统包括:Fig. 11 is a structural block diagram of a lung segmentation and extraction system based on chest cross-sectional CT images provided by an embodiment of the present invention. It can be seen from Fig. 11 that the system includes:
CT图像获取装置100,用于获取胸部横断面的CT图像。The CT image acquisition device 100 is configured to acquire a CT image of a chest cross section.
在具体的实施方式中,胸部横断面的CT图像一般为DICOM格式。In a specific embodiment, the chest cross-sectional CT image is generally in DICOM format.
预处理装置200,用于对所述的CT图像进行预处理;A preprocessing device 200, configured to preprocess the CT image;
在具体的实施方式中,可采用中值滤波与小波去噪的联合去噪方法对所述的CT图像进行预处理去除噪声。In a specific implementation manner, the CT image may be preprocessed to remove noise by using a joint denoising method of median filtering and wavelet denoising.
阈值分割装置300,用于对预处理后的CT图像进行阈值分割。图12为阈值分割装置的具体结构框图。The threshold segmentation device 300 is configured to perform threshold segmentation on the preprocessed CT image. Fig. 12 is a specific structural block diagram of the threshold segmentation device.
肺区域提取装置400,用于对阈值分割后的CT图像进行肺区域提取。在具体的实施方式中,本发明可通过预先设定的模板对CT图像进行肺区域提取。The lung region extracting device 400 is configured to extract lung regions from CT images after threshold segmentation. In a specific implementation, the present invention can perform lung region extraction on CT images through a preset template.
图12为本发明实施例提供的一种基于胸部横断面CT图像的肺部分割提取系统中阈值分割装置的结构框图,由图12可知,阈值分割装置300具体包括:FIG. 12 is a structural block diagram of a threshold segmentation device in a lung segmentation and extraction system based on chest cross-sectional CT images provided by an embodiment of the present invention. It can be seen from FIG. 12 that the threshold segmentation device 300 specifically includes:
确定模块301,用于从预处理后的CT图像中确定出灰度值小于0的像素;A determination module 301, configured to determine pixels with a gray value less than 0 from the preprocessed CT image;
第一图像确定模块302,用于将灰度值小于0的像素置为0,得到第一图像。The first image determining module 302 is configured to set pixels whose grayscale values are less than 0 to 0 to obtain the first image.
由于DICOM图像的灰度值范围为[-1024,1024],而人体区域包括肺区域的灰度值都大于0,因此首先通过固定阈值0,将小于0的灰度值置为0。Since the gray value range of the DICOM image is [-1024,1024], and the gray value of the human body area including the lung area is greater than 0, the gray value of less than 0 is set to 0 by fixing the threshold value 0 first.
直方图确定模块303,用于确定所述第一图像的灰度直方图;A histogram determining module 303, configured to determine the grayscale histogram of the first image;
分割阈值确定模块304,用于确定所述灰度直方图中两波峰间的波谷,视为分割阈值;A segmentation threshold determination module 304, configured to determine a valley between two peaks in the grayscale histogram, which is regarded as a segmentation threshold;
第二图像确定模块305,用于根据所述的分割阈值对所述的第一图像进行初步二值分割,得到第二图像;The second image determination module 305 is configured to perform preliminary binary segmentation on the first image according to the segmentation threshold to obtain a second image;
在具体的实施方式中,还可采用Ostu算法估算分割阈值,初步分割肺部区域(经验阈值为500)。In a specific embodiment, an Ostu algorithm can also be used to estimate the segmentation threshold, and initially segment the lung region (the empirical threshold is 500).
第三图像确定模块306,用于对所述的第二图像进行取反,得到第三图像;The third image determination module 306 is configured to invert the second image to obtain a third image;
二值图像确定模块307,用于采用形态学开运算对所述第三图像进行去除处理,得到二值图像;The binary image determining module 307 is configured to perform removal processing on the third image by using a morphological opening operation to obtain a binary image;
区域标号模块308,用于对所述的二值图像中的连通区域按照从左到右、从上到下的策略进行区域标号,得到阈值分割后的CT图像。The region labeling module 308 is configured to perform region labeling on the connected regions in the binary image according to a strategy from left to right and from top to bottom to obtain a CT image after threshold segmentation.
采用形态学开运算去除二值图像中面积较小的连通区域,然后对图像进行区域标号(该区域是指连通区域)。在具体的实施方式中,对第三图像进行开运算,结构元素为半径为2的圆,目的去除孤立“小岛”获得二值图像。图21、图22分别为本发明提供的具体实施例中连通区域标号的示意。The morphological opening operation is used to remove the smaller connected regions in the binary image, and then the image is marked with regions (the regions refer to the connected regions). In a specific embodiment, an opening operation is performed on the third image, and the structural element is a circle with a radius of 2, with the purpose of removing isolated "islands" to obtain a binary image. Fig. 21 and Fig. 22 are schematic diagrams of the labels of the connected areas in the specific embodiments provided by the present invention.
在本发明的其他实施方式中,肺实质区域分割,还可以通过双高斯混合模型的概率密度分布实现阈值分割,然后通过数学形态学运算孤岛去除与缺损修补。In other embodiments of the present invention, the segmentation of lung parenchyma region can also implement threshold segmentation through the probability density distribution of the double Gaussian mixture model, and then remove islands and repair defects through mathematical morphological operations.
图13为本发明实施例提供的一种基于胸部横断面CT图像的肺部分割提取系统中肺部提取装置的实施方式一的结构框图,由图13可知,在实施方式一中,肺区域提取装置400具体包括:Fig. 13 is a structural block diagram of Embodiment 1 of a lung extraction device in a lung segmentation extraction system based on chest cross-sectional CT images provided by an embodiment of the present invention. It can be seen from Fig. 13 that in Embodiment 1, lung region extraction The device 400 specifically includes:
连通区域提取模块401,用于从阈值分割后的CT图像中提取出区域标号后的连通区域。以图22为例,提取出的连通区域为区域标号为1的连通区域以及区域标号为2的连通区域。以图21为例,提取出的连通区域为区域标号依次为1至5的连通区域。The connected region extraction module 401 is configured to extract connected regions with region labels from the CT image after threshold segmentation. Taking Fig. 22 as an example, the extracted connected regions are the connected region with region number 1 and the connected region with region number 2. Taking FIG. 21 as an example, the extracted connected regions are connected regions whose region numbers are 1 to 5 in sequence.
第一判断模块402,用于判断区域标号为2的连通区域的最左端像素所在列是否大于20,也即对应索引是否大于10000;The first judging module 402 is used to judge whether the column where the leftmost pixel of the connected region whose region label is 2 is located is greater than 20, that is, whether the corresponding index is greater than 10000;
第二判断模块403,用于当所述的第一判断模块判断为是时,,判断区域标号为2的连通区域的最右端像素所在列是否小于290列,也即对应索引是否小于150000;The second judging module 403 is used to determine whether the column where the rightmost pixel of the connected region whose region label is 2 is located is less than 290 columns, that is, whether the corresponding index is less than 150000 when the judgment of the first judging module is yes;
第三判断模块404,用于当所述的第二判断模块判断为是时,判断区域标号为2的连通区域的面积(包含的像素点数)是否大于2000;The third judging module 404, for when the second judging module is judged to be yes, whether the area (the number of pixels included) of the connected region whose judgment region label is 2 is greater than 2000;
第一肺部确定模块405,用于当所述第三判断模块判断为是时,所述区域标号为2的连通区域为左边肺区域。在这里是以观察者为参考,与解剖学中不一致。The first lung determining module 405 is configured to determine that the connected region with the region number 2 is the left lung region when the third judging module judges yes. Observer-referenced here, not consistent with anatomy.
在实施方式一中,判断标号为2的连通区域是否为左肺,即判断该连通区域是否满足条件1(判断2区域最左端像素所在列是否大于20(对应索引大于10000))、条件2(判断2区域最右端像素所在列是否小于290列(对应索引小于150000))、条件3(判断区域2的面积(包含的像素点数)是否大于2000)。当且仅当三个条件都满足,可以判断2区域为左肺区域。In Embodiment 1, it is judged whether the connected region labeled 2 is the left lung, that is, it is judged whether the connected region satisfies condition 1 (judging whether the column of the leftmost pixel of region 2 is greater than 20 (the corresponding index is greater than 10000)), condition 2 ( Judging whether the column of the rightmost pixel in area 2 is less than 290 columns (the corresponding index is less than 150000)), condition 3 (judging whether the area of area 2 (the number of pixels included) is greater than 2000). If and only if the three conditions are met, it can be judged that region 2 is the left lung region.
图14为本发明实施例提供的一种基于胸部横断面CT图像的肺部分割提取系统中肺部提取装置的实施方式二的结构框图,由图14可知,在实施方式二中,阈值分割装置具体包括:Fig. 14 is a structural block diagram of the second embodiment of the lung extraction device in a lung segmentation and extraction system based on chest cross-sectional CT images provided by an embodiment of the present invention. It can be seen from Fig. 14 that in the second embodiment, the threshold segmentation device Specifically include:
连通区域提取模块401,用于从阈值分割后的CT图像中提取出区域标号后的连通区域。以图22为例,提取出的连通区域为区域标号为1的连通区域以及区域标号为2的连通区域。以图21为例,提取出的连通区域为区域标号依次为1至5的连通区域。The connected region extraction module 401 is configured to extract connected regions with region labels from the CT image after threshold segmentation. Taking Fig. 22 as an example, the extracted connected regions are the connected region with region number 1 and the connected region with region number 2. Taking FIG. 21 as an example, the extracted connected regions are connected regions whose region numbers are 1 to 5 in sequence.
第一判断模块402,用于判断区域标号为2的连通区域的最左端像素所在列是否大于20,也即对应索引是否大于10000;The first judging module 402 is used to judge whether the column where the leftmost pixel of the connected region whose region label is 2 is located is greater than 20, that is, whether the corresponding index is greater than 10000;
第二判断模块403,用于当所述的第一判断模块判断为是时,判断区域标号为2的连通区域的最右端像素所在列是否小于290列,也即对应索引是否小于150000;The second judging module 403 is used to determine whether the column where the rightmost pixel of the connected region whose region label is 2 is located is less than 290 columns, that is, whether the corresponding index is less than 150,000 when the judgment of the first judging module is yes;
第三判断模块404,用于当所述的第二判断模块判断为是时,判断区域标号为2的连通区域的面积(包含的像素点数)是否大于2000;The third judging module 404, for when the second judging module is judged to be yes, whether the area (the number of pixels included) of the connected region whose judgment region label is 2 is greater than 2000;
第一肺部确定模块405,用于当所述第三判断模块判断为是时,所述区域标号为2的连通区域为左边肺区域。在这里是以观察者为参考,与解剖学中不一致。The first lung determining module 405 is configured to determine that the connected region with the region number 2 is the left lung region when the third judging module judges yes. Observer-referenced here, not consistent with anatomy.
第二肺部确定模块406,用于从区域标号不为1和2的连通区域中选取出面积大于2000的连通区域,即为右边肺区域。The second lung determination module 406 is configured to select a connected region with an area larger than 2000 from the connected regions whose region numbers are not 1 and 2, that is, the right lung region.
在实施方式二中,首先判断标号为2的连通区域是否为左肺,即判断该连通区域是否满足条件1、条件2、条件3。当且仅当三个条件都满足,可以判断标号为2的区域为左肺区域,同时,标号为1区域为人体与CT间的空隙区域,然后从标号为3区域开始搜索寻找面积大于2000的连通区域,如果存在将其视为右肺,否则断层影像只找到一个肺区域。In the second embodiment, it is firstly judged whether the connected region marked with 2 is the left lung, that is, it is judged whether the connected region satisfies condition 1, condition 2, and condition 3. If and only if the three conditions are met, it can be judged that the area marked 2 is the left lung area, and at the same time, the area marked 1 is the gap area between the human body and CT, and then search from the area marked 3 to find the area larger than 2000 If there is a connected area, it is regarded as the right lung, otherwise the tomographic image only finds one lung area.
图15为本发明实施例提供的一种基于胸部横断面CT图像的肺部分割提取系统中肺部提取装置的实施方式三的结构框图,由图15可知,在实施方式三中,阈值分割装置具体包括:Fig. 15 is a structural block diagram of Embodiment 3 of a lung extraction device in a lung segmentation and extraction system based on chest cross-sectional CT images provided by an embodiment of the present invention. It can be seen from Fig. 15 that in Embodiment 3, the threshold segmentation device Specifically include:
连通区域提取模块401,用于从阈值分割后的CT图像中提取出区域标号后的连通区域。以图22为例,提取出的连通区域为区域标号为1的连通区域以及区域标号为2的连通区域。以图21为例,提取出的连通区域为区域标号依次为1至5的连通区域。The connected region extraction module 401 is configured to extract connected regions with region labels from the CT image after threshold segmentation. Taking Fig. 22 as an example, the extracted connected regions are the connected region with region number 1 and the connected region with region number 2. Taking FIG. 21 as an example, the extracted connected regions are connected regions whose region numbers are 1 to 5 in sequence.
第一判断模块402,用于判断区域标号为2的连通区域的最左端像素所在列是否大于20,也即对应索引是否大于10000。该步骤判断标号为2的连通区域是否满足条件1。The first judging module 402 is used for judging whether the column of the leftmost pixel of the connected region whose region number is 2 is greater than 20, that is, whether the corresponding index is greater than 10000. This step judges whether the connected region labeled 2 satisfies condition 1.
第四判断模块407,用于当所述的第一判断模块判断为是时,判断区域标号为2的连通区域的面积(包含的像素点数)是否大于2000,该步骤判断标号为2的连通区域是否满足条件3。The fourth judging module 407, for when the first judging module is judged as yes, whether the area (the number of pixels contained) of the connected region whose judgment area label is 2 is greater than 2000, this step judges the connected region whose label is 2 Whether condition 3 is satisfied.
第五判断模块408,用于当所述第四判断模块判断为是时,判断区域标号为2的连通区域的最右端像素所在列是否小于290列,也即对应索引是否小于150000,该步骤判断标号为2的连通区域是否满足条件2。The fifth judging module 408 is used to determine whether the column where the rightmost pixel of the connected region whose region label is 2 is located is less than 290 columns, that is, whether the corresponding index is less than 150000, when the fourth judging module judges as yes, this step judges Whether the connected region labeled 2 satisfies condition 2.
第三肺部确定模块409,用于当所述第四判断模块判断为否时,确定出所述区域标号为2的连通区域为左右肺粘连肺区域。The third lung determination module 409 is configured to determine that the connected area with the area number 2 is the left and right lung adhesion lung area when the fourth determination module determines no.
在实施方式三中,首先判断标号为2的连通区域是否满足条件1、条件3、条件2。当且仅当条件2不满足即2区域的最右端像素所在列不小于290时,可以判断标号为2的区域为左右肺粘连的肺区域。In Embodiment 3, it is first judged whether the connected region labeled 2 satisfies condition 1, condition 3, and condition 2. If and only if the condition 2 is not satisfied, that is, the column of the rightmost pixel of the 2 area is not less than 290, it can be judged that the area labeled 2 is the lung area with the adhesion of the left and right lungs.
图16为本发明实施例提供的一种基于胸部横断面CT图像的肺部分割提取系统中肺部提取装置的实施方式四的结构框图,由图16可知,在实施方式四中,肺区域提取装置具体包括:Fig. 16 is a structural block diagram of Embodiment 4 of a lung extraction device in a lung segmentation and extraction system based on chest cross-sectional CT images provided by an embodiment of the present invention. It can be seen from Fig. 16 that in Embodiment 4, lung region extraction The device specifically includes:
连通区域提取模块401,用于从阈值分割后的CT图像中提取出区域标号后的连通区域。以图22为例,提取出的连通区域为区域标号为1的连通区域以及区域标号为2的连通区域。以图21为例,提取出的连通区域为区域标号依次为1至5的连通区域。The connected region extraction module 401 is configured to extract connected regions with region labels from the CT image after threshold segmentation. Taking Fig. 22 as an example, the extracted connected regions are the connected region with region number 1 and the connected region with region number 2. Taking FIG. 21 as an example, the extracted connected regions are connected regions whose region numbers are 1 to 5 in sequence.
第一判断模块402,用于判断区域标号为2的连通区域的最左端像素所在列是否大于20,也即对应索引是否大于10000。该步骤判断标号为2的连通区域是否满足条件1。The first judging module 402 is used for judging whether the column of the leftmost pixel of the connected region whose region number is 2 is greater than 20, that is, whether the corresponding index is greater than 10000. This step judges whether the connected region labeled 2 satisfies condition 1.
第二判断模块403,用于当所述的第一判断模块判断为是时,判断区域标号为2的连通区域的最右端像素所在列是否小于290列,也即对应索引是否小于150000,该步骤判断标号为2的连通区域是否满足条件2。The second judging module 403 is used to determine whether the column where the rightmost pixel of the connected region whose region label is 2 is located is less than 290 columns, that is, whether the corresponding index is less than 150000, when the first judging module is judged to be yes. Determine whether the connected region labeled 2 satisfies condition 2.
当所述第二判断模块判断为否时,所述的肺区域提取装置还包括:第四肺部确定模块410,用于根据所述的CT图像确定所述区域标号为3的连通区域是否为左边肺区域。When the judgment of the second judging module is no, the lung region extracting device further includes: a fourth lung determining module 410, configured to determine whether the connected region labeled 3 according to the CT image is left lung area.
在实施方式四中,首先判断标号为2的连通区域是否满足条件1、条件2。当且仅当条件1满足条件2不满足时,根据所述的CT图像确定所述区域标号为3的连通区域是否为左边肺区域。In Embodiment 4, it is first judged whether the connected region labeled 2 satisfies condition 1 and condition 2. If and only if condition 1 is satisfied and condition 2 is not satisfied, determine whether the connected region labeled 3 is the left lung region according to the CT image.
图17为本发明实施例提供的一种基于胸部横断面CT图像的肺部分割提取系统中肺部提取装置的实施方式五的结构框图,由图17可知,在实施方式五中,肺区域提取装置具体包括:Fig. 17 is a structural block diagram of Embodiment 5 of a lung extraction device in a lung segmentation and extraction system based on chest cross-sectional CT images provided by an embodiment of the present invention. It can be seen from Fig. 17 that in Embodiment 5, lung region extraction The device specifically includes:
连通区域提取模块401,用于从阈值分割后的CT图像中提取出区域标号后的连通区域。以图22为例,提取出的连通区域为区域标号为1的连通区域以及区域标号为2的连通区域。以图21为例,提取出的连通区域为区域标号依次为1至5的连通区域。The connected region extraction module 401 is configured to extract connected regions with region labels from the CT image after threshold segmentation. Taking Fig. 22 as an example, the extracted connected regions are the connected region with region number 1 and the connected region with region number 2. Taking FIG. 21 as an example, the extracted connected regions are connected regions whose region numbers are 1 to 5 in sequence.
第六判断模块411,用于判断区域标号为2的连通区域的最右端像素所在列是否小于290列,也即对应索引是否小于150000,该步骤判断标号为2的连通区域是否满足条件2。The sixth judging module 411 is used for judging whether the column of the rightmost pixel of the connected region labeled 2 is less than 290 columns, that is, whether the corresponding index is less than 150000. This step judges whether the connected region labeled 2 satisfies condition 2.
第七判断模块412,用于当所述第六判断模块判断为是时,判断区域标号为2的连通区域的最左端像素所在列是否大于20,也即对应索引是否大于10000。该步骤判断标号为2的连通区域是否满足条件1。The seventh judging module 412 is used for judging whether the column of the leftmost pixel of the connected region labeled 2 is greater than 20, that is, whether the corresponding index is greater than 10000, when the sixth judging module judges yes. This step judges whether the connected region labeled 2 satisfies condition 1.
当所述第七判断模块判断为否时,所述的肺区域提取装置还包括:第四肺部确定模块410,用于根据所述的CT图像确定所述区域标号为3的连通区域是否为左边肺区域。When the judgment of the seventh judging module is no, the lung region extracting device further includes: a fourth lung determining module 410, configured to determine whether the connected region labeled 3 according to the CT image is left lung area.
在实施方式五中,首先判断标号为2的连通区域是否满足条件1、条件2。当且仅当条件1不满足条件2满足时,根据所述的CT图像确定所述区域标号为3的连通区域是否为左边肺区域。In Embodiment 5, it is first judged whether the connected region labeled 2 satisfies condition 1 and condition 2. If and only if condition 1 is not satisfied and condition 2 is satisfied, it is determined whether the connected region labeled 3 is the left lung region according to the CT image.
图18为本发明实施例提供的一种基于胸部横断面CT图像的肺部分割提取系统中第四肺部确定模块的实施方式一的结构框图,由图18可知,在实施方式一中,第四肺部确定模块410具体包括:Fig. 18 is a structural block diagram of Embodiment 1 of the fourth lung determination module in a lung segmentation and extraction system based on chest cross-sectional CT images provided by an embodiment of the present invention. It can be seen from Fig. 18 that in Embodiment 1, the first The four-lung determination module 410 specifically includes:
第一判断单元4101,用于判断区域标号为2的连通区域最左端像素所在列是否小于2,也即对应索引是否小于1000;The first judging unit 4101 is used to judge whether the column of the leftmost pixel of the connected region with the region number 2 is less than 2, that is, whether the corresponding index is less than 1000;
第二判断单元4102,用于当所述第一判断单元判断为是时,判断区域标号为3的连通区域的最右端像素所在列是否小于290列,也即对应索引是否小于150000;The second judging unit 4102 is configured to judge whether the column of the rightmost pixel of the connected region whose region number is 3 is less than 290 columns, that is, whether the corresponding index is less than 150000, when the first judging unit judges yes;
第三判断单元4103,用于当所述第二判断单元判断为是时,判断区域标号为3的连通区域的面积(包含的像素点数)是否大于2000;The third judging unit 4103 is used to determine whether the area (the number of pixels included) of the connected region with the region number 3 is greater than 2000 when the second judging unit judges yes;
第一肺部确定单元4104,用于当所述第三判断单元判断为是时,所述区域标号为3的连通区域为左边肺区域。The first lung determination unit 4104 is configured to determine that the connected area with the area number 3 is the left lung area when the third determination unit determines yes.
在该实施方式中,判断标号为3的连通区域是否为左肺,即判断该连通区域是否满足最左端像素所在列是否小于2、判断标号为3的连通区域最右端像素所在列是否小于290列(对应索引小于150000)、判断标号为3的连通区域的面积(包含的像素点数)是否大于2000)。当且仅当三个条件都满足,可以判断3区域为左肺区域。In this embodiment, judging whether the connected region labeled 3 is the left lung, that is, judging whether the connected region satisfies whether the column of the leftmost pixel is less than 2, and judging whether the column of the rightmost pixel of the connected region labeled 3 is less than 290 columns (the corresponding index is less than 150000), and judge whether the area of the connected region labeled 3 (the number of pixels included) is greater than 2000). If and only if the three conditions are met, it can be judged that the area 3 is the left lung area.
图19为本发明实施例提供的一种基于胸部横断面CT图像的肺部分割提取系统中第四肺部确定模块的实施方式二的结构框图,由图19可知,在该实施方式中,第四肺部确定模块410具体包括:Fig. 19 is a structural block diagram of Embodiment 2 of the fourth lung determination module in a lung segmentation and extraction system based on chest cross-sectional CT images provided by an embodiment of the present invention. It can be seen from Fig. 19 that in this embodiment, the first The four-lung determination module 410 specifically includes:
第四肺部确定模块4101,用于判断区域标号为2的连通区域最左端像素所在列是否小于2,也即对应索引是否小于1000;The fourth lung determination module 4101 is used to determine whether the column of the leftmost pixel of the connected region whose region number is 2 is less than 2, that is, whether the corresponding index is less than 1000;
第二判断单元4102,用于当所述第一判断单元判断为是时,判断区域标号为3的连通区域的最右端像素所在列是否小于290列,也即对应索引是否小于150000;The second judging unit 4102 is configured to judge whether the column of the rightmost pixel of the connected region whose region number is 3 is less than 290 columns, that is, whether the corresponding index is less than 150000, when the first judging unit judges yes;
第三判断单元4103,用于当所述第二判断单元判断为是时,判断区域标号为3的连通区域的面积(包含的像素点数)是否大于2000;The third judging unit 4103 is used to determine whether the area (the number of pixels included) of the connected region with the region number 3 is greater than 2000 when the second judging unit judges yes;
第一肺部确定单元4104,用于当所述第三判断单元判断为是时,所述区域标号为3的连通区域为左边肺区域。The first lung determination unit 4104 is configured to determine that the connected area with the area number 3 is the left lung area when the third determination unit determines yes.
第二部确定单元4105,用于从区域标号不为1和2的连通区域中选取出面积大于2000的连通区域,即为右边肺区域。The second determination unit 4105 is configured to select a connected region with an area larger than 2000 from the connected regions whose region labels are not 1 and 2, which is the right lung region.
在该实施方式中,判断标号为3的连通区域是否为左肺,即判断该连通区域是否满足最左端像素所在列是否小于2、判断标号为3的连通区域最右端像素所在列是否小于290列(对应索引小于150000)、判断标号为3的连通区域的面积(包含的像素点数)是否大于2000)。当且仅当三个条件都满足,可以判断标号为3的区域为左肺区域,标号为1的区域和标号为2的区域为人体与CT间的空隙区域,然后从标号为4的区域开始搜索寻找面积大于2000的连通区域,如果存在将其视为右肺,否则断层影像只找到一个肺区域。In this embodiment, judging whether the connected region labeled 3 is the left lung, that is, judging whether the connected region satisfies whether the column of the leftmost pixel is less than 2, and judging whether the column of the rightmost pixel of the connected region labeled 3 is less than 290 columns (the corresponding index is less than 150000), and judge whether the area of the connected region labeled 3 (the number of pixels included) is greater than 2000). If and only if the three conditions are met, it can be judged that the area marked 3 is the left lung area, the area marked 1 and the area marked 2 are the gap area between the human body and CT, and then start from the area marked 4 Search to find a connected region with an area greater than 2000, if it exists, it will be regarded as the right lung, otherwise, only one lung region will be found in the tomographic image.
图20为本发明实施例提供的一种基于胸部横断面CT图像的肺部分割提取系统中肺部提取装置的实施方式六的结构框图,由图20可知,在实施方式六中,上述实施方式一至实施方式五的条件均不满足,所述的肺区域提取装置400具体包括:Fig. 20 is a structural block diagram of Embodiment 6 of a lung extraction device in a lung segmentation and extraction system based on chest cross-sectional CT images provided by an embodiment of the present invention. It can be seen from Fig. 20 that in Embodiment 6, the above-mentioned embodiment None of the conditions from the first to fifth embodiments are met, and the lung region extraction device 400 specifically includes:
开始区域确定模块401,用于从阈值分割后的CT图像中提取出区域标号后的连通区域。以图22为例,提取出的连通区域为区域标号为1的连通区域以及区域标号为2的连通区域。以图21为例,提取出的连通区域为区域标号依次为1至5的连通区域。The starting region determination module 401 is configured to extract connected regions with region labels from the CT image after threshold segmentation. Taking Fig. 22 as an example, the extracted connected regions are the connected region with region number 1 and the connected region with region number 2. Taking FIG. 21 as an example, the extracted connected regions are connected regions whose region numbers are 1 to 5 in sequence.
区预计和确定模块413,用于从所述连通区域中确定出区域集合,所述区域集合包括了多个区域,每个区域均满足最左端像素所在列小于2且面积大于100000。The region prediction and determination module 413 is configured to determine a region set from the connected regions, the region set includes multiple regions, and each region satisfies that the column of the leftmost pixel is less than 2 and the area is greater than 100,000.
在具体的实施方式中,依次判断每个连通区域的最左端像素所在列是否小于2,当判断为是时,继续判断该连通区域的面积是否大于100000,当判断为是时,该连通区域即可作为区域集合中的区域。In a specific embodiment, it is judged sequentially whether the column where the leftmost pixel of each connected region is located is less than 2, and when the judgment is yes, continue to judge whether the area of the connected region is greater than 100,000, when the judgment is yes, the connected region is Available as a region in a region collection.
开始区域确定模块414,用于从所述区域集合中确定出区域标号最大的区域,称为开始区域;A start area determination module 414, configured to determine the area with the largest area number from the set of areas, which is called the start area;
疑似区域确定模块415,用于从所述连通区域中筛选出疑似区域,所述疑似区域的区域标号大于所述开始区域的区域标号。The suspected area determination module 415 is configured to screen out suspected areas from the connected areas, and the area number of the suspected area is greater than the area number of the starting area.
目标区域确定模块416,用于从所述疑似区域中确定出目标区域,所述目标区域的面积大于2000,所述目标区域即为肺区域。The target area determination module 416 is configured to determine a target area from the suspected area, the area of the target area is larger than 2000, and the target area is the lung area.
在实施方式六中,首先判断人体与CT间的空隙区域标号,级依次遍历所有连通区域,搜索出最后一个满足区域最左端像素所在列小于2(对应索引小于1000),且区域面积大于100000的区域,该区域即开始区域为人体与CT间的空隙区域,将该区域标号记为start。从start+1区域开始遍历所有连通区域,将其面积从大到小排列,选取所有面积大于2000的区块组合视为肺区域。In Embodiment 6, first judge the label of the gap area between the human body and the CT, and then traverse all the connected areas sequentially, and search for the last one that satisfies the fact that the leftmost pixel of the area is located in a column less than 2 (the corresponding index is less than 1000), and the area area is greater than 100,000 area, the start area is the gap area between the human body and the CT, and this area is marked as start. Start from the start+1 region to traverse all connected regions, arrange their areas from large to small, and select all block combinations with an area greater than 2000 as lung regions.
如上所述,即为本发明提出的一种基于胸部横断面CT图像的肺部分割提取系统,通过对胸部横断面的CT图像进行预处理,然后进行阈值分割,最后根据预先设定的模板进行肺区域提取,能够实现对肺区域的精准分割,保证肺实质区域分割的完整性。As mentioned above, it is a lung segmentation and extraction system based on chest cross-sectional CT images proposed by the present invention. Preprocessing is performed on the chest cross-sectional CT images, and then threshold segmentation is performed, and finally according to a preset template. The lung area extraction can realize the precise segmentation of the lung area and ensure the integrity of the lung parenchymal area segmentation.
下面结合具体的实施例,详细介绍本发明的技术方案。在该具体实施例中,该方案包括以下:The technical solution of the present invention will be described in detail below in conjunction with specific embodiments. In this particular example, the regimen includes the following:
1、采集数据:获取肺部CT图像数据,设该图像为I。1. Collecting data: acquiring lung CT image data, and setting the image as I.
2、预处理。2. Pretreatment.
采用中值滤波与小波去噪的联合去噪方法对图像I去噪。The joint denoising method of median filtering and wavelet denoising is used to denoise the image I.
3、阈值分割。3. Threshold segmentation.
(1)、将图像I中Hu值小于0的像素值归为0,得到I_;(1), the pixel value that Hu value is less than 0 among the image I is classified as 0, obtains I_;
(2)、采用自动阈值分割法(Ostu算法)对图像I_进行初步二值分割,然后对二值图像取反,得到B_I_;(2), adopt automatic threshold value segmentation method (Ostu algorithm) to carry out preliminary binary segmentation to image I_, then reverse binary image, obtain B_I_;
(3)、对B_I_进行开运算,结构元素为半径为2的圆。目的去除孤立“小岛”获得二值图像_B_I_;(3) Open operation is performed on B_I_, and the structural element is a circle with a radius of 2. The purpose is to remove the isolated "island" to obtain a binary image _B_I_;
(4)、对_B_I_进行区域标号,标号顺序为从左到右,从上到下;(4), carry out regional labeling to _B_I_, labeling sequence is from left to right, from top to bottom;
4、通过设定的模板对肺区域进行提取。图23为该具体实施例中肺区域提取的流程示意图,在该图中,block(2,1)表示区块2中第1点的索引,block(t)表示区块t,len(block(t))表示区块t的面积(面积用该区域的点的个数表示),L==t表示寻找标号为t的区域。4. Extract the lung area through the set template. Fig. 23 is a schematic flow chart of lung area extraction in this specific embodiment, in this figure, block (2,1) represents the index of the first point in block 2, block (t) represents block t, len(block( t)) represents the area of the block t (the area is represented by the number of points in the area), and L==t means to search for the area labeled t.
对肺区域进行提取的主体思想是:首先判断左肺(包括左右肺粘连)区域标号;其次判断左右肺是否粘连,接着确定左右肺区域编号;最后当上述步骤都不能判断肺区域时:第一步先确定非体素区块的编号(剩余区域为体素区域),第二步再对体素区域的区块的面积(像素点的个数)进行降序排序,按照排序选取前两位面积大于2000的区块作为肺区域,否则判断该层CT影像不含肺部区域,其具体描述为:The main idea of extracting the lung area is: firstly, judge the area label of the left lung (including the left and right lung adhesion); secondly, determine whether the left and right lungs are adhered, and then determine the number of the left and right lung area; finally, when the above steps cannot determine the lung area: first The first step is to determine the number of the non-voxel block (the remaining area is the voxel area), and the second step is to sort the area (the number of pixels) of the block in the voxel area in descending order, and select the first two digits according to the sorting. The block larger than 2000 is regarded as the lung area, otherwise it is judged that the CT image of this layer does not contain the lung area, and its specific description is as follows:
A、判断标号2连通区域是否为左肺(在这里是以观察者为参考,与解剖学中不一致)。条件1、判断2区域最左端像素所在列是否大于20(对应索引大于10000);条件2、判断2区域最右端像素所在列是否小于290列(对应索引小于150000);条件3、判断区域二的面积(包含的像素点数)是否大于2000。如果三个条件都满足,可以判断2区域为肺部区域,以及1区域为人体与CT间的空隙区域,然后从3区域开始搜索寻找面积大于2000的联通区域,如果存在将其视为右肺,否则断层影像只找到一个肺区域。A. Determine whether the connected area labeled 2 is the left lung (here, the observer is used as a reference, which is inconsistent with the anatomy). Condition 1. Determine whether the column of the leftmost pixel in area 2 is greater than 20 (the corresponding index is greater than 10000); condition 2. Determine whether the column of the rightmost pixel in area 2 is less than 290 columns (the corresponding index is less than 150000); Whether the area (the number of pixels included) is greater than 2000. If the three conditions are met, it can be judged that area 2 is the lung area, and area 1 is the gap area between the human body and CT, and then search from area 3 to find a connected area with an area greater than 2000. If it exists, it will be regarded as the right lung , otherwise the tomographic image only finds one lung region.
B、如果A中条件1、条件2、条件3中,仅条件2不满足时,即2区域的最右端像素所在列大于290。此时可以判断2区域为左右肺粘连的肺区域。B. If in condition 1, condition 2, and condition 3 in A, only condition 2 is not satisfied, that is, the column where the rightmost pixel in area 2 is greater than 290. At this time, it can be judged that area 2 is the lung area where the left and right lungs adhere.
C、如果A中条件1与条件2任一条件不满足时,判断3区域是否为左肺。设定判断条件:条件1、判断2区域最左端像素所在列是否小于2(对应索引小于1000);条件2、判断3区域的最右端像素所在列是否小于290(对应索引小于150000);条件3、判断3区域的面积是否大于2000。如果三个条件都满足,可以判断3区域为肺区域,以及1区域和2区域为人体与CT间的空隙区域,然后从4区域开始搜索寻找面积大于2000的联通区域,如果存在将其视为右肺,否则断层影像只找到一个肺区域。C. If any of condition 1 and condition 2 in A is not satisfied, judge whether area 3 is the left lung. Set the judgment conditions: condition 1, determine whether the column of the leftmost pixel in area 2 is less than 2 (the corresponding index is less than 1000); condition 2, determine whether the column of the rightmost pixel in area 3 is less than 290 (corresponding index is less than 150000); condition 3 , Judging whether the area of the 3 area is greater than 2000. If the three conditions are met, it can be judged that area 3 is the lung area, and area 1 and area 2 are the gap area between the human body and CT, and then search from area 4 to find a connected area with an area greater than 2000. If it exists, it will be regarded as Right lung, otherwise the tomographic image only finds one lung region.
D、如果A、B、C都不满足,则首先判断人体与CT间的空隙区域标号:依次遍历所有连通区域,搜索最后一个满足区域最左端像素所在列小于2(对应索引小于1000),且区域面积大于100000,如果满足视为该区域为人体与CT间的空隙区域,将该区域标号记为start。从start+1区域开始遍历所有连通区域,将其面积从大到小排列,选取所有面积大于2000的区块组合视为肺区域。D. If A, B, and C are not satisfied, first judge the label of the gap area between the human body and CT: traverse all connected areas in turn, and search for the column where the leftmost pixel of the last satisfied area is less than 2 (the corresponding index is less than 1000), and If the area is greater than 100,000, if it is satisfied that the area is regarded as the gap area between the human body and the CT, the area is marked as start. Start from the start+1 region to traverse all connected regions, arrange their areas from large to small, and select all block combinations with an area greater than 2000 as lung regions.
E、如果上述条件都不满足视为该断层影像不含肺区域。E. If none of the above conditions are met, it is considered that the tomographic image does not contain the lung area.
5、肺区域分割结果。5. Lung region segmentation results.
图24为实施例一中提取的肺区域的示意图,图25为实施例一中肺实质区域的示意图,图26为实施例二中提取的肺区域的示意图,图27为实施例二中肺实质区域的示意图,图28为实施例三中提取的肺区域的示意图,图29为实施例三中肺实质区域的示意图。由图24至图29对比可知,在LIDC数据库中,与专家标定的金标准相比,本发明提取的肺区域的准确率大于96%。Figure 24 is a schematic diagram of the lung region extracted in Example 1, Figure 25 is a schematic diagram of the lung parenchyma region in Example 1, Figure 26 is a schematic diagram of the lung region extracted in Example 2, and Figure 27 is a schematic diagram of the lung parenchyma in Example 2 The schematic diagram of the region, FIG. 28 is the schematic diagram of the lung region extracted in the third embodiment, and FIG. 29 is the schematic diagram of the lung parenchyma region in the third embodiment. From the comparison of Fig. 24 to Fig. 29, it can be seen that in the LIDC database, compared with the gold standard calibrated by experts, the accuracy rate of the lung region extracted by the present invention is greater than 96%.
综上所述,本发明提出的一种基于胸部横断面CT图像的肺部分割提取方法以及系统,能够实现对肺区域的精准分割,保证肺实质区域分割的完整性,避免由于肺区域的边缘缺失及区域的缺失而在后续诊断过程中造成漏诊的问题。In summary, the lung segmentation and extraction method and system based on chest cross-sectional CT images proposed by the present invention can achieve precise segmentation of lung regions, ensure the integrity of lung parenchymal region segmentation, and avoid Deletion and the lack of regions lead to missed diagnosis in the follow-up diagnosis process.
本专利的主要保护点为肺区域提取过程,包含具体实施例中A、B、C、D、E五个步骤。肺区域提取过程的主体思想是:首先判断左肺(包括左右肺粘连)区域标号;其次判断左右肺是否粘连,接着确定左右肺区域编号;最后当上述步骤都不能判断肺区域时:第一步先确定非体素区块的编号(剩余区域为体素区域),第二步再对体素区域的区块的面积(像素点的个数)进行降序排序,按照排序选取前两位面积大于2000的区块作为肺区域,否则判断该层CT影像不含肺部区域。The main protection point of this patent is the lung area extraction process, including five steps A, B, C, D, and E in the specific examples. The main idea of the lung region extraction process is: first determine the region label of the left lung (including the left and right lung adhesions); secondly determine whether the left and right lungs are adherent, and then determine the number of the left and right lung regions; finally, when the above steps cannot determine the lung region: the first step First determine the number of the non-voxel block (the remaining area is the voxel area), and in the second step, sort the area (number of pixels) of the block in the voxel area in descending order, and select the first two digits whose area is greater than The block of 2000 is regarded as the lung area, otherwise it is judged that the CT image of this layer does not contain the lung area.
本发明的有益效果在于:The beneficial effects of the present invention are:
1、充分利用了CT成像技术对肺癌前期的诊断价值,辅助医生提高了肺结节的正确诊断率,并提高了医生的诊断效率,减轻了劳动疲劳;1. Make full use of the diagnostic value of CT imaging technology in the early stage of lung cancer, assist doctors to improve the correct diagnosis rate of pulmonary nodules, improve the efficiency of doctors' diagnosis, and reduce labor fatigue;
2、肺癌前期的小结节如能得到及时的治疗,可使患者获得较长年限的存活率。本专利在计算机辅助诊断中可以有效避免肺结节的漏检,及时的诊断在减少病人病痛的同时,也降低了病人的就医成本。2. If the small nodules in the early stage of lung cancer can be treated in time, the patient can obtain a longer survival rate. This patent can effectively avoid missed detection of pulmonary nodules in computer-aided diagnosis, and timely diagnosis can reduce the patient's pain and medical cost while reducing the patient's medical treatment cost.
3、能够实现对肺区域的精准分割,保证肺实质区域分割的完整性。3. It can realize the precise segmentation of the lung area and ensure the integrity of the segmentation of the lung parenchyma.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一般计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-OnlyMemory,ROM)或随机存储记忆体(RandomAccessMemory,RAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented through computer programs to instruct related hardware to complete, and the programs can be stored in general computer-readable storage media. During execution, it may include the processes of the embodiments of the above-mentioned methods. Wherein, the storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM) or a random access memory (Random Access Memory, RAM) and the like.
本领域技术人员还可以了解到本发明实施例列出的各种功能是通过硬件还是软件来实现取决于特定的应用和整个系统的设计要求。本领域技术人员可以对于每种特定的应用,可以使用各种方法实现所述的功能,但这种实现不应被理解为超出本发明实施例保护的范围。Those skilled in the art can also understand that whether various functions listed in the embodiments of the present invention are implemented by hardware or software depends on specific applications and design requirements of the entire system. Those skilled in the art may use various methods to implement the described functions for each specific application, but such implementation should not be understood as exceeding the protection scope of the embodiments of the present invention.
本发明中应用了具体实施例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。In the present invention, specific examples have been applied to explain the principles and implementation methods of the present invention. The description of the above examples is only used to help understand the method of the present invention and its core idea; meanwhile, for those of ordinary skill in the art, according to this The idea of the invention will have changes in the specific implementation and scope of application. To sum up, the contents of this specification should not be construed as limiting the present invention.
Claims (22)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201511023356.8A CN105574882B (en) | 2015-12-30 | 2015-12-30 | Lung segmentation extracting method based on chest cross section CT images and system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201511023356.8A CN105574882B (en) | 2015-12-30 | 2015-12-30 | Lung segmentation extracting method based on chest cross section CT images and system |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN105574882A true CN105574882A (en) | 2016-05-11 |
| CN105574882B CN105574882B (en) | 2018-08-10 |
Family
ID=55884971
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201511023356.8A Active CN105574882B (en) | 2015-12-30 | 2015-12-30 | Lung segmentation extracting method based on chest cross section CT images and system |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN105574882B (en) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106780470A (en) * | 2016-12-23 | 2017-05-31 | 浙江大学 | CT image nipple automated detection methods |
| CN106898012A (en) * | 2017-01-19 | 2017-06-27 | 浙江大学 | CT images thoracic cavity profile automated detection method |
| CN106952285A (en) * | 2017-02-15 | 2017-07-14 | 上海交通大学 | Lung Motion Estimation Method Based on Prior Statistical Motion Model and Adaptive Registration |
| CN108470331A (en) * | 2017-02-23 | 2018-08-31 | 富士通株式会社 | Image processing apparatus and image processing method |
| CN110898338A (en) * | 2019-12-16 | 2020-03-24 | 福建师范大学 | An intelligent photodynamic therapy illumination system based on LED array |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20020009215A1 (en) * | 2000-01-18 | 2002-01-24 | Arch Development Corporation | Automated method and system for the segmentation of lung regions in computed tomography scans |
| CN101599174A (en) * | 2009-08-13 | 2009-12-09 | 哈尔滨工业大学 | A Level Set Method for Contour Extraction of Medical Ultrasound Image Regions Based on Edge and Statistical Features |
| US20110051885A1 (en) * | 2008-04-18 | 2011-03-03 | Koninklijke Philips Electronics N.V. | Segmenting pulmonary arteries |
| CN102663416A (en) * | 2012-03-20 | 2012-09-12 | 苏州迪凯尔医疗科技有限公司 | Segmentation method of viscera and internal blood vessels thereof in surgical planning system |
| CN103400365A (en) * | 2013-06-26 | 2013-11-20 | 成都金盘电子科大多媒体技术有限公司 | Automatic segmentation method for lung-area CT (Computed Tomography) sequence |
| CN104992445A (en) * | 2015-07-20 | 2015-10-21 | 河北大学 | Automatic division method for pulmonary parenchyma of CT image |
-
2015
- 2015-12-30 CN CN201511023356.8A patent/CN105574882B/en active Active
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20020009215A1 (en) * | 2000-01-18 | 2002-01-24 | Arch Development Corporation | Automated method and system for the segmentation of lung regions in computed tomography scans |
| US20110051885A1 (en) * | 2008-04-18 | 2011-03-03 | Koninklijke Philips Electronics N.V. | Segmenting pulmonary arteries |
| CN101599174A (en) * | 2009-08-13 | 2009-12-09 | 哈尔滨工业大学 | A Level Set Method for Contour Extraction of Medical Ultrasound Image Regions Based on Edge and Statistical Features |
| CN102663416A (en) * | 2012-03-20 | 2012-09-12 | 苏州迪凯尔医疗科技有限公司 | Segmentation method of viscera and internal blood vessels thereof in surgical planning system |
| CN103400365A (en) * | 2013-06-26 | 2013-11-20 | 成都金盘电子科大多媒体技术有限公司 | Automatic segmentation method for lung-area CT (Computed Tomography) sequence |
| CN104992445A (en) * | 2015-07-20 | 2015-10-21 | 河北大学 | Automatic division method for pulmonary parenchyma of CT image |
Non-Patent Citations (1)
| Title |
|---|
| 齐守良等: "基于胸部CT图像的肺结节分割", 《北京生物医学工程》 * |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106780470A (en) * | 2016-12-23 | 2017-05-31 | 浙江大学 | CT image nipple automated detection methods |
| CN106898012A (en) * | 2017-01-19 | 2017-06-27 | 浙江大学 | CT images thoracic cavity profile automated detection method |
| CN106952285A (en) * | 2017-02-15 | 2017-07-14 | 上海交通大学 | Lung Motion Estimation Method Based on Prior Statistical Motion Model and Adaptive Registration |
| CN108470331A (en) * | 2017-02-23 | 2018-08-31 | 富士通株式会社 | Image processing apparatus and image processing method |
| CN110898338A (en) * | 2019-12-16 | 2020-03-24 | 福建师范大学 | An intelligent photodynamic therapy illumination system based on LED array |
Also Published As
| Publication number | Publication date |
|---|---|
| CN105574882B (en) | 2018-08-10 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Zhang et al. | Pulmonary nodule detection in medical images: a survey | |
| CN103106408B (en) | The automatic assisted detection system of stomach CT image lymph node of non-formaldehyde finishing | |
| Anter et al. | Automatic computer aided segmentation for liver and hepatic lesions using hybrid segmentations techniques | |
| CN108133476B (en) | Method and system for automatically detecting pulmonary nodules | |
| CN105574882B (en) | Lung segmentation extracting method based on chest cross section CT images and system | |
| CN106997596B (en) | A Pulmonary Nodule Segmentation Method Based on Information Entropy and Joint Vector LBF Active Contour Model | |
| CN108537793A (en) | A kind of pulmonary nodule detection method based on improved u-net networks | |
| santha Kumar | Automatic segmentation of liver and tumor for CAD of liver | |
| CN101403743B (en) | Automatic separating method for X type overlapping and adhering chromosome | |
| CN104933701B (en) | The mammary glandular cell dividing method of adhesion model is removed with double strategies based on multiple dimensioned growth | |
| CN110738637B (en) | Automatic classification system for breast cancer pathological sections | |
| CN111145185B (en) | A lung parenchyma segmentation method based on clustering key frame extraction from CT images | |
| CN109636810B (en) | A method and system for the segmentation of pulmonary nodules in CT images | |
| CN112070790B (en) | Mixed lung segmentation system based on deep learning and image processing | |
| Katre et al. | Detection of lung cancer stages using image processing and data classification techniques | |
| CN103839048A (en) | System and method for lymph node recognition in gastric CT images based on low-rank decomposition | |
| CN110807785A (en) | A method to study the factors associated with postoperative recurrence in patients with non-small cell lung cancer | |
| US7394933B2 (en) | Region competition via local watershed operators | |
| Mastouri et al. | A morphological operation-based approach for Sub-pleural lung nodule detection from CT images | |
| Jamil et al. | Adaptive thresholding technique for segmentation and juxtapleural nodules inclusion in lung segments | |
| Kumar et al. | Neural Network Based Approach for Detection of Abnormal Regions of Lung Cancer in X-Ray Image | |
| Abdel-massieh et al. | A fully automatic and efficient technique for liver segmentation from abdominal CT images | |
| Tong et al. | Computer-aided lung nodule detection based on CT images | |
| Essaf et al. | An improved lung parenchyma segmentation using the maximum inter-class variance method (OTSU) | |
| Mammeri et al. | A Cascade Model to Detect and Segment Lung Nodule Using YOLOv8 and Resnet50U‐Net |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| TR01 | Transfer of patent right |
Effective date of registration: 20240222 Address after: 519085 101, Building 5, Longyuan Smart Industrial Park, No. 2, Hagongda Road, Tangjiawan Town, High-tech Zone, Zhuhai City, Guangdong Province Patentee after: ZHUHAI INSTITUTE OF ADVANCED TECHNOLOGY CHINESE ACADEMY OF SCIENCES Co.,Ltd. Country or region after: China Address before: 1068 No. 518055 Guangdong city in Shenzhen Province, Nanshan District City Xili University School Avenue Patentee before: SHENZHEN INSTITUTES OF ADVANCED TECHNOLOGY CHINESE ACADEMY OF SCIENCES Country or region before: China |
|
| TR01 | Transfer of patent right |