Pointing accuracy is an important indicator for electro-optical detection systems, as it significantly affects the system performance. However, as a result of misalignment, nonperpendicularity in the manufacturing and assembly processes, as well as the sensor errors such as camera distortion and angular sensor error, the pointing accuracy is significantly affected. These errors should be compensated before using the system. Parametric models are firstly proposed to compensate for the errors, whilst the semi-parametric models with the nonlinearity added are also put forward. Both methods should analyse the parametric part first, which is a complicated and inaccurate process. This paper presents a nonparametric model, without any prior information about mechanical dimensions, etc. It depends only on the test data. Gaussian Process regression is used to represent the relationship between data and predict the compensated output. The test results have shown that the regression variances have decreased by more than an order of magnitude, and the means have also been significantly reduced, with the pointing error well improved. The nonparametric model based on Gaussian Process is thus demonstrated to be an effective and powerful tool for the pointing error compensation.