In view of the existing localization problems of ball-shaped robots, a ball-shaped robot BYQ-6b with stereovision-based localization is proposed. A binocular camera is used to capture real-time image sequences of the environment around the robot. Features are detected, matched between left and right images, and tracked in the image sequences. An egomotion algorithm is adopted to estimate the frame-to-frame incremental motion of the BYQ-6b robot, and finally the robot's global pose is obtained. The ball-shaped robot BYQ-6b are presented in detail about its mechanical structure, its control system and the implementation of the proposed stereovision-based localization. The experimental results demonstrate the feasibility of the proposed system design and the stereovision-based localization.