Question

Is it somehow possible to merge two images captured by searching for identical features in OpenCV in both images? My images will always contain sheets of papers which are too big to be captured in one single frame thus I need to take two or more frames - the images are captured so that there is some overlapping area, see:

Top picture: http://i.imgur.com/0tvGVKG.jpg

Bottom picture: http://i.imgur.com/nmlO4gL.jpg

IDEA: Restrict features to only move up/down and not to the right etc.. Even more so, the length of all vectors between two identical features in both images has to be more or less identical, as the area is overlapping. OpenCV also only has to look at the very bottom of picture one and at the very top of picture two for overlapping features. All the other areas are NOT of interest...

Edit: Okay I found some sources about this finally with some good links in the answers: how to find overlapping region between images in opencv?

Was it helpful?

Solution

Yes the linked question you have posted is the way to go. Local features might not work very well for your case (sheet of paper), if it doesn't maybe you should do a kind of row scanner where you compare a few rows from one image to rows of the other image until the row comparison has a similarity above some threshold. Basically finding where the images should intersect.

For Java image stitching you might check this OpenCV alternative: BoofCV

Or this dedicated stitching library: Hugin

At worst case you can check how they do the stitching and code yourself a simpler version.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top