The goal of image enhancement methods is to improve image's quality. The efficacy of U‐net is evident through its extensive utilization across various significant image modalities, involving computed tomography (CT) scans, magnetic resonance imaging, X‐rays, and microscopy. In this study, we provided a novel and efficient strategy to improve lung CT images based on segmentation using U‐Net architecture. Subsequently, contrast enhancement was performed using adaptive histogram equalization and dark channel prior methods. Finally, the lightness of the lung CT image was enhanced using nonlinear mapping. The contrast enhancement performance of the suggested method is quantified by various measures like the average gradient, mean of the local standard deviation, contrast enhancement measure, and structural similarity index. The performance of the suggested method is compared against other methods, and the results indicate that the suggested method achieves better quality measures of 23.4907, 55.20341, 0.961674, and 0.4143 for the four performance metrics.