After feature extraction, the feature matching stage finds “similar” pairs from two sets of feature points,in terms of their descriptors. The spatial image transformation, which maps the input image to the template images, is inferred from two sets of coherent feature points using RANSAC. The speed and success rate of RANSAC also improve by using selected features based on region categorization.