The invention provides a corridor vanishing point rapid detection algorithm based on a K-means method. The method is characterized by carrying out earlier stage processing comprising down-sampling, gray processing, histogram equalization and Canny edge detection after obtaining image data returned by a robot in real time; carrying out line extraction on the image obtained in the previous step by utilizing a probability Hough transformation algorithm; and finally, classifying the detected lines into four kinds by utilizing the K-means algorithm according to the slope, calculating the mean value of the midpoints of each cluster of lines, then, establishing four lines to replace the lines detected in the previous step by utilizing the slope obtained by cluster and the midpoint mean values, dividing the four lines into two groups randomly, calculating the intersection point respectively, and taking the midpoint of the intersection point as a vanishing point. The method can rapidly detect the position of the vanishing point, and then, the heading direction of the robot is corrected by utilizing the vanishing point, so that the navigation of the robot can be realized. Compared with the conventional vanishing point detection method, the vanishing point rapid detection algorithm in the invention has the advantages of being simple and efficient, good in real-time performance and high in stability.