Page 1 of 1

Align two scanned pages

Posted: 2011-01-19T17:32:18-07:00
by LongDog
Hi,
I am trying to join up a number of (30,000 or so) scanned pages (left and right) to present one image of an open book. Sounds quite straightforward I suppose, but every step forward seems to be two steps back...
A bit of info...each page has a black background and there is some overlap between each image - both left and right show the centre 'spine' of the book and first 100 pixels or so of the opposite page.
Running this
montage null: in1.jpg in2.jpg null: -tile x1 -geometry -100+10 out.jpg
gets me great results for 60% of the images that are naturally horizontally aligned but it is not sophisticated enough to deal with the cases that are not.
Is there any way that I can force the statement to align the images at the join point so that top-right (corner of the page) join point of left page (in1.jpg) and top-left join point of right page (in2.jpg) are horizontally level as they merge?
I am out of my depth and have been working on this / hunting for code for about 48 hours now, any help and advice will be much appreciated!
Thanks
LD

Re: Align two scanned pages

Posted: 2011-01-19T18:51:07-07:00
by anthony
An example image (resize it smaller for discussion purposes) would be useful.

Re: Align two scanned pages

Posted: 2011-01-19T18:54:16-07:00
by fmw42
The compare function in IM will allow you to align a smaller image to where it best fits in a larger image. But there can be no rotation or other scale or perspective distortion. It won't actually do the aligning, only tell you the best match location. Not sure this will help much.

The better solution is to look for commercial software that is used to convert overlapping images into panoramas. But they wont work well if the images or rotated or scale or perspective either.

IM has a polygon distortion, but it requires manually locating many corresponding control points on both images