Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Join the two images

I am quite new to OpenCV and DIP in general so I need bit of help in stitching of two images. The problem background is, there are two pieces which have their adhesives/glue torn apart from two joined pieces of plastic. This is the image of "glue" on the base:

img1

and this is the image of "glue" on the other attached face:

img2

As the background of the the images is not the same, I read that it's not possible to do stitching (because different features). And these two pieces are like jigsaw pieces which needs to rotated, so the problem is not straightforward like panaroma stitching.

How do I join such images together?

I was thinking of finding the white color countours and then keeping one image fixed, rotating the other one and finding area of merged countours, also storing the angle of what I rotate. The area would become smallest when there would be perfect match.

like image 578
Pranav Arora Avatar asked May 23 '19 02:05

Pranav Arora


People also ask

What is two images together called?

Photomontage is the process and the result of making a composite photograph by cutting, gluing, rearranging and overlapping two or more photographs into a new image. Sometimes the resulting composite image is photographed so that the final image may appear as a seamless physical print.


1 Answers

This is not a complete answer, (no-one said answers have to be complete), but it may inspire you or someone else to work out a method.

I flipped vertically and flopped horizontally one of your images and then put them both into Photoshop on two separate layers. I then set the "Blending Mode" to Difference which is always a great way to align images - because they normally go black when images are aligned and there is no difference.

I then moved one layer around on the other. I guess you will need to do something similar to solve your problem - you just need to find something that your code can maximise or minimise.

enter image description here

like image 90
Mark Setchell Avatar answered Oct 20 '22 13:10

Mark Setchell