**Yaguang Zhu \*, Chaoyu Jia, Chao Ma and Qiong Liu**

Key Laboratory of Road Construction Technology and Equipment of MOE, Chang'an University, Xi'an 710064, China; jiachaoyu@chd.edu.cn (C.J.); machao@chd.edu.cn (C.M.); liuqiong@chd.edu.cn (Q.L.)

**\*** Correspondence: zhuyaguang@chd.edu.cn; Tel.: +86-187-9285-2585

Received: 19 March 2019; Accepted: 25 April 2019; Published: 29 April 2019

**Abstract:** In this study, we propose adaptive locomotion for an autonomous multilegged walking robot, an image infilling method for terrain classification based on a combination of speeded up robust features, and binary robust invariant scalable keypoints (SURF-BRISK). The terrain classifier is based on the bag-of-words (BoW) model and SURF-BRISK, both of which are fast and accurate. The image infilling method is used for identifying terrain with obstacles and mixed terrain; their features are magnified to help with recognition of different complex terrains. Local image infilling is used to improve low accuracy caused by obstacles and super-pixel image infilling is employed for mixed terrain. A series of experiments including classification of terrain with obstacles and mixed terrain were conducted and the obtained results show that the proposed method can accurately identify all terrain types and achieve adaptive locomotion.

**Keywords:** terrain classification; image infilling method; multilegged robot
