In this thesis, the vision-based Simultaneous Localization and Mapping (SLAM) be established, and provided for the robot to do self-localization and build up the environmental map. This research is divided into two parts, including the design of the vision-based EKF-SLAM and the gait planning of the humanoid robot. The developed SLAM system be applied to a small-size humanoid robot system with frontal camera.