I have talk about how to catenate two images whose have same part totally in my this post.
But in this case two images have similar information, not totally same.
img1 = Import @ "https://i.sstatic.net/oc1L8.jpg"
img2 = Import @ "https://i.sstatic.net/GGTBv.jpg"
This is my expected result
If I use ImageAlign
, I just can see the second image. How to catenate the first image?
img3 = ImageAlign[img1, img2];
ImageCompose[img3, {img1, .5}]
I can use ImageCorrespondingPoints
to see the corresponding points
matches = ImageCorrespondingPoints[##] & @@ images;
MapThread[
Show[#1, Graphics[{Red, MapIndexed[Inset[#2[[1]], #1] & , #2]}],
ImageSize -> 400] &, {images, matches}];
dim = ImageDimensions[First[images]];
pos = {First[matches], {First[dim], 0} + # & /@
RescalingTransform[
Transpose[{{0, 0}, ImageDimensions[Last[images]]}],
Transpose[{{0, 0}, ImageDimensions[First[images]]}]][
Last[matches]]};
Show[ImageAssemble[{First[images], ImageResize[Last[images], dim]}],
Epilog -> {Thick,
Riffle[MapThread[Line@*List, pos],
Unevaluated[RandomColor[]], {1, -1, 2}]}, ImageSize -> 500]
But I don't know how to connect them.