Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
In the lung cancer computer-aided diagnosis based on CT images, the correct of lung region is completely extracted particularly important, is
The basis of Lung neoplasm extraction.The present invention is complicated for chest cross section CT image backgrounds in the prior art, correct complete extraction
The extremely difficult problem of lung areas, it is proposed that a kind of lung segmentation extracting method based on chest cross section CT images and be
System.
The Key Term of the present invention is introduced first below.
Morphology operations (Morphology operations) are for binary picture according to mathematical morphology
The image processing method that the set enumeration tree of (Mathematical Morphology) grows up.At usual morphology image
Reason shows as a kind of neighborhood operation form, a kind of specifically defined neighborhood referred to as " structural element " (Structure
Element), its region corresponding with binary picture carries out specific logical operation on each pixel location, logical operation
As a result it is the respective pixel of output image, includes mainly:Burn into expansion, opening operation and closed operation
Tubercular lesion, stand alone entity tubercle, chest is presented in Lung neoplasm (Lung nodule) on lung CT image
Membranous type tubercle, adhesion vascular type tubercle, frosted glass tubercle and empty type tubercle.
Computer-aided diagnosis CAD refers to by iconography, Medical Image Processing and other possible physiology, lifes
Change means are calculated in conjunction with the analysis of computer, and auxiliary finds lesion, improves the accuracy rate of diagnosis.
Fig. 1 is a kind of detailed process of the lung segmentation extracting method based on chest cross section CT images proposed by the present invention
Figure, as shown in Figure 1, the method includes:
S101:Obtain the CT images in chest cross section.
In a particular embodiment, the CT images in chest cross section are generally DICOM format.
S102:The CT images are pre-processed;
In a particular embodiment, medium filtering can be used to scheme the CT with the denoising method of combining of Wavelet Denoising Method
As carrying out pretreatment removal noise.
S103:To pretreated CT images into row threshold division.Fig. 2 is the particular flow sheet of step S103.
S104:Lung extracted region is carried out to the CT images after Threshold segmentation.In a particular embodiment, the present invention can lead to
It crosses preset template and lung extracted region is carried out to CT images.
Fig. 2 is the particular flow sheet of step S103, and as shown in Figure 2, which specifically includes:
S201:The pixel that gray value is less than 0 is determined from pretreated CT images;
S202:Pixel by gray value less than 0 is set to 0, obtains the first image.
Since the intensity value ranges of DICOM images are [- 1024,1024], and human region includes the gray value in lung region
Both greater than 0, therefore first by fixed threshold 0, the gray value less than 0 is set to 0.
S203:Determine the grey level histogram of described first image;
S204:It determines the trough between two wave crests in the grey level histogram, is considered as segmentation threshold;
S205:Preliminary binary segmentation is carried out to first image according to the segmentation threshold, obtains the second image;
In a particular embodiment, Ostu algorithms estimation segmentation threshold, primary segmentation lung areas (experience also can be used
500) threshold value is.
S206:Second image is negated, third image is obtained;
S207:Processing is removed to the third image using morphology opening operation, obtains bianry image;
S208:Region is carried out according to strategy from left to right, from top to bottom to the connected region in the bianry image
Label obtains the CT images after Threshold segmentation.
The connected region that area is smaller in bianry image is removed using morphology opening operation, region mark then is carried out to image
Number (region refers to connected region).In a particular embodiment, opening operation is carried out to third image, structural element is radius
For 2 circle, purpose removal isolates " island " and obtains bianry image.Figure 21, Figure 22 are respectively specific embodiment provided by the invention
The signal of middle connected region label.
In the other embodiment of the present invention, pulmonary parenchyma region segmentation can also pass through the general of double gauss mixed model
Rate Density Distribution realizes Threshold segmentation, is then removed by mathematical morphological operation isolated island and defect repairing.
Fig. 3 is the flow chart of the embodiment one of step S104, from the figure 3, it may be seen that in embodiment one, by setting in advance
Fixed template extracts lung region, which specifically includes:
S301:Connected region after extracting region labeling in the CT images after Threshold segmentation.By taking Figure 22 as an example, extraction
The connected region that the connected region gone out is the connected region that region labeling is 1 and region labeling is 2.By taking Figure 21 as an example, extraction
The connected region gone out is the connected region that region labeling is followed successively by 1 to 5.
S302:Judge whether region labeling is more than 20, namely corresponding rope for the left end pixel column of 2 connected region
Draw and whether is more than 10000;
S303:When being judged as YES, judge whether region labeling is less than for the right end pixel column of 2 connected region
Whether 290 row namely manipulative indexing are less than 150000;
S304:When being judged as YES, judge region labeling for 2 connected region area (pixel number for including) whether
More than 2000;
S305:When being judged as YES, the connected region that the region labeling is 2 is left side lung region.It is to see herein
The person of examining is reference, and inconsistent in anatomy.
In embodiment one, judge whether marked as 2 connected region be left lung, that is, judges whether the connected region is full
Sufficient condition 1 (judging whether 2 region left end pixel columns were more than for 20 (manipulative indexing is more than 10000)), condition 2 (judge 2nd area
Whether domain right end pixel column is less than 290 row (manipulative indexing be less than 150000)), condition 3 (judge that the area in region 2 (wraps
The pixel number contained) whether it is more than 2000).All meet and if only if three conditions, it can be determined that 2 regions are left lung region.
Fig. 4 is the flow chart of the embodiment two of step S104, as shown in Figure 4, in embodiment two, by setting in advance
Fixed template extracts lung region, which specifically includes:
S401:Connected region after extracting region labeling in the CT images after Threshold segmentation.By taking Figure 22 as an example, extraction
The connected region that the connected region gone out is the connected region that region labeling is 1 and region labeling is 2.By taking Figure 21 as an example, extraction
The connected region gone out is the connected region that region labeling is followed successively by 1 to 5.
S402:Judge whether region labeling is more than 20, namely corresponding rope for the left end pixel column of 2 connected region
Draw and whether is more than 10000;
S403:When being judged as YES, judge whether region labeling is less than for the right end pixel column of 2 connected region
Whether 290 row namely manipulative indexing are less than 150000;
S404:When being judged as YES, judge region labeling for 2 connected region area (pixel number for including) whether
More than 2000;
S405:When being judged as YES, the connected region that the region labeling is 2 is left side lung region.It is to see herein
The person of examining is reference, and inconsistent in anatomy.
S406:It is not the connected region for selecting area in 1 and 2 connected region and being more than 2000 from region labeling, as
The right lung region.
In embodiment two, first determines whether marked as 2 connected region be left lung, that is, judge that the connected region is
It is no to meet condition 1, condition 2, condition 3.All meet and if only if three conditions, it can be determined that the region marked as 2 is the areas Zuo Fei
Domain, meanwhile, marked as void area of 1 region between human body and CT, then search searching area is big since marked as 3 regions
In 2000 connected region, if there is right lung is regarded as, otherwise fault image only finds a lung region.
Fig. 5 is the flow chart of the embodiment three of step S104, as shown in Figure 5, in embodiment three, by setting in advance
Fixed template extracts lung region, which specifically includes:
S501:Connected region after extracting region labeling in the CT images after Threshold segmentation.By taking Figure 22 as an example, extraction
The connected region that the connected region gone out is the connected region that region labeling is 1 and region labeling is 2.By taking Figure 21 as an example, extraction
The connected region gone out is the connected region that region labeling is followed successively by 1 to 5.
S502:Judge whether region labeling is more than 20, namely corresponding rope for the left end pixel column of 2 connected region
Draw and whether is more than 10000.The step judges whether the connected region marked as 2 meets condition 1.
S503:When being judged as YES, judge region labeling for 2 connected region area (pixel number for including) whether
More than 2000, which judges whether the connected region marked as 2 meets condition 3.
S504:When being judged as YES, judge whether region labeling is less than for the right end pixel column of 2 connected region
Whether 290 row namely manipulative indexing are less than 150000, which judges whether the connected region marked as 2 meets condition 2.
S505:When being judged as NO, the connected region that the region labeling is 2 is left and right adhesion of lung lung region.
In embodiment three, first determine whether the connected region marked as 2 meets condition 1, condition 3, condition 2.When
And if only if when the right end pixel column that condition 2 is unsatisfactory for i.e. 2 regions is not less than 290, it can be determined that the region marked as 2 is
The lung region of left and right adhesion of lung.
Fig. 6 is the flow chart of the embodiment four of step S104, it will be appreciated from fig. 6 that in embodiment four, by setting in advance
Fixed template extracts lung region, which specifically includes:
S601:Connected region after extracting region labeling in the CT images after Threshold segmentation.By taking Figure 22 as an example, extraction
The connected region that the connected region gone out is the connected region that region labeling is 1 and region labeling is 2.By taking Figure 21 as an example, extraction
The connected region gone out is the connected region that region labeling is followed successively by 1 to 5.
S602:Judge whether region labeling is more than 20, namely corresponding rope for the left end pixel column of 2 connected region
Draw and whether is more than 10000.The step judges whether the connected region marked as 2 meets condition 1.
S603:When being judged as YES, judge whether region labeling is less than for the right end pixel column of 2 connected region
Whether 290 row namely manipulative indexing are less than 150000, which judges whether the connected region marked as 2 meets condition 2.
S604:When being judged as NO, according to the CT images determine connected region that the region labeling is 3 whether be
Left side lung region.
In embodiment four, first determine whether the connected region marked as 2 meets condition 1, condition 2.And if only if
When condition 1 meets condition 2 and is unsatisfactory for, determine whether the connected region that the region labeling is 3 is left according to the CT images
Side lung region.
Fig. 7 is the flow chart of the embodiment five of step S104, as shown in Figure 7, in embodiment five, by setting in advance
Fixed template extracts lung region, which specifically includes:
S701:Connected region after extracting region labeling in the CT images after Threshold segmentation.By taking Figure 22 as an example, extraction
The connected region that the connected region gone out is the connected region that region labeling is 1 and region labeling is 2.By taking Figure 21 as an example, extraction
The connected region gone out is the connected region that region labeling is followed successively by 1 to 5.
S702:Judge region labeling for 2 connected region right end pixel column whether be less than 290 row namely it is right
It should index and whether be less than 150000, which judges whether the connected region marked as 2 meets condition 2.
S703:When being judged as YES, judge whether region labeling is more than for the left end pixel column of 2 connected region
20 namely manipulative indexing whether be more than 10000.The step judges whether the connected region marked as 2 meets condition 1.
S704:When being judged as NO, according to the CT images determine connected region that the region labeling is 3 whether be
Left side lung region.
In embodiment five, first determine whether the connected region marked as 2 meets condition 1, condition 2.And if only if
When condition 1 is unsatisfactory for condition 2 and meets, determine whether the connected region that the region labeling is 3 is left according to the CT images
Side lung region.
Fig. 8 is the flow chart of the embodiment one of the step S704 in step S604, Fig. 7 in Fig. 6, as shown in Figure 8,
In embodiment one, determine whether the connected region that the region labeling is 3 is left side lung region tool according to the CT images
Body includes:
S801:Judge whether region labeling is less than 2 namely manipulative indexing for 2 connected region left end pixel column
Whether 1000 are less than;
S802:When being judged as YES, judge whether region labeling is less than for the right end pixel column of 3 connected region
Whether 290 row namely manipulative indexing are less than 150000;
S803:When being judged as YES, judge region labeling for 3 connected region area (pixel number for including) whether
More than 2000;
S804:When being judged as YES, the connected region that the region labeling is 3 is left side lung region.
In this embodiment, judge whether marked as 3 connected region be left lung, that is, judge whether the connected region is full
Whether sufficient left end pixel column is less than 2, judges whether the connected region right end pixel column marked as 3 is less than 290
Row (manipulative indexing is less than 150000) judge whether the area (pixel number for including) of the connected region marked as 3 is more than
2000).All meet and if only if three conditions, it can be determined that 3 regions are left lung region.
Fig. 9 is the flow chart of the embodiment two of the step S704 in step S604, Fig. 7 in Fig. 6, as shown in Figure 9,
In the embodiment, determine whether the connected region that the region labeling is 3 is left side lung region tool according to the CT images
Body includes:
S901:Judge whether region labeling is less than 2 namely manipulative indexing for 2 connected region left end pixel column
Whether 1000 are less than;
S902:When being judged as YES, judge whether region labeling is less than for the right end pixel column of 3 connected region
Whether 290 row namely manipulative indexing are less than 150000;
S903:When being judged as YES, judge region labeling for 3 connected region area (pixel number for including) whether
More than 2000;
S904:When being judged as YES, the connected region that the region labeling is 3 is left side lung region.
S905:It is not the connected region for selecting area in 1 and 2 connected region and being more than 2000 from region labeling, as
The right lung region.
In this embodiment, judge whether marked as 3 connected region be left lung, that is, judge whether the connected region is full
Whether sufficient left end pixel column is less than 2, judges whether the connected region right end pixel column marked as 3 is less than 290
Row (manipulative indexing is less than 150000) judge whether the area (pixel number for including) of the connected region marked as 3 is more than
2000).All meet and if only if three conditions, it can be determined that marked as 3 region be left lung region, region marked as 1 and
Void area of the region between human body and CT marked as 2, then search searching area is more than since the region marked as 4
2000 connected region, if there is right lung is regarded as, otherwise fault image only finds a lung region.
Figure 10 is the flow chart of the embodiment six of step S104, as shown in Figure 10, in embodiment six, above-mentioned implementation
The condition of mode one to embodiment five is unsatisfactory for, and is extracted to lung region by preset template, step tool
Body includes:
S1001:Connected region after extracting region labeling in the CT images after Threshold segmentation.By taking Figure 22 as an example, carry
The connected region that the connected region of taking-up is the connected region that region labeling is 1 and region labeling is 2.By taking Figure 21 as an example, carry
The connected region of taking-up is the connected region that region labeling is followed successively by 1 to 5.
S1002:Determine that regional ensemble, the regional ensemble include multiple regions from the connected region, each
Region is satisfied by left end pixel column less than 2 and area is more than 100000.
In a particular embodiment, judge whether the left end pixel column of each connected region is less than 2 successively, when
When being judged as YES, continue to judge whether the area of the connected region is more than 100000, when being judged as YES, the connected region
As the region in regional ensemble.
S1003:The maximum region of region labeling, referred to as start region are determined from the regional ensemble;
S1004:Suspicious region is filtered out from the connected region, the region labeling of the suspicious region is more than described open
The region labeling in beginning region.
S1005:Determine that target area, the area of the target area are described more than 2000 from the suspicious region
Target area is lung region.
In embodiment six, first determine whether that the void area label between human body and CT, grade traverse all connected regions successively
Domain searches out the last one and meets region left end pixel column less than 2 (manipulative indexing is less than 1000), and region area is big
In 100000 region, which is denoted as start by the region labeling.
All connected regions are begun stepping through from the regions start+1, its area is arranged from big to small, all areas is chosen and is more than 2000
Block combination is considered as lung region.
As described above, a kind of lung segmentation extracting method based on chest cross section CT images as proposed by the present invention,
Pre-processed by the CT images to chest cross section, then into row threshold division, finally according to preset template into
Row lung extracted region can realize the accurate segmentation to lung region, ensure the integrality of pulmonary parenchyma region segmentation.
Figure 11 is a kind of lung segmentation extraction system based on chest cross section CT images provided in an embodiment of the present invention
Structure diagram, as shown in Figure 11, the system includes:
CT image acquiring devices 100, the CT images for obtaining chest cross section.
In a particular embodiment, the CT images in chest cross section are generally DICOM format.
Pretreatment unit 200, for being pre-processed to the CT images;
In a particular embodiment, medium filtering can be used to scheme the CT with the denoising method of combining of Wavelet Denoising Method
As carrying out pretreatment removal noise.
Threshold segmentation device 300, for pretreated CT images into row threshold division.Figure 12 is Threshold segmentation device
Concrete structure block diagram.
Lung region extracting device 400, for carrying out lung extracted region to the CT images after Threshold segmentation.Specifically implementing
In mode, the present invention can carry out lung extracted region by preset template to CT images.
Figure 12 is in a kind of lung segmentation extraction system based on chest cross section CT images provided in an embodiment of the present invention
The structure diagram of Threshold segmentation device, as shown in Figure 12, Threshold segmentation device 300 specifically include:
Determining module 301, the pixel for being less than 0 for determining gray value from pretreated CT images;
First image determining module 302 is set to 0 for the pixel by gray value less than 0, obtains the first image.
Since the intensity value ranges of DICOM images are [- 1024,1024], and human region includes the gray value in lung region
Both greater than 0, therefore first by fixed threshold 0, the gray value less than 0 is set to 0.
Histogram determining module 303, the grey level histogram for determining described first image;
Segmentation threshold determining module 304 is considered as segmentation threshold for determining the trough in the grey level histogram between two wave crests
Value;
Second image determining module 305, for carrying out preliminary two to first image according to the segmentation threshold
Value segmentation, obtains the second image;
In a particular embodiment, Ostu algorithms estimation segmentation threshold, primary segmentation lung areas (experience also can be used
500) threshold value is.
Third image determining module 306 obtains third image for being negated to second image;
Bianry image determining module 307 is obtained for being removed processing to the third image using morphology opening operation
To bianry image;
Region labeling module 308 is used for the connected region in the bianry image according to from left to right, from top to bottom
Strategy carry out region labeling, obtain the CT images after Threshold segmentation.
The connected region that area is smaller in bianry image is removed using morphology opening operation, region mark then is carried out to image
Number (region refers to connected region).In a particular embodiment, opening operation is carried out to third image, structural element is radius
For 2 circle, purpose removal isolates " island " and obtains bianry image.Figure 21, Figure 22 are respectively specific embodiment provided by the invention
The signal of middle connected region label.
In the other embodiment of the present invention, pulmonary parenchyma region segmentation can also pass through the general of double gauss mixed model
Rate Density Distribution realizes Threshold segmentation, is then removed by mathematical morphological operation isolated island and defect repairing.
Figure 13 is in a kind of lung segmentation extraction system based on chest cross section CT images provided in an embodiment of the present invention
The structure diagram of the embodiment one of lung's extraction element, as shown in Figure 13, in embodiment one, lung region extracting device
400 specifically include:
Connected region extraction module 401, for the connection after extracting region labeling in the CT images after Threshold segmentation
Region.By taking Figure 22 as an example, the connected region extracted is the connected region that region labeling is 1 and the connection that region labeling is 2
Region.By taking Figure 21 as an example, the connected region extracted is the connected region that region labeling is followed successively by 1 to 5.
First judgment module 402, for judging whether region labeling is big for the left end pixel column of 2 connected region
Whether it is more than 10000 in 20 namely manipulative indexing;
Second judgment module 403, for when first judgment module is judged as YES, judge region labeling for 2
Whether the right end pixel column of connected region is less than 290 row namely whether manipulative indexing is less than 150000;
Third judgment module 404, for when second judgment module is judged as YES, judging region labeling for 2
Whether the area (pixel number for including) of connected region is more than 2000;
First lung's determining module 405, for when the third judgment module is judged as YES, the region labeling to be 2
Connected region be left side lung region.Be with observer herein it is reference, and it is inconsistent in anatomy.
In embodiment one, judge whether marked as 2 connected region be left lung, that is, judges whether the connected region is full
Sufficient condition 1 (judging whether 2 region left end pixel columns were more than for 20 (manipulative indexing is more than 10000)), condition 2 (judge 2nd area
Whether domain right end pixel column is less than 290 row (manipulative indexing be less than 150000)), condition 3 (judge that the area in region 2 (wraps
The pixel number contained) whether it is more than 2000).All meet and if only if three conditions, it can be determined that 2 regions are left lung region.
Figure 14 is in a kind of lung segmentation extraction system based on chest cross section CT images provided in an embodiment of the present invention
The structure diagram of the embodiment two of lung's extraction element, as shown in Figure 14, in embodiment two, Threshold segmentation device is specific
Including:
Connected region extraction module 401, for the connection after extracting region labeling in the CT images after Threshold segmentation
Region.By taking Figure 22 as an example, the connected region extracted is the connected region that region labeling is 1 and the connection that region labeling is 2
Region.By taking Figure 21 as an example, the connected region extracted is the connected region that region labeling is followed successively by 1 to 5.
First judgment module 402, for judging whether region labeling is big for the left end pixel column of 2 connected region
Whether it is more than 10000 in 20 namely manipulative indexing;
Second judgment module 403, for when first judgment module is judged as YES, judging region labeling for 2
Whether the right end pixel column of connected region is less than 290 row namely whether manipulative indexing is less than 150000;
Third judgment module 404, for when second judgment module is judged as YES, judging region labeling for 2
Whether the area (pixel number for including) of connected region is more than 2000;
First lung's determining module 405, for when the third judgment module is judged as YES, the region labeling to be 2
Connected region be left side lung region.Be with observer herein it is reference, and it is inconsistent in anatomy.
Second lung's determining module 406, for not being to select area in 1 and 2 connected region to be more than from region labeling
2000 connected region, as the right lung region.
In embodiment two, first determines whether marked as 2 connected region be left lung, that is, judge that the connected region is
It is no to meet condition 1, condition 2, condition 3.All meet and if only if three conditions, it can be determined that the region marked as 2 is the areas Zuo Fei
Domain, meanwhile, marked as void area of 1 region between human body and CT, then search searching area is big since marked as 3 regions
In 2000 connected region, if there is right lung is regarded as, otherwise fault image only finds a lung region.
Figure 15 is in a kind of lung segmentation extraction system based on chest cross section CT images provided in an embodiment of the present invention
The structure diagram of the embodiment three of lung's extraction element, as shown in Figure 15, in embodiment three, Threshold segmentation device is specific
Including:
Connected region extraction module 401, for the connection after extracting region labeling in the CT images after Threshold segmentation
Region.By taking Figure 22 as an example, the connected region extracted is the connected region that region labeling is 1 and the connection that region labeling is 2
Region.By taking Figure 21 as an example, the connected region extracted is the connected region that region labeling is followed successively by 1 to 5.
First judgment module 402, for judging whether region labeling is big for the left end pixel column of 2 connected region
Whether it is more than 10000 in 20 namely manipulative indexing.The step judges whether the connected region marked as 2 meets condition 1.
4th judgment module 407, for when first judgment module is judged as YES, judging region labeling for 2
Whether the area (pixel number for including) of connected region is more than 2000, which judges whether the connected region marked as 2 is full
Sufficient condition 3.
5th judgment module 408, for when the 4th judgment module is judged as YES, judge region labeling for 2 company
Whether the right end pixel column in logical region is less than 290 row namely whether manipulative indexing is less than 150000, which judges mark
Number whether meet condition 2 for 2 connected region.
Third lung determining module 409, for when the 4th judgment module is judged as NO, determining the region mark
Number it is left and right adhesion of lung lung region for 2 connected region.
In embodiment three, first determine whether the connected region marked as 2 meets condition 1, condition 3, condition 2.When
And if only if when the right end pixel column that condition 2 is unsatisfactory for i.e. 2 regions is not less than 290, it can be determined that the region marked as 2 is
The lung region of left and right adhesion of lung.
Figure 16 is in a kind of lung segmentation extraction system based on chest cross section CT images provided in an embodiment of the present invention
The structure diagram of the embodiment four of lung's extraction element, as shown in Figure 16, in embodiment four, lung region extracting device tool
Body includes:
Connected region extraction module 401, for the connection after extracting region labeling in the CT images after Threshold segmentation
Region.By taking Figure 22 as an example, the connected region extracted is the connected region that region labeling is 1 and the connection that region labeling is 2
Region.By taking Figure 21 as an example, the connected region extracted is the connected region that region labeling is followed successively by 1 to 5.
First judgment module 402, for judging whether region labeling is big for the left end pixel column of 2 connected region
Whether it is more than 10000 in 20 namely manipulative indexing.The step judges whether the connected region marked as 2 meets condition 1.
Second judgment module 403, for when first judgment module is judged as YES, judging region labeling for 2
Whether the right end pixel column of connected region is less than 290 row namely whether manipulative indexing is less than 150000, which judges
Whether the connected region marked as 2 meets condition 2.
When second judgment module is judged as NO, the lung region extracting device further includes:4th lung determines
Module 410, for determining whether the connected region that the region labeling is 3 is left side lung region according to the CT images.
In embodiment four, first determine whether the connected region marked as 2 meets condition 1, condition 2.And if only if
When condition 1 meets condition 2 and is unsatisfactory for, determine whether the connected region that the region labeling is 3 is left according to the CT images
Side lung region.
Figure 17 is in a kind of lung segmentation extraction system based on chest cross section CT images provided in an embodiment of the present invention
The structure diagram of the embodiment five of lung's extraction element, as shown in Figure 17, in embodiment five, lung region extracting device tool
Body includes:
Connected region extraction module 401, for the connection after extracting region labeling in the CT images after Threshold segmentation
Region.By taking Figure 22 as an example, the connected region extracted is the connected region that region labeling is 1 and the connection that region labeling is 2
Region.By taking Figure 21 as an example, the connected region extracted is the connected region that region labeling is followed successively by 1 to 5.
6th judgment module 411, for judging whether region labeling is small for the right end pixel column of 2 connected region
Whether it is less than 150000 in 290 row namely manipulative indexing, which judges whether the connected region marked as 2 meets condition 2.
7th judgment module 412, for when the 6th judgment module is judged as YES, judge region labeling for 2 company
The left end pixel column in logical region whether be more than 20 namely manipulative indexing whether be more than 10000.The step judge marked as
Whether 2 connected region meets condition 1.
When the 7th judgment module is judged as NO, the lung region extracting device further includes:4th lung determines
Module 410, for determining whether the connected region that the region labeling is 3 is left side lung region according to the CT images.
In embodiment five, first determine whether the connected region marked as 2 meets condition 1, condition 2.And if only if
When condition 1 is unsatisfactory for condition 2 and meets, determine whether the connected region that the region labeling is 3 is left according to the CT images
Side lung region.
Figure 18 is in a kind of lung segmentation extraction system based on chest cross section CT images provided in an embodiment of the present invention
The structure diagram of the embodiment one of 4th lung's determining module, as shown in Figure 18, in embodiment one, the 4th lung determines
Module 410 specifically includes:
First judging unit 4101, for judging whether region labeling is small for 2 connected region left end pixel column
Whether it is less than 1000 in 2 namely manipulative indexing;
Second judgment unit 4102, for when first judging unit is judged as YES, judge region labeling for 3 company
Whether the right end pixel column in logical region is less than 290 row namely whether manipulative indexing is less than 150000;
Third judging unit 4103, for when the second judgment unit is judged as YES, judge region labeling for 3 company
Whether the area (pixel number for including) in logical region is more than 2000;
First lung's determination unit 4104, for when the third judging unit is judged as YES, the region labeling to be 3
Connected region be left side lung region.
In this embodiment, judge whether marked as 3 connected region be left lung, that is, judge whether the connected region is full
Whether sufficient left end pixel column is less than 2, judges whether the connected region right end pixel column marked as 3 is less than 290
Row (manipulative indexing is less than 150000) judge whether the area (pixel number for including) of the connected region marked as 3 is more than
2000).All meet and if only if three conditions, it can be determined that 3 regions are left lung region.
Figure 19 is in a kind of lung segmentation extraction system based on chest cross section CT images provided in an embodiment of the present invention
The structure diagram of the embodiment two of 4th lung's determining module, it appears from figure 19 that in this embodiment, the 4th lung determines
Module 410 specifically includes:
4th lung's determining module 4101, for judging that region labeling is for 2 connected region left end pixel column
It is no be less than 2 namely manipulative indexing whether be less than 1000;
Second judgment unit 4102, for when first judging unit is judged as YES, judge region labeling for 3 company
Whether the right end pixel column in logical region is less than 290 row namely whether manipulative indexing is less than 150000;
Third judging unit 4103, for when the second judgment unit is judged as YES, judge region labeling for 3 company
Whether the area (pixel number for including) in logical region is more than 2000;
First lung's determination unit 4104, for when the third judging unit is judged as YES, the region labeling to be 3
Connected region be left side lung region.
Second determination unit 4105, for not being to select area in 1 and 2 connected region to be more than from region labeling
2000 connected region, as the right lung region.
In this embodiment, judge whether marked as 3 connected region be left lung, that is, judge whether the connected region is full
Whether sufficient left end pixel column is less than 2, judges whether the connected region right end pixel column marked as 3 is less than 290
Row (manipulative indexing is less than 150000) judge whether the area (pixel number for including) of the connected region marked as 3 is more than
2000).All meet and if only if three conditions, it can be determined that marked as 3 region be left lung region, region marked as 1 and
Void area of the region between human body and CT marked as 2, then search searching area is more than since the region marked as 4
2000 connected region, if there is right lung is regarded as, otherwise fault image only finds a lung region.
Figure 20 is in a kind of lung segmentation extraction system based on chest cross section CT images provided in an embodiment of the present invention
The structure diagram of the embodiment six of lung's extraction element, as shown in Figure 20, in embodiment six, the above embodiment one to
The condition of embodiment five is unsatisfactory for, and the lung region extracting device 400 specifically includes:
Start region determining module 401, for the connection after extracting region labeling in the CT images after Threshold segmentation
Region.By taking Figure 22 as an example, the connected region extracted is the connected region that region labeling is 1 and the connection that region labeling is 2
Region.By taking Figure 21 as an example, the connected region extracted is the connected region that region labeling is followed successively by 1 to 5.
Area is expected and determining module 413, for determining regional ensemble, the regional ensemble packet from the connected region
Multiple regions are included, each region is satisfied by left end pixel column less than 2 and area is more than 100000.
In a particular embodiment, judge whether the left end pixel column of each connected region is less than 2 successively, when
When being judged as YES, continue to judge whether the area of the connected region is more than 100000, when being judged as YES, the connected region
As the region in regional ensemble.
Start region determining module 414, for determining the maximum region of region labeling from the regional ensemble, referred to as
Start region;
Suspicious region determining module 415, for filtering out suspicious region from the connected region, the suspicious region
Region labeling is more than the region labeling of the start region.
Target area determining module 416, for determining target area from the suspicious region, the target area
Area is more than 2000, and the target area is lung region.
In embodiment six, first determine whether that the void area label between human body and CT, grade traverse all connected regions successively
Domain searches out the last one and meets region left end pixel column less than 2 (manipulative indexing is less than 1000), and region area is big
In 100000 region, which is denoted as start by the region labeling.
All connected regions are begun stepping through from the regions start+1, its area is arranged from big to small, all areas is chosen and is more than 2000
Block combination is considered as lung region.
As described above, a kind of lung segmentation extraction system based on chest cross section CT images as proposed by the present invention,
Pre-processed by the CT images to chest cross section, then into row threshold division, finally according to preset template into
Row lung extracted region can realize the accurate segmentation to lung region, ensure the integrality of pulmonary parenchyma region segmentation.
With reference to specific embodiment, technical scheme of the present invention is discussed in detail.In this specific embodiment, the program
Including following:
1, gathered data:Lung CT image data are obtained, if the image is I.
2, it pre-processes.
Denoising method is combined to image I denoisings using medium filtering and Wavelet Denoising Method.
3, Threshold segmentation.
(1), the pixel value by Hu values in image I less than 0 is classified as 0, obtains I_;
(2), preliminary binary segmentation is carried out to image I_ using automatic threshold segmentation method (Ostu algorithms), then to binary map
As negating, B_I_ is obtained;
(3), opening operation is carried out to B_I_, structural element is the circle that radius is 2.Purpose removal isolates " island " and obtains two-value
Image _ B_I_;
(4), right _ B_I_ carries out region labeling, and label sequence is from left to right, from top to bottom;
4, lung region is extracted by the template of setting.Figure 23 is the flow of lung extracted region in the specific embodiment
Schematic diagram, in the figure, block (2,1) indicate that the 1st point in block 2 of index, block (t) indicate block t, len (block
(t)) indicate that the area (number of the point in the area region indicates) of block t, L==t indicate to find the region marked as t.
The juche idea extracted to lung region is:First determine whether left lung (including left and right adhesion of lung) region labeling;Its
It is secondary judge pulmo whether adhesion, then determine pulmo zone number;Finally when above-mentioned steps all cannot judge lung region:
The first step first determines the number (remaining area is voxel areas) of non-voxel block, and second step is again to the face of the block of voxel areas
Product (number of pixel) carries out descending sort, and block of the front two area more than 2000 is chosen as lung region according to sequence,
Otherwise judge that this layer of CT images are free of lung areas, be specifically described as:
A, judge 2 connected region of label whether be left lung (be herein with observer for reference, differ with anatomy
It causes).Condition 1 judges whether 2 region left end pixel columns were more than for 20 (manipulative indexing is more than 10000);Condition 2 judges 2
Whether region right end pixel column is less than 290 row (manipulative indexing is less than 150000);Condition 3, the area for judging region two
Whether (pixel number for including) is more than 2000.If three conditions all meet, it can be determined that 2 regions are lung areas and 1
Void area of the region between human body and CT, then the unicom region that area is more than 2000 is found in search since 3 regions, if
In the presence of right lung is regarded as, otherwise fault image only finds a lung region.
If B, in A conditionals 1, condition 2, condition 3, when only condition 2 is unsatisfactory for, i.e. where the right end pixel in 2 regions
Row are more than 290.It may determine that 2 regions are the lung region of left and right adhesion of lung at this time.
C, if A conditionals 1 are unsatisfactory for 2 either condition of condition, judge whether 3 regions are left lung.Setting judges item
Part:Condition 1 judges whether 2 region left end pixel columns were less than for 2 (manipulative indexing is less than 1000);Condition 2 judges 3 regions
Right end pixel column whether be less than 290 (manipulative indexings be less than 150000);Condition 3 judges whether the area in 3 regions is big
In 2000.If three conditions all meet, it can be determined that 3 regions are lung region and 1 region and 2 regions between human body and CT
Void area, then the unicom region that area is more than 2000 is found in search since 4 regions, if there is being regarded as the right side
Lung, otherwise fault image only find a lung region.
If D, A, B, C are unsatisfactory for, the void area label between human body and CT is first determined whether:All companies are traversed successively
Logical region searches for the last one and meets region left end pixel column less than 2 (manipulative indexing is less than 1000), and region area
More than 100000, it is considered as void area of the region between human body and CT if met, which is denoted as start.From
The regions start+1 begin stepping through all connected regions, its area is arranged from big to small, choose the area that all areas are more than 2000
Block combination is considered as lung region.
If E, above-mentioned condition is all unsatisfactory for being considered as the fault image without lung region.
5, lung region segmentation result.
Figure 24 is the schematic diagram in the lung region extracted in embodiment one, and Figure 25 is the signal in pulmonary parenchyma region in embodiment one
Figure, Figure 26 are the schematic diagram in the lung region extracted in embodiment two, and Figure 27 is the schematic diagram in pulmonary parenchyma region in embodiment two, figure
28 be the schematic diagram in the lung region extracted in embodiment three, and Figure 29 is the schematic diagram in pulmonary parenchyma region in embodiment three.By Figure 24
Compared to Figure 29 it is found that in LIDC databases, compared with the goldstandard of expert's calibration, lung region that the present invention extracts it is accurate
Rate is more than 96%.
In conclusion a kind of lung segmentation extracting method based on chest cross section CT images proposed by the present invention and being
System can realize the accurate segmentation to lung region, ensure the integrality of pulmonary parenchyma region segmentation, avoid the edge due to lung region
Missing and the missing in region and the problem of cause to fail to pinpoint a disease in diagnosis during follow-up diagnosis.
The main protection point of this patent is lung extracted region process, including five steps of A, B, C, D, E in specific embodiment.
The juche idea of lung extracted region process is:First determine whether left lung (including left and right adhesion of lung) region labeling;Secondly judge left and right
Lung whether adhesion, then determine pulmo zone number;Finally when above-mentioned steps all cannot judge lung region:The first step is first true
The number (remaining area is voxel areas) of fixed non-voxel block, second step is again to the area (pixel of the block of voxel areas
Number) carry out descending sort, according to sequence choose front two area more than 2000 block be used as lung region, otherwise judge be somebody's turn to do
Layer CT images are free of lung areas.
The beneficial effects of the present invention are:
1, CT imaging techniques are taken full advantage of to the precancerous diagnostic value of lung, auxiliary doctor improves the correct of Lung neoplasm
Diagnosis, and the diagnosis efficiency of doctor is improved, alleviate labour fatigue;
2, the precancerous lesser tubercle of lung can make patient obtain the survival rate of the longer time limit as can timely treated.This
Patent is in computer-aided diagnosis it is possible to prevente effectively from the missing inspection of Lung neoplasm, timely diagnoses and reducing the same of patient's slight illness
When, also reduce the medical treatment cost of patient.
3, it can realize the accurate segmentation to lung region, ensure the integrality of pulmonary parenchyma region segmentation.
One of ordinary skill in the art will appreciate that realizing all or part of flow in above-described embodiment method, Ke Yitong
It crosses computer program and is completed to instruct relevant hardware, the program can be stored in general computer read/write memory medium
In, the program is when being executed, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, the storage medium can be magnetic
Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access
Memory, RAM) etc..
Those skilled in the art will also be appreciated that the various functions that the embodiment of the present invention is listed are by hardware or soft
Part depends on the design requirement of specific application and whole system to realize.Those skilled in the art can be specific for each
Using, the function that the realization of various methods can be used described, but this realization is understood not to protect beyond the embodiment of the present invention
The range of shield.
Specific embodiment is applied in the present invention, and principle and implementation of the present invention are described, above example
Explanation be merely used to help understand the present invention method and its core concept;Meanwhile for those of ordinary skill in the art,
According to the thought of the present invention, there will be changes in the specific implementation manner and application range, in conclusion in this specification
Appearance should not be construed as limiting the invention.