Forum

Author Topic: Telecentric lens settings (Focus Stacking)  (Read 5746 times)

dominic.albanese

  • Newbie
  • *
  • Posts: 1
    • View Profile
Telecentric lens settings (Focus Stacking)
« on: January 13, 2016, 06:06:43 PM »
Attempting to do some small scale macro photogrammetry and wanted to see if anyone had any suggestions for this process. I am using a CMM to take pictures at regular intervals in XYZ, lens is a telecentric nikon toolmaker objective (5x) With the T5i that I am using it results in 0.8mm pixel spacing!

Just a quick background about the idea here. A telecentric lens doesn't have a regular frustrum like a regular camera, but instead the pixels are the same realworld size no matter how far you are away from the subject. The way I visualize it is that the frustrum is a rectangular prism rather than a pyramid shape. Depth of field is very shallow however and stacks in the range of 100s are necessary to get a complete in focus image.

There are some pluses and minuses to a lens like this. Past experiments with focus stacking a traditional macro lens haven't yielded great results. As you go through the stack the act of focusing it is changing the size of the object on the sensor so that the final stacked image has strange distortions the object is a combination of lots of different pictures with different sizes! A telecentric should avoid this problem but my gut is that Agisoft is having difficulty aligning the images as the don't fit into the camera model well (at least with default settings.

My test is currently a dime. To get a perpendicular set of images is about 8000 photos. 100 per focus range and 8 x 10 in X and Y. I did this for 4 angle to the dime as well (~15 degrees off axis) in 1100o photos per shot! Everything is then stacked and then put into Agisoft. I can obtain the stack turning the scaling parameter to 0 which means the telecentric lens is doing its job

My results from these images are not great and very noisy and misaligned. II am thinking that the lens parameters in Agisoft are having a hard time with this images as input images.There is no perspective in the shot so maybe it has a hard time finding where along the line to place the image.  These images are taken on a CMM so you would expect to see a regular grid for each angle.I have tried locking the camera calibration at some large focal length to simulate a very long lens which should be similar, but no luck.

Anyone have any experience here that could point me in the correct direction? I think I am close but missing some key camera settings.

Dominic

gchaprnka

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Telecentric lens settings (Focus Stacking)
« Reply #1 on: January 19, 2016, 11:23:12 PM »
I'm working on a similar issue! Anyone have ideas?

John

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Telecentric lens settings (Focus Stacking)
« Reply #2 on: May 13, 2016, 09:56:34 AM »
Anyone? I have the same issue. Close, but...

Vlad

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: Telecentric lens settings (Focus Stacking)
« Reply #3 on: May 13, 2016, 10:53:51 AM »

Vlad

  • Newbie
  • *
  • Posts: 24
    • View Profile

John

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Telecentric lens settings (Focus Stacking)
« Reply #5 on: May 13, 2016, 11:10:26 AM »
Stacking itself is not the issue (I get crisp images all the way through), it's how Agisoft handle them

Twister

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: Telecentric lens settings (Focus Stacking)
« Reply #6 on: May 13, 2016, 11:49:55 AM »
Hi everyone,

to my understanding you will never succeed aligning telecentric images, whether stacked or not. A telecentric lens has infinite focus, so Photoscan will not be able to locate the cameras. In principle, it should be possible to include infinite focus cameras into Photoscan, if homogeneous coordinates are used internally (which is probably the case), but it seems that Photoscan at the moment is not able to handle such cases.

You can however use a regular (non telecentric) camera for focus stacking, if you resize the images correctly. Commercial stacking programs (e. g. Helicon) do this.

Twister

JMR

  • Hero Member
  • *****
  • Posts: 502
    • View Profile
Re: Telecentric lens settings (Focus Stacking)
« Reply #7 on: May 14, 2016, 03:00:59 AM »
My quess is that pure telecentric lenses cannot be used for photogrammetry in normal case. Each 3D point solution requires a pair of rays intersecting, but if your camera is being just shifted or panned, then rays through keypoints are likely parallel in all sucessive images. and the intersections can't be determined exactly
In theory there should exist a way of solving that if your photos are taken under diferent angles (convergent case)... but still common photogrammetry formulas are not suitable, and I guess Photoscan will fail to calculate orientations.
If you want 3D choose a diferent lens or use the movement of the focal plane to obtain the 3rd dimension along the stacking axis. I think this technique is used for the so called confocal microscopy.
Some focus staking applications like Helicon Focus will allow you to create 3D meshes you could merge later, but your z resolution is limited to the number of focus steps.
If you only want to get a good orthomosaic, then I guess you'd better using a parallel photo-stitcher like Microsoft ICE
Regards
GEOBIT