The paper presents a reliable method for the automatic extraction of lung cancer nodules from CT chest images using a weighted Euclidean distance (WED) for classification and connected component labeling (CCL) for lung area extraction. The method shows high performance in distinguishing nodules from healthy lung images, enhancing the efficiency of computer-aided diagnosis systems for lung cancer. This research addresses critical challenges in early detection, emphasizing accurate segmentation and nodule detection to potentially improve patient outcomes.