Microscopy stitching

35 views
Skip to first unread message

lab

unread,
Apr 27, 2009, 3:44:38 PM4/27/09
to PTGui Support
I work in a microscopy lab and am trying to use PTGUI Pro to stitch
multiple photographs of tissue sections taken through a microscope to
create a composite image. While the program is working flawlessly
stitching multiple images horizontally, I am running in to trouble
when I try to stitch two horizontal composites together (vertically)
because they are different sizes. PTGUI tends to stretch the smaller
composite to equal the larger in length. I am sure my wording is a
bit confusing so I will try my best to explain the problem a different
way. If you can imagine the shape of a heart photographed at forty
different locations from left to right and top to bottom ---- this is
about the same situation I am dealing with. While at the widest point
it may take ten photographs to cover the whole area horizontally, as
you progress lower it may take five photographs since the horizontal
distance is decreasing. Is there a way to stop the program from
warping smaller images to fit the larger ones? Also, I have resorted
to creating several horizontal composites because when I open all of
the images (about thirty or forty) the program just makes a mess of
them. I am thinking that if there is a way for controlling this
warping that I am dealing with the solution may make it possible to
make a large composite in one step? Any help would be greatly
appreciated.

Thanks,

Cory

Erik Krause

unread,
Apr 27, 2009, 4:10:50 PM4/27/09
to pt...@googlegroups.com
lab wrote:

> Is there a way to stop the program from
> warping smaller images to fit the larger ones?

I think your problem is not the size of the images but their different
magnification. PTGui always tries to align found control points no
matter how the images are sized. But PTGui assumes same magnification
(Field of view in panorama world), since normally all images for a
panorama are shot with the same lens at the same focus setting.

But PTGui can do different: Allow individual lens parameters for
specific images. To enable this load your images (or previous project
file), switch to Advanced Interface, go to Lens Settings tab and under
"Use individual parameters" check Lens for all but the first image
(double clicking the column header will check/uncheck all).

Then go to Optimizer tab and check FoV for all images. Check Field of
View under "Optimize globally", too.

Since your images don't have a common viewpoint (a common center of
perspective) like for a "normal" panorama, the FoV will likely be
optimized very small. This doesn't matter. Just choose fit panorama in
Pano Editor (Ctrl+E)

--
Erik Krause
http://www.erik-krause.de

michael crane

unread,
Apr 28, 2009, 1:44:33 AM4/28/09
to pt...@googlegroups.com
2009/4/27 lab <cory...@gmail.com>:

>
> I work in a microscopy lab and am trying to use PTGUI Pro to stitch
> multiple photographs of tissue sections taken through a microscope to
> create a composite image.
This is really like making a linear panorama which was discussed here recently.
Have you looked at
http://www.hadleyweb.pwp.blueyonder.co.uk/CZP/News.htm
which people have used in microscopy to focus blend.
you can blend the focus stack first and then stitch them in ptgui.
regards

mick

ozbigben

unread,
Apr 29, 2009, 8:51:28 AM4/29/09
to PTGui Support
I'd set up our EM unit to use PTGui for stitching their montages
together and have also produced high res microscopy images without any
problems. If I read you correctly you're creating single row images
and then trying to stitch them together. If you're manually selecting
control points for stitching the strips together then you need to
specify the fov of each row (from the panorama settings of the row
project files)... but I found it easier to just stitch the entire
image at once e.g. optic nerve at 40x generating 99 images. Auto
alignment sets the fov for all images to that of the first image, so
you have to reset them after control points have been selected (if
that is successful).

Going back a few steps, there are some other things to take into
account.
1: If there is no fov in the source image metadata then PTGui will use
a default value which will be too big for what you want.
2: Technically you're only optimising offset (individual for each
image) but to set these settings in the lens settings tab is a pain.
The other option is to approximate this by using a very small fov for
the images e.g. 0.05°. Still works and the yaw and pitch adjustments
are theoretically similar enough to offset that it doesn't make any
difference.
3: Use a white reference image to avoid the need for any falloff
correction.

From a practical point of view, I found that Photoshop does a good job
as well, as long as each image in the sequence joins the previous one
(this is definitely one advantage of PTGui... the auto alignment is
usually awesome even fo out of sequence images). This may require a
bit of back-tracking when acquiring the images, but the process is
relatively painless. As you get closer to gigapixel proportions
though, it may be more practical to use PTGui as RAM usage is less of
an issue... but to repeat myself, i'd say just do the whole composite
at once.

Ben
(recently departed from the Department of Pathology, The University of
Melbourne)

On Apr 28, 3:44 pm, michael crane <mick.cr...@gmail.com> wrote:
> 2009/4/27 lab <cory.r...@gmail.com>:

lab

unread,
Apr 29, 2009, 10:25:58 AM4/29/09
to PTGui Support
Yes, this makes sense. I knew there had to be a better way. Thank
you

Cory
Reply all
Reply to author
Forward
0 new messages