Lung cancer is one of the most difficult and dangerous cancer to cure and the number of deaths due to cancer is increasing day by day. The death rate of patients will be reduced if lung cancer is detected in the early stages. This paper aims at developing a Computer Aided Diagnosis (CAD) system for detection of lung cancer by analyzing the Computed Tomography (CT) images of lungs. The images are collected from the LIDC dataset and enhanced to increase the contrast of images by Median filter. After enhancement morphological segmentation is used to segment lungs region from the CT images. Then segmented images are used to identify and classify the cancerous and noncancerous nodules using the Support Vector Machine (SVM) classifier. The SVM polynomial has given the 96.6% accuracy and SVM quadratic function has given the 92% accuracy.