1. A method, comprising: receiving a first image and a second image from an X-ray imaging device; determining a template window in the first image and a plurality of search windows in the second image; generating a template vector corresponding to the template window and a plurality of search vectors corresponding to the plurality of search windows; calculating a plurality of similarity scores based on the template vector and the plurality of search vectors; determining a matching window from the plurality of search windows based on the plurality of similarity scores; and generating a final image using the first image and the second image based on the template window and the matching window.