Robust and precise vehicle detection is the prerequisite for decision-making and motion planning in autonomous driving. Vehicle detection algorithms follow three steps: ground segmentation, obstacle clustering and bounding box fitting. The ground segmentation result directly affects the input of the subsequent obstacle clustering algorithms. Aiming at the problems of over-segmentation and under-segmentation in traditional ground segmentation algorithms, a ground segmentation algorithm based on Gaussian process is proposed in this paper. To ensure accurate search of real ground candidate points as training data for Gaussian process, the proposed algorithm introduces the height and slope criteria, which is more reasonable than the use of fixed height threshold for searching. After that, a sparse covariance function is introduced as the kernel function for calculation in Gaussian process. This function is more suitable for ground segmentation situation the radial basis function (RBF). The proposed algorithm is tested on our autonomous driving experimental platform and the public autonomous driving dataset KITTI, compared with the most used RANSAC algorithm and ray ground filter algorithm. Experiment results show that the proposed algorithm can avoid obvious over-segmentation and under-segmentation. In addition, compared with the RBF, the introduction of the sparse covariance function also reduces the computation time by 37.26%.