A pretreatment algorithm of image-based virtual reality is suggested to speed up the rate of image stitching in this paper. The algorithm first grays the image, the grayscale image is projected and then pretreatment algorithm is used to match the image roughly. It is proved via the examples that the algorithm can effectually pre-orientate the image, reduce the range of search in the image stitching, and speed up the rate of image stitching.