Simple image stitching (C++)
I'm having a hard time finding a tutorial that explains how to do image stitching. I've read https://ramsrigoutham.com/2012/11/22/..., but it's only a code example, and not an actual tutorial.
Are there any good tutorials in C++ that would explain how image stitching?
What I'm trying to do is stitch images that are created on a computer (eg. screenshots), which will be consistently the same orientation, resolution, angle, etc. The only thing that differs is the offset, which isn't consistent.
How do I go about stitching these images so that they are matched pixel-perfect?
Do you know the offset exactly, or do you need to find it?
My program would know the general direction of the offset, but not the amount. It could also be offset by both x and y. Each image might be at a different x/y offset.
Do the screenshots overlap?
Yes, they always do.
Ok, if there's no depth involved, it's a flat image that you're seeing different parts of, then you should probably use Phase Correlation to find the shift between images. Then just copy to the appropriate location, perhaps with getRectSubPixel if you have subpixel shifts.
Alternatively, use feature descriptors like ORB, use the matches to find an affine transform and only use the translation.
Phase Correlate is probably faster, but there's more tutorials for feature points.
I thing than need delete warping part code.