Segmentation of images has become an important and effective tool for many technological applications like lungs segmentation from CT scan images, medical imaging and many other post-processing techniques. Lung cancer is one of the leading causes of death in the world. In this paper, a fully automatic un-supervised strategy has been developed for the segmentation of lungs. No prior assumption is made about features, types, contents, stochastic models, etc. of the images. A fuzzy histogram based image filtering technique has been used to remove the noise, which preserves the image detail.; for low as well as highly corrupted images. The proposed technique finds out optimal and dynamic threshold by using genetic algorithms. For edge detection, we have used morphological operators. The proposed system is capable to perform fully automatic segmentation of CT scanned lung images. It can be used as a fundamental building block for 2 computer aided diagnosis systems. We have tested our technique against the datasets of different patients received from Aga Khan Medical University, Pakistan.