2.3.1. Image Local Infilling for Terrain with Obstacles

Information on terrain with obstacles collected by Kinect is used as input data for the terrain classifier. It was found that large-volume obstacles cause low accuracy of final identification, because acquired features of terrain information are severely affected, since SURF-BRISK and SURF have the same points of interest. The distributions of points in different terrains with and without obstacles are shown in Figure 6. The obstacles greatly influence local feature extraction. In order to improve the accuracy of recognizing terrain with obstacles, a method of image local infilling (ILI) is presented. The errors for terrain with obstacles in the first round of recognition are shown in Table 2.

**Figure 6.** Distributions of feature points in terrain with and without obstacles.

The obstacle area of pixel matrix *I*(*m*, *n*) is obtained using the obstacle detection method, as are the central pixel coordinates (*u*, *v*). Here, three infilling examples are illustrated for comparison. The obstacle area with a pixel value of *I* = 255 is presented as a white area in Figure 7b. The obstacle area with a pixel value of *I* = 0 is presented as a black area in Figure 7c. The obstacle area spliced by the no-obstacle sides of the background terrain image is presented in Figure 7d. Due to the use of both left and right sides of the terrain image for infilling, it only needs to compare the abscissa *u* of the obstacle area center and the abscissa *uc* of the color image center. At the same time, according to the dimensions of *I*(*m*, *n*), the size and orientation of obstacles are determined. If the width of the obstacle area, i.e., the number *n* of matrix *I*(*m*, *n*), is too large, the image needs to be processed by multiple infilling. The classification and statistical results of the terrain classifier after ILI are also shown in Table 2. The first two methods do not improve the accuracy of image recognition, since white and black features do not contribute to the main feature points. However, the background terrain–based image infilling shows satisfactory results.

**Table 2.** Classification results of first round and after image local infilling (ILI).

**Figure 7.** ILI samples: (**a**) image sample; (**b**) local white; (**c**) local black; (**d**) local terrain.
