Stitching scanned overlapping images

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
FlyingJenny2bucks
Posts: 22
Joined: 2015-03-01T19:40:59-07:00
Authentication code: 6789

Stitching scanned overlapping images

Post by FlyingJenny2bucks »

Hi, I have scanned 4 parts of a large map and wanted to stitch them into a seamless image. All 4 parts have overlapping regions but since they are scanned, they won't overlap 100% (more like 95%). Does imagemagick (6.9.0 - Q16 64bit) support this function?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Stitching scanned overlapping images

Post by fmw42 »

There is no one function that will do that. You may be able to pick control points on each image and then do +distort affine and -layers merge to combine them.

Please also always provide your platform as syntax may differ.
FlyingJenny2bucks
Posts: 22
Joined: 2015-03-01T19:40:59-07:00
Authentication code: 6789

Re: Stitching scanned overlapping images

Post by FlyingJenny2bucks »

I have cygwin installed so I can use both bash and dos scripts.

I tried using to Mr. Anthony's overlap script mentioned here:
viewtopic.php?f=1&t=25843

but it keeps displaying the error: "unable to open image tmp/.....entropy.miff..."

I was hoping for something similar to photomerge in photoshop where I could ultimately customise the scripts for batches.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Stitching scanned overlapping images

Post by Bonzo »

I would look at some specialised software Hugin may be the best for you although it can be a bit confusing to use at the start.
FlyingJenny2bucks
Posts: 22
Joined: 2015-03-01T19:40:59-07:00
Authentication code: 6789

Re: Stitching scanned overlapping images

Post by FlyingJenny2bucks »

Just installed. You are right, it is confusing. My initial image looks fish-eyed XD.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Stitching scanned overlapping images

Post by Bonzo »

I tried it years ago and it installed about 15 files all over my computer; even the desktop. I believe the install is better now but it has so many options. I tend to use Microsoft ICE but I am not sure if you could use that in batch mode.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Stitching scanned overlapping images

Post by snibgo »

You have scanned a large map in four parts, and want to stitch them together? Then you need to apply only translation and rotation, not scale.

If this is a one-off job and you don't mind 8-bit output, I'd use Gimp. If you want 16-bit output, I'd use Gimp and not down the translations and rotations, and repeat the job in IM.

I have IM BAT scripts in my pages that would (probably) find the required translations and rotations.

Throwing the images at ICE would be the easiest way. Hugin is far more powerful and flexible, but takes more time to learn.
snibgo's IM pages: im.snibgo.com
FlyingJenny2bucks
Posts: 22
Joined: 2015-03-01T19:40:59-07:00
Authentication code: 6789

Re: Stitching scanned overlapping images

Post by FlyingJenny2bucks »

Got Hugin to work pretty well now. Compared to imagemagick it is much easier to learn xD. Next step is pooling the libraries into cygwin and make everything command line based.
Post Reply