Telecentric optics on the edge

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:

Telecentric optics on the edge

Post by rjlittlefield »

In previous posts I’ve written about the basics of telecentric optics: how telecentricity depends on the aperture position, how to set up and adjust telecentric systems, and how to measure telecentricity using the scale portion of the alignment process in Zerene Stacker.

In this thread, I want to pull together and fill in some of the finer details that have been discussed in recent months.

Here are the major points I want to make:
  • Limits to telecentricity
    • Many setups are completely telecentric only in some central part of the image field, then become progressively less telecentric toward the edges and corners.
    • The completely telecentric part of the field is also the part where there is no vignetting.
    • The diameter of this part can be estimated from lens diameter and working f-number. A smaller aperture (larger f-number) will produce a larger telecentric field, up to a limit that is imposed by lens diameter.
  • Limits to measurement
    • The alignment algorithm in Zerene Stacker can measure scale changes of a few parts per million in careful tests. Details about this aspect are provided in a separate thread, "On the sensitivity of Zerene Stacker scale measurements".
    • At such high precision, confounding effects such as sensor heating can mimic or mask small levels of non-telecentricity. This is also covered in the sensitivity thread.
    • To get an accurate measurement of telecentricity, you have to crop away any vignetted portions of the image. Otherwise the measurement will be corrupted by averaging across telecentric and non-telecentric parts of the field.
Now let’s look at some details and examples.

First, to briefly recap basic aspects…

You make optics telecentric on the object side by positioning the limiting aperture so that it appears to be at infinity, as viewed through the refracting elements in front of it. This can be done either by adding an aperture behind an existing lens or by adding a lens in front of an existing aperture. Either way, the effect is to select the light rays that form the image such that the “chief rays” (the central rays of each bundle) are all oriented parallel to the optical axis, on the object side of the lens. Since those chief rays also pass through the center of the physical aperture, this also means that the aperture is at the focal point of whatever refracting elements are in front of it, and that’s why the aperture appears to be at infinity when you look through the front of the optics.

Consider the following diagrams, which show only the chief rays.

Setup 1. Here is a theoretical thin lens with aperture at lens. This is not at all telecentric.

Image


Setup 2. By moving the aperture backward, we can reduce the angles and move the lens toward telecentric. Note that moving the aperture changes the angles of the rays, but does not change the magnification or distances from lens to subject and sensor.

Image


Setup 3. Here we have made the optics telecentric by moving aperture backward to the right place:

Image


Setup 4. Alternatively, we can make the optics telecentric by adding another carefully selected lens in front of setup 2. Note that this reduces the effective focal length of the optics, so we also must reduce the lens-to-subject and lens-to-sensor distances in order to maintain the same magnification.
Image




OK, so that’s the basic idea behind telecentricity: make the chief rays be parallel to the optical axis by positioning the limiting aperture at the focal point of all the refracting elements in front of it.

However, there’s a catch. The above diagrams implicitly assume that the chief rays all pass through the center of the nominal aperture. That assumption is valid as long as each bundle of rays completely fills the nominal aperture. But beyond a certain distance away from the optical axis, the outer side of the ray bundles will start to be cut off by the edge of the lens, not by the edge of the nominal aperture. When that happens, the nominal aperture is not completely filled with light, the chief ray does not pass through the center of the nominal aperture, and as a result, the optics are no longer telecentric for that point in the subject field.

Here's the way I diagrammed that situation at http://www.photomacrography.net/forum/v ... 337#238337 :

Image


You can estimate the maximum telecentric field by simply subtracting the cone diameter from the lens diameter. Outside the resulting circle, the optics must vignette, resulting in some darkening and loss of telecentricity.

Perhaps a direct illustration of the effect will help to nail it down.

For the following demo, I’ve configured a telecentric system that consists of an Olympus 135 mm f/4.5 bellows macro lens, reversed in front of a Canon 100 mm f/2.8 L IS USM lens. This combo, with the adapters that I’ve used, becomes telecentric when the Canon 100 mm is focused just a little short of infinity, giving a combined magnification 0.804X.

Image

Based on lens and aperture dimensions, I’ve calculated the maximum telecentric field to be about 19.8 mm in diameter.

Here is an image of the full frame. Green circle marks the edge of the telecentric field; red outline marks the area I'm going to animate below. You can see obvious vignetting in the corners.

Image


Now I’m going to zoom in on the corner, and show an animation of two frames that are slightly in front and behind perfect focus (about 0.7 mm).

Image


If the lens were telecentric completely across the field, clear into the corners, then none of the dots on the target would move. But what actually happens, because of the vignetting, is that the field is not telecentric outside the green circle. For these points, image scale changes as focus changes, so in the front/back animation, the dots outside the green circle move radially.

The central portion of this image field is extremely telecentric. When restricted to a crop region of 2100 pixels square or smaller, entirely within the green circle, Zerene Stacker reports a scale change of less than 0.000015 (1 part in 65,000) between the two images. Across the 2000 pixels width of this central area, this change in scale amounts to a misalignment of less than 0.02 pixels on each edge of the image.

However, the edges and corners of the whole frame are not even close to telecentric. For points in the extreme upper left and right corners, the change in scale amounts to 12 pixels in the 4752 pixels across the width of the whole frame. If the entire frame were that far off telecentric, then Zerene Stacker would report a scale difference of about 0.002525 (1 part in 400). However, because the scale change is much smaller than that over most of the frame, the computation reports a sort of average value, only about 0.000642 (1 part in 1600).

If you’re going by the numbers, then there’s some opportunity for trouble when the non-telecentric area is small relative to the whole frame. That’s because the aggregate number may look pretty telecentric but the corners really aren’t. This particular setup shows the problem when the images are cropped to 3600 pixels in width, slightly more than the diameter of the green circle. With that crop done, Zerene Stacker reports less than 0.0002 difference in scale (1 part in 5000). That overall number looks OK, but the corners of the crop are far worse: offset by a full 3 pixels between frames.

Bottom line: avoid the vignettes. The optics will not be telecentric wherever the corners are darkening.

I hope this is helpful.

--Rik

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

Post by rjlittlefield »

Adding to the information above, here are a couple of animations that may help to further explain about telecentric lenses.

First, to set the stage, here again is the illustration of why a lens can be telecentric near the center of the field, but then go non-telecentric farther away, and why this depends on the aperture diameter. As shown here, I have stretched the image by 2X in the vertical direction. This essentially amounts to doubling the diameter of all components, without changing the lens focal lengths.

Image

Now, as prepared by Ramón Dolz (thanks, Ramón!), here is an animation of how the telecentric field gets bigger as the aperture gets smaller. In the animation, green lines show the edges of the ray cones that just barely fit through the lens, corresponding to the edges of the telecentric field. Blue lines are for the ray cone in the center of the field, and magenta/red lines are the chief rays for all the cones. Yellow marks the width of the telecentric field in both object and subject planes.

Image


Another odd feature of telecentric lenses, which I realized only very recently, is that their subject-side NA is not changed at all when you refocus the lens by changing extension. In other words, putting the lens closer or farther from the subject does not change the angular width of the entrance cone.

Here is an illustration of that effect, showing the same lens and aperture operating at 1.7X and at 3X, refocused by extension:

Image

This behavior contrasts sharply with ordinary lenses, where placing the lens closer to the subject makes the entrance cone have a wider angle.

The effect can be easily understood in one way by concentrating on the entrance pupil. With a telecentric lens, the entrance pupil is at infinity, so of course moving the subject by a short distance closer or farther has no effect on how the subject sees the entrance pupil.

But on the other hand, if the angle of the entrance cone does not change, then it must be that the width of the entrance cone, at the lens, does change, and in exactly the right way to keep the angle constant. In other words, as you change the extension so as to focus closer, somehow the optical system automatically "stops down" by exactly the right amount to compensate for the change in lens-to-subject distance. Looking at the behavior this way simply makes my head hurt!

In the very simple system animated above, it is straightforward though tedious to work through an analysis based on scaling of triangles to confirm that indeed the width of the cone at the lens is exactly what it needs to be to keep the entrance cone angle fixed.

For the more complicated system diagrammed earlier as "Setup 4", I would not want to work through a detailed analysis based on triangles! Nonetheless the argument about "entrance pupil at infinity" seems simple and foolproof, so I'm quite confident the triangles would work out OK also, if only I slogged through the analysis carefully enough.

--Rik

RDolz
Posts: 96
Joined: Mon Aug 28, 2017 9:32 am
Location: Valencia (Spain)

Post by RDolz »

Hi all.

In other threads we have talked about one aspect: how to measure the telecentricity correctly? . In my opinion it is an important aspect in order to normalize the measurements and that we can compare results.

This led me to contact Rik and see how we could do it using Zerene. The truth is that it has been a very clarifying journey for me. After several years trying to understand the concept, I think I finally understand it.

It is not a complicated concept, I think it simply is not explained properly for those of us who are not experts in optics, ... so we thought it would be convenient to do a post where anyone could understand the telecentricity in the setups that we normally use.

Therefore, instead of starting a new thread, I join this one and add here the experiments I did to measure the telecentricity using the combo described in:

https://www.photomacrography.net/forum/ ... hp?t=38761

Next I describe the method to measure the telecentricity of a lens, using the parameters that Zerene obtains.

Rick advised me in order to make a correct measurement of the telecentricity using the scale parameter (thank you very much for your help and for your patience):

“" To accurately measure telecentricity requires a careful test with a special setup: a planar subject that is imaged equal distances in front and behind perfect focus, so that nothing appears different between the two images except their size.
……, the best analysis would be to run Zerene Stacker on just the two frames that are +-1 frame away from best focus, then separately +-2 frames away from best focus, then separately +-3 frames, and so on.

This is multiple runs of the Zerene Stacker alignment process, each run comparing just two.”"


It is a simple procedure, but it requires patience. I explain the steps:

• First, the object to be photographed must be flat and perpendicular to the optical axis of the system. (I used a Silicon Wafer)
• The system is positioned in the best possible focus and a series of images are captured from a distance before and after this point. (I have done it with steps of 0.05mm)
• Once the stack of images is captured, the one with the best focus is located.
• Then we compare ONLY TWO images that are at a symmetrical distance from this point and the scale variation is obtained.
• From these data, the angle variation and hence the telecentricity is calculated.
• This comparison is made repeatedly at increasing distances but symmetrical to the point of maximum focus.

I have applied this method to measure the telecentricity of Nikon 8000 ED with different magnifications and with the configuration shown in the post mentioned above.The increase is obtained only by separating the sensor from the combo. As we can see in this animation.

Image

The iris mounted to achieve the telecentricity has the same diameter for all magnifications: 9mm.

As I mentioned, I did the test by photographing a wafer silicon positioned perpendicularly to the optical axis, in steps of 0.05mm. In total 1.5mm of travel, being the position with best focus to 0.75 mm from the start of the stack.


Image


The first two images I have compared are separated by 0.1mm (0.05 + 0.05), the next 0.2mm (0.5 + 0.5 + 0.5 + 0.5) ... and so on until the last comparison where the two images are separated from each other 1.5 mm (0.75 + 0.75). All tests were made with the same step between frames (0.05 mm).

I have repeated the test for the following magnifications:
2.15 / 1.69 /1.41 / 1.13 / 0.95 / 0.85

In each stacking, I repeated the procedure explained above.

This is the excel for an magnification of 2.15X


Image


And, for this magnification, the graphs of the scale variation calculated by Zerene and the calculated telecentricity for each pair of compared images.

Image

As you can see each value comes from comparing separate images at distances from 0.1mm to 1.5mm.
With this procedure, similar graphs are obtained for each magnification. Below a summary for all the magnifications:


Image


The error in DOF mm is the change of scale, the variation of the FOV, which produces that angle in 0.27mm of depth. For the full image it is double.

The value of Depth of field has been calculated using the formula DOF = lambda / (NA * NA), where NA is measured at the subject.

NA at the subject is equal to NA at the sensor multiplied by the magnification, and NA at the sensor is just 1 / (2 * f effective).

For this configuration with an iris diameter of 9mm, NA will be about 0.045, so for green light the 1/4-lambda DOF will be 0.00055/(0.045^2) = 0.27 mm.

Surprisingly, Rik calculated that in a telecentric lens a constant value of the DOF is obtained independently of the magnification!!:

“”….for a telecentric lens, once the iris diameter is fixed, the subject-side NA is also fixed, independent of the magnification. ……. With a telecentric lens, the entrance pupil is very large and located very far away (nominally at infinity). With a large pupil far away, changing the distance from lens to subject has no effect on how the pupil appears to the subject, so in particular no change in NA…….. The unexpected thing I finally realized is that when you increase magnification by adding extension behind a telecentric lens, the optics automatically "stop down" (larger effective F-number) by exactly the right amount to retain constant DOF (using the diffraction-limited 1/4-lambda criterion)…….""

The test has been exhausting but I think the dedicated effort has paid off. The truth is that I was surprised, I find the results very coherent and very interesting.
I think I can say that at last we have a way to compare the telecentricity of different setups.

Best Regards.
Ramón Dolz

cube-tube
Posts: 107
Joined: Tue Oct 10, 2017 7:50 am
Location: Durham, NC

Post by cube-tube »

What are the advantages of using true telecentric optics over just setting scale adjustments to 0 when stacking?

RDolz
Posts: 96
Joined: Mon Aug 28, 2017 9:32 am
Location: Valencia (Spain)

Post by RDolz »

Hi, ... telecentric lenses are essential if you want to stitching images at relatively low magnifications.

There are many posts in this forum that talk about it, but I think that in this thread you have a wide explanation of why to use telecentric lenses:

http://www.photomacrography.net/forum/v ... php?t=1418
Ramón Dolz

cube-tube
Posts: 107
Joined: Tue Oct 10, 2017 7:50 am
Location: Durham, NC

Post by cube-tube »

Thanks for the link.

The part about low-quality edges for 0% scaling when magnification is low and depth of field is high answers my question.

Post Reply Previous topicNext topic