Accurately segmenting lungs from CT images is a fundamental step for quantitative analysis of lung diseases. However, it is still a challenging task because of some interferential factors, such as juxta-pleural nodules, pulmonary inflammation, as well as individual anatomical varieties. In this study, with the combination of a superpixel approach and a hybrid model composed of convolutional neural network and random forest (CNN-RF), the authors propose a novel algorithm to segment lungs from CT images in an automatic and accurate fashion. The authors' lung segmentation covers three main stages: image preprocessing, lung segmenting and segmentation refining. A lung CT image denoised with a fractional-order grey similarity approach is first segmented to a set of superpixels, and the CNN-RF model is then employed to classify the superpixels and identify lungs from the CT image. The segmentation result is further refined by separating the left and right lungs, eliminating trachea, and correcting lung contours. Experiments show that their algorithm can generate more accurate lung segmentation results with 94.98% Jaccard's index and 97.99% Dice similarity coefficient, compared with ground truths, and it achieved better results compared with several feature-based machine learning techniques and current methods on lung segmentation.