I have images of same scene focused at different distances. I want to align the images such that every feature is in exactly same position in every image. How can i do this
The basic idea is to in-plane rotate the images and its 2D translation in X and Y directions to based on their matched feature points.
Check out Image Alignment Algorithms where you can find two approaches to do this using OpenCV (with code).