At work I had to make a custom image registration pipeline, that uses only 2 degrees of freedom, so just x,y translation. OpenCV did not have anything that did this, but a python library called Kornia does this well.
https://kornia-tutorials.readthedocs.io/en/latest/image_regi...