The X-ray examination can effectively help for the diagnosis and analysis of spinal diseases because it possesses the properties of fast, non-invasive, low radiation dose and low cost. In order to obtain the valuable quantitative information of the spine, the automated computer aided tools are developed. The segmentation of vertebrae is an important step to analyze the disease severity from the spinal X-ray images. Although there were numerous studies for automatic vertebrae segmentation in the literature, the segmentation of vertebrae from the frontal X-ray images is still a challenging topic. In this paper, a hybrid method is proposed to segment the thoracic and lumbar vertebrae from an anteroposterior (AP) full spine X-ray image. We apply image processing techniques to detect the vertebral regions and then use the convolutional neural network (CNN) to segment the vertebrae. The segmentation performance using the proposed method is remarkably high with DSC value of 0.941.