Khan Z. F. Segmentation of Lung Images using Region Based Neural Networks. Biomed Pharmacol J 2018;11(4).
Manuscript received on :15-Sep-2018
Manuscript accepted on :02-Nov-2018
Published online on: 09-11-2018
Plagiarism Check: Yes
Reviewed by: Narayanappa Krishnappa
Second Review by: Prakash N. B.
Final Approval by: Dr. Kishore Kumar Jella

How to Cite    |   Publication History
Views Views: (Visited 112 times, 1 visits today)   Downloads PDF Downloads: 73
Segmentation of Lung Images using Region Based Neural Networks

Z. Faizal Khan

Department of Computer Science, College of Computing and Information Technology, Shaqra University, Kingdom of Saudi Arabia.

Corresponding Author E-mail:



In this article, a neural network-based segmentation approach for CT lung images was proposed using the combination of Neural Networks and region growing which combines the regions of different pixels. The proposed approach expresses a method for segmenting the lung region from lung Computer Tomography (CT) images. This method is proposed to obtain an optimal segmented region. The first step begins by the process of finding the area which represents the lung region. In order to achieve this, the regions of all the pixel present in the entire image is grown. Second step is, the grown region values are given as input to the Echo state neural networks in order to obtain the segmented lung region. The proposed algorithm is trained and tested for 1,361 CT lung slices for the process of evaluating segmentation accuracy. An average of 98.50% is obtained as the segmentation accuracy for the input lung CT images.


Computed Tomography (CT); Image Segmentation; Lung Images; Neural Networks

Download this article as: 
Copy the following to cite this article:

Khan Z. F. Segmentation of Lung Images using Region Based Neural Networks. Biomed Pharmacol J 2018;11(4).

Copy the following to cite this URL:

Khan Z. F. Segmentation of Lung Images using Region Based Neural Networks. Biomed Pharmacol J 2018;11(4). Available from:


Each pixel present in the segmented region is important for the process of image segmentation. This is common with some features such as color based, intensity based, or texture based. Computer based segmentation of lung CT images has been an important and innovative development. Segmenting medical images continues to be a significant problem which is done by several researchers within few decades. In general, medical image segmentation methods have various restrictions since the medical images are very similar in its gray level and texture. Due to this complexity, significant segmentation error may occur. Inorder to overcome the drawbacks present in it, a new neural network approach combined with clustering and region growing is proposed in this work. This new method can operate on high resolution medical images with low computational complexity.

Many methods such as thresholding based, knowledge based, edge detection, region growing, active contour/shape models and morphological based operations 3,5-13 have been proposed by earlier researchers for the process of segmenting the lung region of interest automatically in lung images more effectively. A new improved method for segmenting the regions of lung by combining a threshold-based and an adaptive based border marching method was proposed in.3 Their modified algorithm process the smoothing operation in lung border in a way which is geometric in nature hence it can be used to include various forms of juxtapleural nature of nodules. This method can reduce the over segmentation done in abdomen region which is present adjacent to the lung. They have analyzed their algorithm for 20 slices. An under-segmentation and over segmentation accuracy of 1.63 % and 0.43 %, respectively is obtained from their proposed methodology. The performance of threshold-based lung segmentation algorithms is given in4 In this work, they have applied their proposed algorithm on a set of 276 chest CT scans which has a total number of 2292 slices. All the slices were taken under various abnormalities and under different scanning positions. Different threshold based lung segmentation schemes was applied and visually monitored for all the slices. An average error rate of 4.4 % was obtained in the total 126 scans.

Antonelli et al5 proposed a new technique which combines traditional and purposely used image processing based methods, for example, segmentation based on thresholding, morphological based operations on opening and closing, detection of border its thinning and its reconstruction. And at last the region filling operation is also performed. The result is a binary image which is obtained fom a thresholding based technique. The morphological based operators such as opening and closing were applied for eliminating the smaller objects which is present inside the lung border. Lung borders are found using the tracking based algorithm. Operator called as morphological based thinning is applied for reducing the size of border size for the complete lung image which is used as input. The main drawback of their proposed method is the background cannot be eliminated completely when there is noise at the corners.

Arfan Jaffar et al7 framed a new methodology for effective segmentation of the entire lung region from lung CT images. This can be achieved by combining the spatial based Fuzzy C-Means clustering and and morphological based techniques in an ordered manner. Removal of Background, Preprocessing, and operation based on Morphological analysis is used for this effective segmentation. A background removal operator which is based histogram is used for removing the complete pixels which is present around the lung border. Preprocessing operation is done in order to smoother and removing the unwanted noise present around the final segmented result. At last, operators based morphological computations are used for separating the edges around the lung for preforming the filling process around the small holes which is present in it. Leader et al in [11] developed a heuristic based methodology for effective segmentation of lung images. Here, they used a combination of slice and value of pixel threshold combined with two or more sets of rules for classification. Initially, image pre-processing methods are applied to remove the background pixels. A pixel based thresholding operation is done for finding the presence of tissues of lung area.

Refinement is the final step in which all the regions which are initially segmented is performed for pruning the airways which were detected incorrectly. This process can also used to separate the right and left lungs from the overall CT lung image. The overall accuracy of their method was computed by using 101 CT cases which has 91 thick slices and10 thin slices. They have obtained an overall segmentation accuracy of 94.0% for all the 2,969 thick and 97.6% accuracy for 1,161 thin CT slices.

Shiying et al1 developed a novel method for identifying lungs in CT pulmonary slices. The complete methodology is partitioned in to three major categories. Initially, Gray-level thresholding has been used to extract lung from CT-Scanned image. Second step is the separation of left and right sides f lungs. This process can be done by identifying the junctions of anterior and posterior by using a dynamic programming. Finally, a sequence of morphological operations are used to smooth the irregular boundaries along the mediastinum. The major drawbacks of this algorithm are its fixed ball size and over segmentation.

Description of the Proposed Algorithm

Region growing (RG)2 is a technique which identifies the sets of pixels which are connected and continuous in nature present in the image. This can be done using some threshold based operations. Region growing is an operation, which can be done by choosing a point of seed for growing the regions. This can be done by checking the availability for including the neighbouring pixels which is based on the threshold. Each set of pixels will become the seed for effective growing of adjacent pixels. This process can be performed throughout the complete image and it can be continued till all the entire pixels are included in the growing region of process. The complete process is applied in CT images for the process of segmentation. In this method, initially, a 3×3 pixel of lung region is taken for processing. The rule of inclusion12 is applied in this method for fixing a value by selecting the pixels which has a value of intensity which is lower than the set threshold. The above said process is carried out on he complete images from the starting to ending pixels present in it.

Esnn Topology

Recurrent type discrete and time based neural network is the Echo State Neural Network.14 It has an input unit of S, X as the reservoir of internal in terms of units output as Y in terms of units. It is a recurrent type neural network which has a reservoir which has a non-available trainable recurrent part and a readout which is simple and linear in nature. The weights that represents the connection and inputs are generated randomly.

The ESNN which is used in this algorithm has three layers. They are an input type layer, middle type layer and an output type layer. The various activation function of the input type layer, middle type layer and the output type layers at an interval of time t can be computes as follows.

ZS(d) = (a1(d) + a2(d) + ….. an (d))                                           (1)

ZX(d) = (b1(d) + b2(d) + ….. bn (d))                                         (2)

ZY(d) = (c1(d) + c2(d) + ….. cn (d))                                           (3)

The link between units of input and the units of internal are expressed by an I × X weighted matrix which is represented by U. All the connections are accumulated in an Y × Y weighted matrix which is represented by W, and All the connections are accumulated for the units of internal in terms of output units are expressed in Y × X weighted matrix which is represented by V. The upgradation of input units is based on

I (d+ 1) = f (U a (d + 1) + Y b (d))                                        (4)

Where, f is the activation function of various reservoirs present in it. It is represented as a sigmoidal type function called tanh.  The output units are upgradation of output units can be done based on

O (d + 1) = f (V c (d + 1) + Y b (d))                                       (5)

Esnn with Rg Topology

The ESNN with RG topology consists of three layers such as layer 1, layer2 and layer 3. The layer 1 is the input layer (ZS(d)). Layer 2 is the hidden layer (ZX(d)) and layer 3 is the output layer (ZY(d)) which contains reservoirs (nodes). The recurrent type Echo State Network has various highly interlinked reservoirs with dynamical based components and states. These are called as echo states. One of the main memory less property of this neural network is its linear readout which can be trained for producing the desired output as result. The hidden layer receives the features from the CC algorithm. Each and every node that are present in the network between the input and the hidden layer are linked in such a way that the node that represent output from the layer of output is given or send back towards the hidden layer. When a pattern is presented for training the proposed ESNN with RG, a state vector is generated in the layer which has hidden structure. Similarly, n number of state vectors is formed for n number of patterns respectively. These state vectors represent the condition of the pattern.

Working Principle of ESNN with RG

The ESNN is trained with training patterns obtained from the RG for getting the final resultants as weights. During the process of testing the proposed neural network, a set of pixels as pattern from the complete window which is in moving state is accessed and processed which has the trained weights in predefined form for getting an output in the layer that is meant for output of the neural network. Training and testing procedures of the proposed neural network is as follows.

Training and Testing ESNN with RG

The training patterns formed through the RG algorithm are further fed as input towards the Neural Network to train it along with ESNN. For segmenting the image effectively, three main window features are used in the layer that is used for input. Its output and the corresponding target outputs (0.1 or 0.9) are presented in the output layer of the proposed neural network topology called as ESNN. A new state vector is formed by giving the summed value over an activation function which is the tanh function. The obtained matrix is rectangular in type.

Algorithm for Training

Step 1: RG as Input features

Step 2: Fix the total set of applicable reservoirs.

Step 3: Fix the total set of nodes towards input layer as three.

Step 4: Fix the set of nodes towards output layer as set of values assigned in target.

Step 5: Fix the set of state vector and set of reservoirs as zero.

Step 6: Fix the weights of random which is common to input layer (ZS(d)) and hidden layer (WX(t)). Set the initial weights in output layer as (ZY(d)) and hidden layer as (ZX(d)). Also Set the weights for reservoirs.

Step 7: Compute the state_nextvector = tanh ((ZS(d) ZX(d)) weights*Input_pattern + (ZX(t))_weights* state_present vector+ (ZX(d) ZY(d))_weights * Target_pattern).

Step 8: Compute, A = Pseudo_inverse (State_all patternsvector).

Step 8: Compute, Z_out = A * T

Step 9 Store Z_out as segmented output.

Algorithm for Testing or segmenting the image

Step 1: RG as Input features

Step 2: Fix the total set of applicable reservoirs.

Step 3: Compute the state_vector = tanh (Za(d) Zb(d))_weights*Input_pattern + (Zb(d))_weights* state_presentvector+ (Zb(d) Zc(d))_weights x Target_pattern).

Step 4: Approximate output = state_vector x Z_out.

Step 5: Allot 0 for black and  255 for white in the new column of matrix which is the segmented result.

Results and Discussion

In this section, we the results of the proposed methodology is presented. Computing the segmentation accuracy is the most commonly used method to ensure the performance of segmentationSegmentation accuracy2 Aprop is computed as follows.

Equation 6.7.8

where Sprop and Oprop are the region properties.

 Table 1: Segmentation Results for Different Images using proposed methodology. Table 1: Segmentation Results for Different Images using proposed methodology.


Click here to view table


The segmented images shown in Table 1 are obtained with optimum values of Threshold =140 for block size 3×3 for different images. In this approach, the region grown images are considered as ground truth image. Table 2 show the segmentation accuracy based on the number of objects for all the five sample CT lung slices. The performance remains closely consistent which indicates the value of the variables of ESNN with CCR algorithm are optimal. From this table, it can be observed that our proposed segmentation method provides an overall accuracy of 98.45% in segmenting the CT lung images effectively.

Table 2: Segmentation Accuracy based on Number of objects.

Image   Solidity Area Perimeter Total Aprop
Image 1 Segmented 153.8936 1527 626.3849 2528.3044 98.98
Unsegmented 170.8582 1545 638.3848 2554.2435
Image 2 Segmented 132.5644 1439 867.1724 2528.7368 98.43
Unsegmented 135.5644 1509 924.42 2568.9844
Image 3 Segmented 170.875 1204 886.2178 2311.0928 98.35
Unsegmented 175.876 1252 921.7996 2349.6756
Image 4 Segmented 180.809 979 830.7306 2232.2680 98.32
Unsegmented 190.701 1039 880.71 2270.4110
Image 5 Segmented 182.5944 1439 867.1724 2528.7368 98.43
Unsegmented 135.5644 1509 924.442 2569.0064
Average: 98.50


Conclusion and Future Work

In this paper, a new neural network approach based on the combination of region growing method and Neural Networks has been proposed to segment the lung CT images effectively. This method overcomes the dis advantages of existing techniques since it deals with the pixels present in the entire image. In this method, a combination of clustering along with region growing is used for entire area of the gray scale image. Hence, more clarity is obtained in segmenting the region of interest present in the image. The proposed algorithm is trained and tested for 1,361 different lung CT slices In order to measure the performance of the proposed method. The major contribution of this paper is an improvement in segmentation accuracy by combining neural network along with the clustering and region growing. Future works in this direction can be the proposal of a new methodology for finding the presence of nodules and to analyze the time complexity for different CT lung images.

Conflict of Interest

The author declares that he has no conflict of interest in this research


  1. Hu S., Hoffman E. A., Reinhardt J. M. Automatic lung segmentation for accurate quantitation of volumetric X-ray CT images. IEEE Trans Med Imaging. 2001;20:490–8.
  2. Khan F. Z & Kannan  A. Intelligent Segmentation of Medical images using Fuzzy Bitplane Thresholding. Measurement science and Review. 2014;14(2):94-101.
  3. Pu J., Roos J., Yi C. A., Napel S., Rubin G. D., Paik D. S. Adaptive border marching algorithm: Automatic lung segmentation on chest CT images. Computerized Medical Imaging and Graphics. 2008;32(6):452-462.
  4. Meng  X., Qiang Y., Zhu S., Fuhrman C., Siegfried J. M., Pu J. Illustration of the obstacles in computerized lung segmentation using examples. Medical Physics. 2012;39(8):4984-4991.
  5. Antonelli M., Lazzerini B., Marcelloni F. Segmentation and reconstruction of the lung volume in CT image.  20th annual ACM symposium on applied computing.  2005;1:255–259.
  6. Belfkih S . Texture Image Segmentation Using A New Descriptor and Mathematical Morphology.  The International Arab Journal of Information Technology. 2013;10:2.
  7. Jaffar A., Hussain A., Majid A. M. Fuzzy Entropy Based Optimization of Clusters for the Segmentation of Lungs in CT Scanned Images. Knowledge Information Systems. 2010;24:91-111.
  8.  Jeba J. K & Madheswaran M.  An Improved Medical Decision Support System to Identify the Diabetic Retinopathy Using Fundus Images. J Med Syst. 2012;36:3573–3581.
  9. Li A., Nie S. D., Cheng J. J. Fast Automatic Method of Lung Segmentation in CT Images Using Mathematical Morphology. IFMBE Proceedings. 2007;14:2419-2422.
  10. Armato S. G., Giger M. L., Moran C. J. Computerized detection of pulmonary nodules on CT scans. Radio Graphics. 1999;19:1303-1311.
  11. Leader J. K., Zheng B., Rogers R. M., Sciurba F. C., Perez A., Chapman B. E., Patel S., Fuhrman C. R & Gur D. Automated lung segmentation in X-ray computed tomography: Development and Evaluation of a Heu-ristic Threshold-based Scheme. Academic Radiology. 2003;10(11):1224-36.
  12.  Nunzio G. D.,  Tommasi E., Agrusti A.,Cataldo R.,  De I. M., Favetta M., Silvio M., et al. Automatic Lung Segmentation in CT Images with Accurate Handling of the Hilar Region. J Digit Imaging. 2011;24(1):11–27.
  13. Bartz D., Mayer D., Fischer J., Ley S., del Rio A., Thust S. Hybrid segmentation and exploration of the human lungs. Proceedings of the IEEE Visualization. 2003;177–84.
  14. Gallicchio C.,  Micheli A. Tree Echo State Networks. Neuro computing. 2013;101(4):319–337.
Share Button
(Visited 112 times, 1 visits today)

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.