Microscopy Image Stitching

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
rtown12
Posts: 1
Joined: 2012-10-21T21:52:53-07:00
Authentication code: 67789

Microscopy Image Stitching

Post by rtown12 »

Hello,

I have a square array of approximately 400 images (200 x 200 images), and I am trying to stitch them together using ImageMagick. The images have a 10% overlap between each one. I simply want the output from two stitched images to be the single stitched image (no background, etc.).

I need help figuring out how to stitch two images together so that there is no space between them, but the overlap is not shown in the stitched images. Any ideas would be greatly appreciated. Thank you.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Microscopy Image Stitching

Post by Bonzo »

I would use a dedicated stiching program like Microsoft ICE or Hugin - both are free.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Microscopy Image Stitching

Post by fmw42 »

You can either composite pairs of image together using -gravity and -geometery to overlap them. see -layers composite or -mosaic

http://www.imagemagick.org/Usage/layers/#layer_examples
http://www.imagemagick.org/Usage/layers/#mosaic
http://www.imagemagick.org/Usage/layers/#merge

You can combine many images with the same overlap using montage with negative geometry offsets. see

http://www.imagemagick.org/Usage/montage/
http://www.imagemagick.org/Usage/montage/#overlap
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: Microscopy Image Stitching

Post by NicolasRobidoux »

nip2 and vips have been used to do this efficiently, e.g. http://www.vips.ecs.soton.ac.uk/vips-7. ... ode26.html.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Microscopy Image Stitching

Post by anthony »

I wrote a simple stitcher for this type of thing (involving slightly overlapping maps) It is raw and kludgy, but I do use it...

http://www.imagemagick.org/Usage/scripts/overlap

It extracts smaller 'sample area' from one image, then tries to find those areas in another image. when I finds a match it outputs a 'merged' image. It will probbaly need adjustments for the sample areas, and match thresholds, but it is a start if you want to DIY it.

Perhaps Fred likes to see if he can improve it :-)
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Microscopy Image Stitching

Post by fmw42 »

rtown12 wrote:Hello,

I have a square array of approximately 400 images (200 x 200 images), and I am trying to stitch them together using ImageMagick. The images have a 10% overlap between each one. I simply want the output from two stitched images to be the single stitched image (no background, etc.).

I need help figuring out how to stitch two images together so that there is no space between them, but the overlap is not shown in the stitched images. Any ideas would be greatly appreciated. Thank you.

It would help if you could proved at least two overlapping images so that we can see what really are doing and need. You can post them to some free image hosting web site and then put a link to them here.
Post Reply