In this code, we have used 3 sub images which have been displaced in X-direction only. Here we have used correlation method in order to find the largest similarity between a patch of rows x 5columns dimension of second image with a series of patches of rows x 5columns dimension from the first sub image. The point giving maximum similarity is saved as index. The second image is then registered & stitched from there over the fist one. Once an image is formed from the above process, the same method is used to stitch the newly stitched image & the third image to form a final stitched image.
Paresh Kamble (2020). Basic Three Image Stitching Code (https://www.mathworks.com/matlabcentral/fileexchange/44247-basic-three-image-stitching-code), MATLAB Central File Exchange. Retrieved .
@ Joshua Cucufate, if you want to implement the same thing in Y-direction then exchanging the rows and columns should help. Though, it may also need some minor changes here and there.
How would I use this same code but in the Y direction?
Great work. Kindly can I find the theoretical notes of this implementation for better understanding.
Amir how did it work with you without telling you that there is an index out of bounds exception?
It works great.
I'm kind of new to matlab could you please advise how would you do it for a whole folder of jpgs ?
As i have been taking photos from the top of the building, this woulding work perfectly as it's only work for images that have been displaced in X-direction only. Thanks anyway and keep up the hard work!
Inspired by: Image Stitching using correlation