Stack & stitch experiment with telecentric optics

A forum to ask questions, post setups, and generally discuss anything having to do with photomacrography and photomicroscopy.

Moderators: rjlittlefield, ChrisR, Chris S., Pau

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Stack & stitch experiment with telecentric optics

Post by rjlittlefield »

[Edited to add: This thread is only the first of three closely related threads regarding telecentric optics. The other two are HERE and HERE.]

After recent discussions with George Dingwall about the difficulties of avoiding parallax, I thought it would be interesting to hack together a telecentric lens system and see how it worked out for stacking and stitching.

Here's the test result.

Image

See larger image here (3.3 MB, 6321x4104 pixels, reduced to 70% of original size).

Each tile is a stack, 11.5 mm wide. The deepest stack is over 25 mm deep, and the total subject in-focus depth is 37 mm. To shoot the stacks, the camera was shifted laterally. But when I flash between stacks, there's no visible parallax. It's pretty cool.

Here's the test setup.

Image

The trick to making a telecentric lens system is to put the limiting aperture at a position such that the subject sees the aperture at infinity focus. In concept, this can be done simply by placing the limiting aperture at the rear focal point of whatever lenses are between it and the subject.

In this setup, the front lens is an Olympus 80mm at f/4 and the rear lens is an Olympus 135mm at f/32, primarily playing the role of limiting aperture. The distance between the lenses was set by looking through the front lens and gradually reducing the distance between them until the aperture just came into focus as seen by my eyes (plus their infinity-correcting glasses!). It happens that the mounts and thicknesses of these lenses allows that to happen just before things would smash together.

Telecentric optics have a couple of almost magical properties. The one they're most famous for is that magnification does not depend on subject distance. That makes them very handy for machine vision & gauging applications. The other one is that since their entrance pupil is at infinity, there's no difference between a lateral shift and a rotation around the entrance pupil, which is what's required to get parallax-free stitching. In terms of the stacking software, you just completely turn off auto-adjustment, since the optics arrange for every frame in the stack to stay aligned as you shift focus.

Telecentricity does not come for free, however. The front lens element has to be as large as the subject plus the aperture width, so telecentric lens systems necessarily have a fairly narrow field of view. Still, there are some problems for which this seems like a pretty good solution.

I shall go play some more...

--Rik

Edit: Feb 21, 2015, adding links to subsequent closely related threads.
Last edited by rjlittlefield on Sat Feb 21, 2015 11:47 am, edited 2 times in total.

georgedingwall
Posts: 207
Joined: Tue Aug 01, 2006 11:15 am
Location: Invergordon, Scotland
Contact:

Post by georgedingwall »

Hi Rik,

You made a really great image there. I downloaded the large version, and the detail is astounding in so large an image.

I've never heard of "Telecentric Lens Systems" before, but you have produced wonderfully detailed image from the setup you have put together.

This seems like a cool way to get round the need for rotation about the entrance pupil.

I'm not sure if I have the equipment to set up something like this, but you've moved the goal posts again in what is possible with a little ingenuity and a lot of patience.

Thanks for sharing Rik.

Bye for now.
George Dingwall

Invergordon, Scotland

http://www.georgedingwall.co.uk/

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

George,

For a quick intro to telecentric lenses, I suggest http://www.computeroptics.com/telecentric.html.

> "... and a lot of patience"

Well, you know the old quote about "one per cent inspiration and ninety-nine per cent perspiration." I think the original topic was "genius", but of course, the same words are probably true of digging ditches, or moving goalposts. :lol:

You know, come to think of it, I have vague memories of seeing a picture of goalposts on wheels. That's not a bad idea, looking back at the last few years' progress in photography. :-k :D

--Rik

Carl_Constantine
Posts: 304
Joined: Tue Aug 01, 2006 8:02 am
Location: Victoria, British Columbia, Canada
Contact:

Post by Carl_Constantine »

ok, I'm very jealous. I wish I had the time and equipment to do cool things like this, and all the stacking is wonderful. I'm glad someone hast the time and willingness to share experience and information.

Thanks Rik. You're great! keep up the wonderful work.
Carl B. Constantine

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

Carl, please don't be too jealous. This obsession of mine is a bit of a curse, actually. :lol:

But maybe it helps move the technology along and encourage wider use, and if it does, I'll take that as a good thing.

Thanks for the encouraging words! :D

--Rik

georgedingwall
Posts: 207
Joined: Tue Aug 01, 2006 11:15 am
Location: Invergordon, Scotland
Contact:

Post by georgedingwall »

Hi Rik,
rjlittlefield wrote:George,

For a quick intro to telecentric lenses, I suggest http://www.computeroptics.com/telecentric.html.

--Rik
I've had a look at the site, and I think I understand how telecentric lenses work for an image from a single location. So I can see how that would benefit you when making a stacked image. There would be no variation in size of the object from frame No.1 to the last frame. I can see that would lead to a better stack.

What I'm still struggling a bit with is how this translates to to stitching an array of stacks. I can see that each single stack would have a paralax free result, but how does the stitching software deal with parts of the image which are visible in one stack, but not in another.

Here's a little diagram to illustrate my question.



If this represents the shooting position and angle of view of three stacks of a solid piece of metal with a threaded hole in it, then the stacks at position 1 and 3 see opposite sides of the hole. Position 2 will be looking straight down the hole.

When these stacks are stitched, how will the software deal with the three different views of the hole.

I'm not sure if my example is asking the right question, but I can't see how the stitching software would deal with the apparent paralax that would still be in this example.

Any help in clarifying this would be appreciated. My head is beginning to hurt. :smt017

Bye for now.
Last edited by georgedingwall on Mon Jul 26, 2010 6:38 am, edited 1 time in total.
George Dingwall

Invergordon, Scotland

http://www.georgedingwall.co.uk/

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

George,

I have just a moment here -- would like to provide a diagram but don't have time to work one up. Maybe words will do.

Your diagram is not correct for telecentric optics. With telecentric optics, the view does not fan out from each lens position, it just beams straight forward. That's why the front lens element has to be at least as large as the subject diameter + aperture diameter.

Think of a searchlight, say 1 meter diameter, with a vanishingly small divergence angle. Now think of incrementally illuminating a volume wider than the searchlight, by shining the searchlight straight forward from several positions. To fully illuminate the volume, the positions of the searchlight have to overlap each other. Neighboring searchlight positions cannot be more than 1 meter apart.

It is the same with telecentric optics.

In your diagram, if the blue boxes represent telecentric optics, then to fully view the block containing the hole, you need about 4 new blue boxes -- at positions 0.5, 1.5, 2.5, and 3.5 versus your current positions 1, 2, and 3.

Then the left side of the hole will be (barely) seen by the right side of the lens in position 1.5, and by the left side of the lens in position 2, and in both cases whichever part of the lens sees the side of the hole will see it looking straight forward.

Hope this helps. If it's still confusing, let me know, and I'll sketch it up tonight.

--Rik

georgedingwall
Posts: 207
Joined: Tue Aug 01, 2006 11:15 am
Location: Invergordon, Scotland
Contact:

Post by georgedingwall »

Hi Rik,

If I understand you correctly, the telecentric lens only sees light that runs parallel to the axis of the lens.

In that case none of the stacks would see an oblique view of what the next stack was seeing, therefore the stitching program would not have to cope with the same object in two adjacent stacks having a different paralax.

Very cunning. I've got to work out a way for me to try this.

Bue for now.
George Dingwall

Invergordon, Scotland

http://www.georgedingwall.co.uk/

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

George,

> "only sees light that runs parallel to the axis of the lens"

That's essentially correct. The details are a bit more subtle (or your next question should be "how come diffraction doesn't kill all your sharpness?"). But what you say is close enough to capture the most important features.

I've been playing with a different setup that you might find easier to duplicate. Basically I converted an old enlarging lens into an iris diaphragm by removing all its glass. Using that diaphragm instead of the second lens seems to work just fine, and there's less to go wrong. I'll try to post out some pictures tonight.

--Rik

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

George,

Here are some photos of the setup with one lens, one added iris.

Top view.
Image

Front bellows opened, looking toward the added iris (indicated by red line).
Image

Now here's maybe the most important point...

Front view, from 7 different positions stepping left-to-right in front of the lens.
Image

In this front view, the bright spot is the added iris, as seen through the lens. Notice that the iris appears to be at infinity, or at least a long distance away. There are two indications of this. 1) The iris is in sharp focus at the same time as the wall (which is several feet away). 2) The iris does not appear to shift, with respect to the background wall, as the viewing position moves across the front of the lens.

In the sequence of front view photos, the first and last images come from being so far off-axis that the image is completely cut off -- no light gets through the lens and the iris. The second and sixth images illustrate vignetting. This is bad because a) the image darkens because of the smaller effective aperture, and b) the lens is not telecentric in this area -- moving it forward and backwards will change the amount of vignetting, which moves the centroid of the effective aperture left and right. (The geometry gets very weird. This region will hurt your head for sure.)

The center three frames illustrate the widest field that is fully telecentric. That's the area where the subject can see the entire added iris, apparently at infinity, through the front of the lens.

It's probably clear that you can make the telecentric field somewhat wider by making the iris smaller. But there's the usual tradeoff -- as you shrink that iris, you reduce the effective aperture of the lens, and after a short while diffraction starts to kill your sharpness.

What you want is the widest setting of the added iris that lets the system be fully telecentric over the entire field that you care about. Assuming you're doing this to stitch, then the "field that you care about" is from the middle of the overlap region on one side, to the middle of the overlap region on the other side.

Another way to decide how far you have to stop down the iris is to mask off an area the size of your camera's sensor, in the middle of the bellows where the sensor will be. Looking through that area, gradually shrink the iris until the aperture is bounded by the added iris -- not the one in the lens -- at all positions you can see through the mask.

Hope this is helpful. If you get any results, I'd be interested to see them.

--Rik

PS (edit): This whole scheme works best with a lens that's adequately sharp wide open, since that gives the widest telecentric field. If you need to stop down the lens itself, then you'll need to make the added iris smaller, and the telecentric field will get smaller in proportion.

Charles Krebs
Posts: 5865
Joined: Tue Aug 01, 2006 8:02 pm
Location: Issaquah, WA USA
Contact:

Post by Charles Krebs »

Awww.... Rik!

Just got back from a trip to Ohio, and I am all jammed up with things to do!
The last thing I need now is another unusual techy concept to monopolize my attention :wink:

But I guess I can unpack my bags in a day or two!

.... come to think of it, I have adapters I use to mount my "macro" and enlarging lenses in front of large format #1 and #3 shutters. All I need to do is add the correct amount of extension... :-k

Perl
Posts: 294
Joined: Tue Oct 03, 2006 11:43 pm
Location: Sweden

Wonder about Program

Post by Perl »

Hi

Wonder if anybody has any idea
on what program to use when stiching
parts of picture in to a big one where
you can zoom in parts ?

Best Regards
Pär Lundqvist
Sweden

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

For stitching, I use PTGui -- http://www.ptgui.com/ . It is industrial-strength for panorama stitching, easy to install and very reliable. The freeware equivalent is hugin (http://hugin.sourceforge.net/), which works OK but is less reliable and more fiddly.

If you want zoomable display through a browser, then there are several options, none ideal. Zoomify has been around a long time and works with standard browsers -- http://www.zoomify.com/ .

The most expertise on this topic can be found in the PanoToolsNG group, http://tech.groups.yahoo.com/group/PanoToolsNG/ . They call it "flat stitching" to distinguish from the usual spherical case where you rotate the camera.

--Rik
Last edited by rjlittlefield on Tue Dec 25, 2007 12:40 pm, edited 1 time in total.

Perl
Posts: 294
Joined: Tue Oct 03, 2006 11:43 pm
Location: Sweden

Stiching Program

Post by Perl »

Hi Rik !

Many Thanks

Best Regards
Pär Lundqvist
Sweden

Post Reply Previous topicNext topic