I'm trying to align and stitch together these images to form a mosaic:
It's a similar problem as this one:
How to keep the non-overlapping parts when aligning images?
However, (and I may not have properly understood that answer) I haven't been able to get that approach to work with these images. I want to get image 1 and all of a transformed image 2 nicely overlaid.
So to design a simpler test case, I created two images like this:
This is the result I'm trying to achieve (done here manually, with image borders added to highlight that the two images are whole but superimposed):
So I tried find the geometric transform, and then applying it:
i23 has the correct rotation and translation to nicely overlay i21, but how do I achieve the final overlaying of the images to get the desired result?
FindGeometricTransform
works directly if the images are rotated -90 degrees .... so there's something in there I'd venture that specifies/limits the way matches are found/evaluated. I don't do much (if any) such image work, so can't offer much more, but perhaps that will spur ideas. $\endgroup$FindGeometricTransform
is finding the right transform ofi20
to match it up withi21
, andImageTransformation
is applying it properly toi20
to yieldi23
, but I don't know how to superimpose the transformed imagei23
over the top of imagei21
to yield the desired result shown manually stitched above. $\endgroup$