Lung Cancer Detection on CT Images By Using Image Processing

This project is mainly based on image processing technique by using MATLAB. Now a days image processing techniques are widely use in bio-medical sector. The whole process includes noise removal operation, thresholding, gray scale imaging, histogram equalization, segmentation, morphological operation and comparison operation. Here we are using different types of segmentation method and made a comparison between them. We applied the same sample for all the segmentation. Detection of lung cancer from computed tomography (CT) images is done by using MATLAB software. IndexTerms Image Acquisition, Image enhancement, Image Segmentation, Morphological operation. ________________________________________________________________________________________________________


I. INTRODUCTION
In this project we are detecting the lung cancer from the computed tomography (CT) images by using image processing technique in MATLAB. First of all we must know that what lung cancer is, so Lung cancer is a disease in which abnormal cells multiplying and growing and forms a tumor in lungs. This project is starts with collecting a number of computed tomography (CT) scanned images from the available data base. This images will be further being processed, enhanced, and segmented than load the images into mat lab for cancer detection and then after comparison classify into normal and abnormal tumor. This techniques helps to detects cancer and help us for diagnosis solution. This computed tomography (CT) scanned images are used as an input image, after getting the input image we removed the noise from the input image by using different filtration technique. In next step we do the gray scale imaging and then thresholding operation is done and after that we apply the histogram equalization, these all above operations are come under the image acquisition and image enhancement. In next step image segmentation will be done the segmentation is done, there are different types of image segmentation ( thresholding segmentation, texture segmentation, watershed segmentation) are used for the comparison. We are aiming to get more accurate result by using image enhancement technique and image segmentation operation and by the comparison of effected area so that intensity of cancer can be classified. We can also use MRI images, X-ray images of lung for the cancer detection as an input image instead of using computed tomography (CT) image, the whole procedure will be the same.

II. METHODOLOGY
This project consists of four major stages, the first stage is Image Acquisition, the second stage is Image Processing techniques, third stage is consist of image segmentation operation and the fourth or last stage is image extraction, and comparison. All the four stages are having some basic operations and steps which are necessary to full fill the requirements and to complete the stage step by step.
The different steps and stages are as following:-1.) Image Acquisition 2.) Image Enhancement 3.) Removal of noise 4.) Convert the input image to gray scale image 5.) Compute threshold technique 6.) Apply histogram equalization technique 7.) Compute image segmentation 8.) Morphological operation and comparison.

1.) IMAGE ACQUISITION
The first stage of any image processing system involves image acquisition, after the image has been obtained further operations are applied. The aim of image acquisition is to get the image of required area or effected region so that the detection can be done. It starts with collecting a computed tomography (CT) images of lung of different person from the record or available data base. This computed tomography (CT) images are further used as input to the system. After image acquisition we can proceed to image processing stage for further operations.

2.) IMAGE ENHANCEMENT
The second stage is an image enhancement. Image enhancement is a technique which is used to improve the quality of the image and to get the better image than the provided one, it provides a clear better and the accurate parameter of the desired region. For this purpose noise removal from the images, image filtering, techniques are use, which will helpful to detect cancer parameter during processing.

2.1) DE-NOISING
Digital images can have various types of noise. This noise can be the result of error in the image processing and segmentation and some other further operations that result in the pixel values that do not true intensity of real image. This noise may leads to interrupted o false values which may give the false information about the tumor and the person can be misguided so the removal of noise is necessary. We are using median filter for the removal of noise, but we can use any of the method from above three. The median filter is a nonlinear digital filtering technique, often used to remove noise. Such noise reduction is a typical pre-processing step to improve the results of later processing for example, edge detection on an image. In median filtering the value of an output pixel is determined by the median of neighbourhood pixels, rather than the mean values of the pixels.

FIGURE2-FILTERED IMAGE 2.2) GRAYSCAL IMAGING
The computed tomography (CT) images are black and white images in general. When we take these images as input images on computer, computer considers these images as a black and white image. So we apply gray scale imaging to the image. Gray scaled images are not like simple black and white images it provides a combination of black and white or we can say a gray shade instead of providing only two shades black and white. On images gray scale or grey scale is one in which the amount of each pixel is single sample represents the amount of light it contains or we can say that, it carries only the intensity information.

2.3) THRESHOLDING
Image thresholding is a simple way of partitioning an image into a foreground and background. It creates binary images from grey-level ones by turning all pixels below some threshold to zero and all pixels about that threshold to one or apart the dark and lighter area from each other. Let's assume if g(x, y) is a threshold version of f (x, y) at some global threshold 'T' that separates these modes. Then any point (x, y) for which f(x, y) > T is called any object point; otherwise it is back ground point.

3.) IMAGE SEGMENTATION
Image segmentation is an essential process for most image analysis subsequent tasks. In particular, many of the existing techniques for image description and recognition depend highly on the segmentation results Segmentation divides an image into its constituent regions or objects as well as it can detect the edge of the images

3.1) HISTOGRAM EQUALIZATION
Histogram equalization technique is used for the segmentation of the image; it is one of the most effective techniques for segmentation. Histogram equalization of an image shows the pixels intensity values. For example generally it forms a graph in which x-axis shows the gray level intensities and the y-axis shows the frequency of these intensities. In general, a histogram is the estimation of the probability distribution of a particular type of data. An image histogram is a type of histogram which offers a graphical representation of the tonal distribution of the grey values in a digital image.

3.2) THRESHOLD SEGMENTATION
Thresholding is a simplest method of image segmentation. The input to threshold segmentation is generally a gray scale or color image. In this segmentation method the same fixed criteria is applied simultaneously to all the pixels of the image. The pixels are partitioned depending on their intensity value. In this simplest segmentation, the output is a binary image. In which the black pixels represent the background and the white pixels represent the foreground. The histogram equalization technique has an important role for choosing the thresholds. The bars value peaks and valleys of the histogram image or graph help us for choosing the threshold vale.. In our project we are using histogram based threshold selection method. GLOBAL THRESHOLDING:-The global thresholding is the oldest technique, it has been popular technique from many year. In this technique a single threshold value is used for the entire image. It is used for the image where the intensity distribution of objects and background pixels are sufficiently distinct or when the pixels vale of the affected area and the background are fairly consistent in their respective values over the whole image. LOCAL THRESHOLDING:-In local thresholding method the threshold values are depend on gray levels and some local image properties of neighboring pixel mean or variance. This technique is used when the gradient effect is small with respect to the chosen image size and also when the single threshold value will not work because of the uneven illumination due to the shadows or direction of illumination. ADAPTIVE THRESHOLDING:-As we know whenever the background illumination is uneven the global thresholding is not suitable at this condition we can use adaptive thresholding method. The adaptive thresholding method the input is generally taken from the gray scale or color image and after the segmentation the output is a binary image shows the segment.in this method the threshold value is calculated for each pixels value. If the pixels values are less than threshold value then they are set as background otherwise set as a foreground.

3.3) WATERSHED SEGMENTATION
Image segmentation algorithm exists when the objects of same predefined class are in close proximity to one another, for this pixel grouping is necessary to cluster the classified image into objects. It starts with finding and then deciding that which pixels belong to each object. If we imagine bright areas are "high" and dark areas are "low", then it might look like surface, so that it is natural to think that in terms of catchment basins and watershed line which separate the objects from the background or from each other. Watershed segmentation method comes under the edge base segmentation method. The main goal of watershed segmentation algorithm is to find the "watershed lines" in an image in order to separate the distinct regions. In watershed segmentation the image is visualized in three dimensionstwo spatial coordinates and one is intensity. For that lets assume that the pixel values of an image is a 3D topographic chart, where x and y denote the coordinate of plane, and z denotes the pixel value. The steps are involve in watershed segmentation are:-Compute a watershed segmentation function, it reads the colour image and convert it to gray scale, uses the gradient method as the segmentation function, then it marks the foreground and back ground objects, then computes the watershed transform of the segmentation function.

3.4) TEXTURE SEGMENTATION
The texture is most important attribute in many image analysis or computer vision applications. It is a set of metrics calculated in image processing to quantify the texture of an image. Texture of image gives us information the spatial arrangement of colour or selected region of an image. The procedures developed for texture problem can be subdivided into four categories: structural approach, statistical approach, model based approach and filter based approach. Different definitions of texture are described, but more importance is given to filter based methods. Such as Fourier transform, Gabor, Thresholding, Histogram and wavelet transforms. An image texture can be used in segmentation or classification of an image, or to extract boundaries between major texture regions. For more accurate result in segmentation the most useful features are spatial frequency and an average gray level. Texture is a difficult concept to represent. The identification of specific textures in an image is achieved primarily by modelling texture as a two-dimensional gray level variation. The relative brightness of pairs of pixels is computed such that degree of contrast, regularity, coarseness and directionality. There are two main types of texture segmentation that are region based and boundary based texture segmentation.

4.) MORPHOLOGICAL OPERATION
This is the last step for the detection of lung cancer. This stage is an important stage that uses algorithms and techniques to detect and isolate various desired portions or shapes of a given image. It is used to predict the probability of lung cancer presence when the input data to an algorithm is too large to be processed and it is suspected to be notoriously redundant, then the input data will be transformed into a

III. RESULT
This project is based on the processing of computed tomography (CT) images. We also conclude that the lung cancer can be detected in an early stage by using any one of this method and by following all the four steps mentioned above. As we can see the median filter is chosen. According to the outputs of the segmentation step, histogram has higher accuracy and better quality than thresholding approach. After segmentation of image, threshold operation is used to get individual lung and to eliminate unnecessary parts. By doing morphological operations, we get not only the individual lung but also apparent the lung nodule then we extracts the Tumor by comparison. After applying the different segmentation methods, we came to know that the tumor region we get from the watershed segmentation is more accurate and precise from the outputs of the threshold and texture segmentation. Also by applying the various samples we find that the watershed segmentation and texture segmentation are having a more accuracy than the threshold segmentation that is approx. 90.90%, 86% and 84% respectively. The area of the tumor with its pixels value are-5435 pixels for watershed segmentation, 5001 pixels for texture segmentation and 4500pixels for threshold segmentation.so by this result we can conclude that watershed segmentation technique is better than remaining two.

IV. FUTURE SCOPE
We are aiming to get the more accurate results by using various enhancement and segmentation technique, different segmentation strategies and calculations are the root idea of digital image processing the more accurate result will be more helpful and good for the diagnosis solution and the person can have more chances of survival from this dangerous disease and we can do one more thing apart from using different strategies we can use a fusion method of all this techniques or the hybrid methods to get the more accurate result. We can also develop the system as a real time system in future. It means the system will work at the time of diagnosis as well as with the time when we take the computed tomography (CT) images, the advantage of the real time system will be that it helps the person to cure the disease as soon as possible and provides a help for early treatment so the survival chance can be increase. In future by parameter and area calculation of the tumor at the time of detection we can also find that tumor has been in which stage.