It is of great significance to digitize ancient paintings and calligraphy. A typical way to acquire them is photographing the painting block by block and then stitching the photos together. Currently, all the algorithms to register photos are based on affine transformation parameters estimation. But these kinds of solutions have great error when the painting is rugged and scanned at high definition. A ruggedness of only 5 millimeters and 300 PPI scanning will cause the stitching error of 17 pixels for the adjacent photos. In this paper, first, the correctness of affine transformation of corresponding point on photos of a planar object is proved. Then, for non-planar object, the error equation is conducted. After that, an algorithm to correct the error due to perspective projection is proposed. The key to correction algorithm is to compute the difference between the perspective projection and parallel projection. With it, a virtual photo of infinite focal length is generated and the error is eliminated.