In order to solve the problem that oversize vehicles are difficult to be positioned and directed when they load and unload cargos, a real-time positioning and direction method based on computer vision is presented in this paper. With the help of index strip, Hough Transform is applied to detect lines and its direction. Then, numeral recognition is introduced to compute vehicle's rough moving distance. After that, the system will accurate position the distance by using length and number information of pixel of image. Finally, the result will report in image and digital format. The experimental results demonstrate the method's accuracy and real-time performance.