An improved loop closure detection algorithm based on constraint of space position uncertainty is proposed for the loop closure detection problem in visual simultaneous localization and mapping (VSLAM) of mobile robots in perceptual aliasing scene. First of all, a new distance function is put forward for ICP (iterative closest point) algorithm to cover the shortages of Euclid distance and Mahalanobis distance in point cloud registration. Then a cumulative error model of visual odometry is established based on the space position uncertainty of feature points, and the error is decreased by Kalman filter. Next, a space range constraint for loop closure detection is given by the cumulative error model of visual odometry. Finally, the cumulative error is corrected according to the results of loop closure detection, thus the range of loop closure detection is reduced. On one hand, the improved loop closure detection algorithm proposed is of better real-time performance as a result of the range limit in loop closure detection. On the other hand, the precision ratio of loop closure detection is enhanced because most perceptual aliasing scenes are eliminated by the spatial limit. Both of the contrast experiments based on the datasets and the actual scene show that, in perceptual aliasing scenes, the improved loop closure detection algorithm proposed has a better precision ratio in a condition of high recall when compared with IAB-MAP, FAB-MAP and RTAB-MAP, and has a good real-time performance as well. In a complicated scene indoors, it also obtains good real-time performance and high accuracy.