I have a video that is a panoramic video of a static scene. Just to be clear, I am not talking about a spherical 360° degree video but a video that starts in some direction and then does a full 360 horizontal tour either clock or counterclock wise (direction is known). The video then cuts approximately off when a complete tour is completed (~10° error). The video is most likely between 10 to 20 seconds long. I would like to modify the beginning and end of the video of in such a way that if I play the video in a loop the user has the impression he sees a never ending video (end and beginning should have a seamless transition). The main problem is that beginning and end might be slightly vertically shifted and tilted with respect to one another. Otherwise I would only need to find a frame that matches.
My question is therefore I do best solve this problem. Should I look into image stitching or are there more specific algorithms for this type of video stitching. When I search for video stitching I mostly come across 360° video stitching. Pointers to the appropriate literature are also very welcome.
EDIT: You might be wondering why I don't just create a panorama picture as the scene is static. I want to take advantage of the camera that adapts to the lightning changes.