In vehicle image segmentation, the traditional graph cut algorithm often have errors, when the original image contains shadows or complex background. To overcome the errors, this paper introduces the shape prior to graph cut algorithm. Our algorithm firstly maps the vehicle image to a weighted undirected graph, and obtains the regional energy and boundary energy functions. Then, the shape prior was added to constrain the image segmentation, and create a new energy function. The star convex was selected as the shape prior, and manually marked. Experimental results show that our algorithm segmented complex background vehicle images, shadowed vehicle images, and incomplete vehicle images more effectively than Otsu's method and graph cut algorithm. The details of vehicles were preserved and extracted efficiently by our algorithm. The research results provide new insights into vehicle image segmentation.