To improve the precision of image registration based on corner detection, a relative position function between multiple points to determine matching points accurately. First the corners in images are detected using Harris detector, and clustering method is used to eliminate most wrong matches after coarse screening. Then the proposed relative position function is used as a criterion of precise matching. Finally the image registration process is accomplished by affine transformation. Results show that the proposed algorithm is more effective and accurate than conventional registration algorithm.