Telecentric DImage 5400
Moderators: rjlittlefield, ChrisR, Chris S., Pau
Telecentric DImage 5400
The folks that have the DImage 5400, has anyone considered or been using it in a manner that produces a telecentric result? If so, please elaborate.
Best,
Best,
Research is like a treasure hunt, you don't know where to look or what you'll find!
~Mike
~Mike
Hello everyone, this is my first technical contribution to the blog, ... I hope you find it interesting.
For quite some time now I read Mike's request about using the Minolta Dimage 5400 (hereinafter MD5400) in telecentric mode.
And I thought, well I'm going to try it (thinking that it would be easy for me, since I had done it before with other lenses) ... but it was not like that.
The camera I use is an APS-C, the Fujifilm X-T1, 16Mp, 4896x3264. The camera is mounted, in vertical setup, on an XYZ cartesian robot.
The first thing was to determine the setup and in what position the lens is mounted. I did not have to do tests since it is perfectly described and tested (among others) in:
https://www.closeuphotography.com/minol ... 5400-lens/
https://www.photomacrography.net/forum/ ... nolta+5400
http://www.savazzi.net/photography/scanner_lenses.html
It literally concludes that: "This comparison shows that the objective can only be used in one direction, with the light entering on the side carrying the golden paint mark." It is also determined that the focal length is 36 mm and the diaphragm has a value of 2,5, for an opening diameter of 14 mm. If you consider that the lens, inside, has an opening diameter of about 13 mm, the diaphragm would be 2,8 (see savazzi.net).
Therefore, use the setup shown by Robert, starting with the RAF camera adapter and with the lens in the position of the gold mark at the light input.
The next step is the one that concerns us now: transform the lens into telecentric. To convert the MD5400 into telecentric, I followed the excellent descriptions provided by Rik in:
http://www.photomacrography.net/forum/v ... php?t=1032
http://www.photomacrography.net/forum/v ... php?t=1418
https://www.photomacrography.net/forum/ ... centricity
So the first thing I tried was to add a diaphragm, between the MD5400 and the camera, at the right point. As I am fascinated by this process, and although many of you already know how to locate that point, I will explain it. This point is found using a telescope focused on infinity (for example, focusing on the Moon) and looking through the front of the lens. The diaphragm, in its most closed position, is located at the rear of the lens. If we change the distance between the lens and the diaphragm, at a certain distance, as if by magic, the diaphragm can be seen perfectly focused. If at that distance we fix the diaphragm, the lens becomes telecentric.
The diaphragm that I use has a maximum diameter of 25mm and is clickless. I have made some marks to determine the points in which the area of the opening is just half of the previous one. In this diaphragm, a f1.4 corresponds to 17.68mm, f2 to 12.5mm, ...... and f8 to 3.13mm in diameter.
On the MD5400 the diaphragm should be 22,5 mm from the metal on the back of the lens. I have assembled the following sequence of adapters:
MD5400/ RAF 18mm-M.RMS / F.RMS-M.42 / extension ring 14 mm F.42-M.42/ F.42-F.42 / Diaphragm M.42-M.42 / extension ring 28 mm F.42-M.42 / Helicoid (25mm-50mm) F.42-M.42 / F.42-FX Mount. (M=male, F=female)
The fine adjustment has been achieved by slightly moving the lens inside the RAF Camera adapter.
The fact of placing a diaphragm at said point generates telecentricity, but the degree of telecentricity achieved is determined by the diameter of the diaphragm (that is, how closed it is). The smaller the diameter of the iris, the better the telecentricity. But this is not free: When the iris is closed, at least two drawbacks occur: diffraction and vignetting. This determined the first test. Check different diameters of the iris and see what effect they have on the telecentricity, diffraction and vignetting.
The test should be done at a magnification of approximately 2X. Why ?: Because the maximum field a telecentric lens can cover is approximately the diameter of its input aperture. If we consider a focal length of 36mm and a diaphragm of 2.8, this opening would be approximately 13mm. A diagonal of 13 mm corresponds, in the format of the Fuji X-T1, a horizontal field of view (HFOV) of 10,82mm and therefore the MINIMUM magnification of the MD5400, in telecentric mode, would be 2,18X.
It is considered that for a lens to have a good degree of telecentricity the scaling factor between each image of the stacking must be 0,02% or less. It is a change of scale of 0,0002, that is 2 parts in 10000. I use to stack Zerene and, once the images are stacked, the scaling factor is given by this program in the Options / View Console Log tab.
Since the depth of field (DOF) influences in the telecentricity, and this is related to the magnification, I made the measurements for several HFOV of 10mm, 9mm and 8mm. That is, for magnifications of 2,36X, 2,62 and 2,95X.
As an example of calculation, in a stack of 21 images, with the diaphragm at f4, and HFOV 10 mm, the Zerene software gave an accumulated scale factor of 0,987168. In my sensor abs(4896- (0,987168 * 4896)) = 62,82 pixels of total error, therefore 62,82 / 21 = 2.99 pixels / image. In percentage: 2,99 / 4896 * 100 = 0,061%. It is a change of scale between two consecutive images of 0,00061, that is 6,1 parts in 10000. The results were:
The only diaphragm that gives in all the magnifications a value less than 0.02% is f8. And the images for a HFOV=10mm: From top to bottom: Open, f4, f5,6, f8
Center:
Right Corner:
The diffraction produced by diaphragm diameters so small, makes the images with good telecentricity are very degraded.
But finally I decided to do a test with an 8 mm HFOV (2.95X) and f4. I chose this diaphragm because it maintains the best image quality, although the telecentricity is a bit worse than it is theoretically ideal. For this extension, the working distance is aprox. 40 mm and the distance between the front of the MD5400 and the sensor is aprox. 140 mm.
Here you have this staking + stitching, composed of 4x4 images, each with a capture of 74 images. That is 4x4x74 = 1184 images. Although I have only used those that had a focused part, 762 images. An overlap of approximately 37,5% on the X and Y axes (for the stitching PTGUI software only uses the center portion of the image). The result is, The result is, 13895 x 8835 pixels (122,8 megapixels).
It is a bioformation collected this summer on a beach in Bali (when Mike asked the question). I think it's a Bryozoa, but I'm not sure. It is a complex three-dimensional structure, which would quickly show the parallax defects.
The exact magnification is 2,91X (HFOV 8,1mm), the total field of the image is 23,1 x 15,35mm, with a depth of 7 mm, the step on the Z axis is 0,096 mm. The diameter of the diaphragm selected is 6,25 mm (my f4).
Stacking with Zerene (Pmax), without Scale Option. The stitching was done automatically with the PTGUI software. It does not have any subsequent geometric correction. I have not corrected the vignetting or any distortion or chromatic aberration in camera raw. Only histogram settings and a little detail (not even removed the artifacts due to mechanical errors of the robot that can be seen in the right part of the image).
Window from Panorama Editor PTGUI. You can observe that there is no deformation of the images to get the stitching.
https://easyzoom.com/imageaccess/b53df0 ... 424dc6b4c9
I have kept a gray margin in order that you can see the full image generated by PTGUI.
Full resolution, Can you see the snail?:
https://easyzoom.com/imageaccess/5899d4 ... a8e3bb16d3
Surely there will be better combinations or solutions (I invite you to explore), but given that we will always get a compromise between telecentricity and image quality, I think this solution works very well ....
There is a point that has puzzled me. Out of curiosity, I calculated the telecentricity in several of the stacks of this image by activating the Scale option in Zerene, ... and it gives me an average of 0,066%!. With the same setup, the first calculations gave me a scale change between each stacking image of 0,041%.
If I had seen these values before, I probably had not done this test. It is a change of scale between two consecutive images of 0,00066, that is 6,6 parts in 10.000. I think far from 0,02% …. although the stacking + stitching has apparently worked perfectly.
Is this way of measuring telecentricity correct?
Does anyone know a procedure to obtain the exact, and indisputable, value of the telecentricity of a lens?
Sorry for the extension (and for my English) ... but I think it's good to understand every step of the process. What do you think?
For quite some time now I read Mike's request about using the Minolta Dimage 5400 (hereinafter MD5400) in telecentric mode.
And I thought, well I'm going to try it (thinking that it would be easy for me, since I had done it before with other lenses) ... but it was not like that.
The camera I use is an APS-C, the Fujifilm X-T1, 16Mp, 4896x3264. The camera is mounted, in vertical setup, on an XYZ cartesian robot.
The first thing was to determine the setup and in what position the lens is mounted. I did not have to do tests since it is perfectly described and tested (among others) in:
https://www.closeuphotography.com/minol ... 5400-lens/
https://www.photomacrography.net/forum/ ... nolta+5400
http://www.savazzi.net/photography/scanner_lenses.html
It literally concludes that: "This comparison shows that the objective can only be used in one direction, with the light entering on the side carrying the golden paint mark." It is also determined that the focal length is 36 mm and the diaphragm has a value of 2,5, for an opening diameter of 14 mm. If you consider that the lens, inside, has an opening diameter of about 13 mm, the diaphragm would be 2,8 (see savazzi.net).
Therefore, use the setup shown by Robert, starting with the RAF camera adapter and with the lens in the position of the gold mark at the light input.
The next step is the one that concerns us now: transform the lens into telecentric. To convert the MD5400 into telecentric, I followed the excellent descriptions provided by Rik in:
http://www.photomacrography.net/forum/v ... php?t=1032
http://www.photomacrography.net/forum/v ... php?t=1418
https://www.photomacrography.net/forum/ ... centricity
So the first thing I tried was to add a diaphragm, between the MD5400 and the camera, at the right point. As I am fascinated by this process, and although many of you already know how to locate that point, I will explain it. This point is found using a telescope focused on infinity (for example, focusing on the Moon) and looking through the front of the lens. The diaphragm, in its most closed position, is located at the rear of the lens. If we change the distance between the lens and the diaphragm, at a certain distance, as if by magic, the diaphragm can be seen perfectly focused. If at that distance we fix the diaphragm, the lens becomes telecentric.
The diaphragm that I use has a maximum diameter of 25mm and is clickless. I have made some marks to determine the points in which the area of the opening is just half of the previous one. In this diaphragm, a f1.4 corresponds to 17.68mm, f2 to 12.5mm, ...... and f8 to 3.13mm in diameter.
On the MD5400 the diaphragm should be 22,5 mm from the metal on the back of the lens. I have assembled the following sequence of adapters:
MD5400/ RAF 18mm-M.RMS / F.RMS-M.42 / extension ring 14 mm F.42-M.42/ F.42-F.42 / Diaphragm M.42-M.42 / extension ring 28 mm F.42-M.42 / Helicoid (25mm-50mm) F.42-M.42 / F.42-FX Mount. (M=male, F=female)
The fine adjustment has been achieved by slightly moving the lens inside the RAF Camera adapter.
The fact of placing a diaphragm at said point generates telecentricity, but the degree of telecentricity achieved is determined by the diameter of the diaphragm (that is, how closed it is). The smaller the diameter of the iris, the better the telecentricity. But this is not free: When the iris is closed, at least two drawbacks occur: diffraction and vignetting. This determined the first test. Check different diameters of the iris and see what effect they have on the telecentricity, diffraction and vignetting.
The test should be done at a magnification of approximately 2X. Why ?: Because the maximum field a telecentric lens can cover is approximately the diameter of its input aperture. If we consider a focal length of 36mm and a diaphragm of 2.8, this opening would be approximately 13mm. A diagonal of 13 mm corresponds, in the format of the Fuji X-T1, a horizontal field of view (HFOV) of 10,82mm and therefore the MINIMUM magnification of the MD5400, in telecentric mode, would be 2,18X.
It is considered that for a lens to have a good degree of telecentricity the scaling factor between each image of the stacking must be 0,02% or less. It is a change of scale of 0,0002, that is 2 parts in 10000. I use to stack Zerene and, once the images are stacked, the scaling factor is given by this program in the Options / View Console Log tab.
Since the depth of field (DOF) influences in the telecentricity, and this is related to the magnification, I made the measurements for several HFOV of 10mm, 9mm and 8mm. That is, for magnifications of 2,36X, 2,62 and 2,95X.
As an example of calculation, in a stack of 21 images, with the diaphragm at f4, and HFOV 10 mm, the Zerene software gave an accumulated scale factor of 0,987168. In my sensor abs(4896- (0,987168 * 4896)) = 62,82 pixels of total error, therefore 62,82 / 21 = 2.99 pixels / image. In percentage: 2,99 / 4896 * 100 = 0,061%. It is a change of scale between two consecutive images of 0,00061, that is 6,1 parts in 10000. The results were:
The only diaphragm that gives in all the magnifications a value less than 0.02% is f8. And the images for a HFOV=10mm: From top to bottom: Open, f4, f5,6, f8
Center:
Right Corner:
The diffraction produced by diaphragm diameters so small, makes the images with good telecentricity are very degraded.
But finally I decided to do a test with an 8 mm HFOV (2.95X) and f4. I chose this diaphragm because it maintains the best image quality, although the telecentricity is a bit worse than it is theoretically ideal. For this extension, the working distance is aprox. 40 mm and the distance between the front of the MD5400 and the sensor is aprox. 140 mm.
Here you have this staking + stitching, composed of 4x4 images, each with a capture of 74 images. That is 4x4x74 = 1184 images. Although I have only used those that had a focused part, 762 images. An overlap of approximately 37,5% on the X and Y axes (for the stitching PTGUI software only uses the center portion of the image). The result is, The result is, 13895 x 8835 pixels (122,8 megapixels).
It is a bioformation collected this summer on a beach in Bali (when Mike asked the question). I think it's a Bryozoa, but I'm not sure. It is a complex three-dimensional structure, which would quickly show the parallax defects.
The exact magnification is 2,91X (HFOV 8,1mm), the total field of the image is 23,1 x 15,35mm, with a depth of 7 mm, the step on the Z axis is 0,096 mm. The diameter of the diaphragm selected is 6,25 mm (my f4).
Stacking with Zerene (Pmax), without Scale Option. The stitching was done automatically with the PTGUI software. It does not have any subsequent geometric correction. I have not corrected the vignetting or any distortion or chromatic aberration in camera raw. Only histogram settings and a little detail (not even removed the artifacts due to mechanical errors of the robot that can be seen in the right part of the image).
Window from Panorama Editor PTGUI. You can observe that there is no deformation of the images to get the stitching.
https://easyzoom.com/imageaccess/b53df0 ... 424dc6b4c9
I have kept a gray margin in order that you can see the full image generated by PTGUI.
Full resolution, Can you see the snail?:
https://easyzoom.com/imageaccess/5899d4 ... a8e3bb16d3
Surely there will be better combinations or solutions (I invite you to explore), but given that we will always get a compromise between telecentricity and image quality, I think this solution works very well ....
There is a point that has puzzled me. Out of curiosity, I calculated the telecentricity in several of the stacks of this image by activating the Scale option in Zerene, ... and it gives me an average of 0,066%!. With the same setup, the first calculations gave me a scale change between each stacking image of 0,041%.
If I had seen these values before, I probably had not done this test. It is a change of scale between two consecutive images of 0,00066, that is 6,6 parts in 10.000. I think far from 0,02% …. although the stacking + stitching has apparently worked perfectly.
Is this way of measuring telecentricity correct?
Does anyone know a procedure to obtain the exact, and indisputable, value of the telecentricity of a lens?
Sorry for the extension (and for my English) ... but I think it's good to understand every step of the process. What do you think?
Ramón Dolz
- rjlittlefield
- Site Admin
- Posts: 23605
- Joined: Tue Aug 01, 2006 8:34 am
- Location: Richland, Washington State, USA
- Contact:
RDolz, that's a very interesting and thorough post. Great work.
I would not think that adding an aperture is the best method of getting telecentricity with this lens. Instead I would think to try a high-quality close-up lens in front of the scanner lens, adjusting the distance between the two lenses until the Scanner lens' own aperture satisfied the criterion you mention (appears to be at infinity when seen through the close-up lens). I tried this for a longer lens and it worked beautifully:
http://www.photomacrography.net/forum/v ... ric+tokina
The problem for using this method on the DiMage scanner lens is its short focal length. May not be possible. But it might be worth a try.
I would not think that adding an aperture is the best method of getting telecentricity with this lens. Instead I would think to try a high-quality close-up lens in front of the scanner lens, adjusting the distance between the two lenses until the Scanner lens' own aperture satisfied the criterion you mention (appears to be at infinity when seen through the close-up lens). I tried this for a longer lens and it worked beautifully:
http://www.photomacrography.net/forum/v ... ric+tokina
The problem for using this method on the DiMage scanner lens is its short focal length. May not be possible. But it might be worth a try.
Rik and Rolsen, thank you very much for solving the problem ... I will keep it in mind for the next posts.
Lou, yes ... maybe it's good to try to achieve telecentricity by mounting a front lens, but as you very well say, the lens should have a very short focal length ... and I do not have any quality lens with those characteristics.
I am also afraid that in this case, the resulting working distance would be minimal.
Could someone make the calculation of the lens that would be needed?
What space would be between the object and the front of the lens?
Lou, yes ... maybe it's good to try to achieve telecentricity by mounting a front lens, but as you very well say, the lens should have a very short focal length ... and I do not have any quality lens with those characteristics.
I am also afraid that in this case, the resulting working distance would be minimal.
Could someone make the calculation of the lens that would be needed?
What space would be between the object and the front of the lens?
Ramón Dolz
Beatsy, thank you very much everyone. I just try to contribute something of how much I have received from this forum.
I have been learning for more than a year, and moving forward, thanks to your posts ... and some personal help (Robert, Lou, Rik, Pau).
In particular, the part that interests me most is the process of stacking + stitching (not exceeding a magnification of 3-4X), and this is practically impossible without the use of telecentric optics. I think I'm starting to control the technique, and I think I can help others to make the learning process easier for them.
Although as you can see I have gaps that I would like to solve, as the way to obtain an accurate measurement of the degree of telecentricity of a lens or a combination of them.
I would like us to design a standardized procedure that allows us to compare our devices.
For all this I have tried to make a detailed description of all the steps I have taken to convert this lens into telecentric.
I have been learning for more than a year, and moving forward, thanks to your posts ... and some personal help (Robert, Lou, Rik, Pau).
In particular, the part that interests me most is the process of stacking + stitching (not exceeding a magnification of 3-4X), and this is practically impossible without the use of telecentric optics. I think I'm starting to control the technique, and I think I can help others to make the learning process easier for them.
Although as you can see I have gaps that I would like to solve, as the way to obtain an accurate measurement of the degree of telecentricity of a lens or a combination of them.
I would like us to design a standardized procedure that allows us to compare our devices.
For all this I have tried to make a detailed description of all the steps I have taken to convert this lens into telecentric.
Ramón Dolz
RDolz,
Sorry for the late reply, been embedded in creating a home brew automated precision Stack & Stitch system while managing my usual other tasks. Thanks so much for taking a look at the possibility of using the MD5400 in a telecentric mode, and reporting your efforts on such.
My interests are similar to yours, in the small to medium magnification for Stack & Stitch efforts (my subjects at present are semiconductor chips though). Having "been there, done that" with some earlier S&S efforts, I know how much post processing effort is required to stitch things together in a presentable manner, which gets expanded significantly when the capturing lens system isn't close to being telecentric. Same goes for doing the S&S data image capturing by the usual stacking method (Stackshot, Wemacro, THK, or MJKZZ focus rails) but positioning the tiles for focus stacking by hand using a precision X&Y subject position stage, very tedious indeed!!! Thus my interest in a precision S&S system.
Thanks again for taking a look into using the MD5400 in a telecentric mode.
Best,
Sorry for the late reply, been embedded in creating a home brew automated precision Stack & Stitch system while managing my usual other tasks. Thanks so much for taking a look at the possibility of using the MD5400 in a telecentric mode, and reporting your efforts on such.
My interests are similar to yours, in the small to medium magnification for Stack & Stitch efforts (my subjects at present are semiconductor chips though). Having "been there, done that" with some earlier S&S efforts, I know how much post processing effort is required to stitch things together in a presentable manner, which gets expanded significantly when the capturing lens system isn't close to being telecentric. Same goes for doing the S&S data image capturing by the usual stacking method (Stackshot, Wemacro, THK, or MJKZZ focus rails) but positioning the tiles for focus stacking by hand using a precision X&Y subject position stage, very tedious indeed!!! Thus my interest in a precision S&S system.
Thanks again for taking a look into using the MD5400 in a telecentric mode.
Best,
Research is like a treasure hunt, you don't know where to look or what you'll find!
~Mike
~Mike
Do not worry Mike, most of us combine this with other tasks ... in fact, your question was the seed that finally made me participate. Thanks.
I agree, in the difficulty that represents an S & S process if you do not use a good robotic device.
Therefore, in a show of foolishness, I decided to design and build my own robot (X, Y, Z). I've been more than a year since I started the adventure, and I'm still improving the system, ..
But the fact of finally having a system, although not exaggeratedly precise, has made the process much easier.
As you already know, there are other decisive aspects to obtain a good S & S, in the first place to obtain quality telecentric system, and of course the software.
Luckily in this aspect there is little to develop, I use Zerene and PTGUI. Both automatically perform their functions with excellent results. From Zerene I can add little, and PTGUI performs the stitching automatically, and wonderfully, if you have the correct images. If that is not the case, there is always something that does not adjust correctly ... and that can be really frustrating.
That is why I have highlighted in this post that the entire stitching process has been carried out without manual assistance. This indicates that the telecentric system, despite the measured values, is surprisingly good.
Another issue is the workflow necessary to prepare and order thousands of images from the RAW format so that finally these programs can work.
I agree, in the difficulty that represents an S & S process if you do not use a good robotic device.
Therefore, in a show of foolishness, I decided to design and build my own robot (X, Y, Z). I've been more than a year since I started the adventure, and I'm still improving the system, ..
But the fact of finally having a system, although not exaggeratedly precise, has made the process much easier.
As you already know, there are other decisive aspects to obtain a good S & S, in the first place to obtain quality telecentric system, and of course the software.
Luckily in this aspect there is little to develop, I use Zerene and PTGUI. Both automatically perform their functions with excellent results. From Zerene I can add little, and PTGUI performs the stitching automatically, and wonderfully, if you have the correct images. If that is not the case, there is always something that does not adjust correctly ... and that can be really frustrating.
That is why I have highlighted in this post that the entire stitching process has been carried out without manual assistance. This indicates that the telecentric system, despite the measured values, is surprisingly good.
Another issue is the workflow necessary to prepare and order thousands of images from the RAW format so that finally these programs can work.
Ramón Dolz
Ramon,
I wouldn't say it was a foolish effort on your part creating a robot S&S system, but more of a fun adventure
Agree using Zerene and PTGui as the softwares of choice for image processing. Didn't have much success trying to stitch with PS, but PTGui was much better IMO.
I'm still in the mist of creating my robot, mechanically I'm almost there with the modified horizontal setup (I've used for many years now) based upon precision Thorlabs stuff....very good but expensive (worth every penny though!!), modifying for a vertical capability also. Now I'm in the process of writing the code for the stepper motor control of the 3 axises and select the proper control algorithms and drivers. I've learned quite a bit about stepper motors, control and the drivers lately, especially from a precision use standpoint (and what not to use/do!!). Now I'm dealing with the software side (haven't programmed anything in over 40 years!!), but learning new things is part of the adventure
Please show & describe your robot system, I'm certainly interested and sure others are also.
Best,
I wouldn't say it was a foolish effort on your part creating a robot S&S system, but more of a fun adventure
Agree using Zerene and PTGui as the softwares of choice for image processing. Didn't have much success trying to stitch with PS, but PTGui was much better IMO.
I'm still in the mist of creating my robot, mechanically I'm almost there with the modified horizontal setup (I've used for many years now) based upon precision Thorlabs stuff....very good but expensive (worth every penny though!!), modifying for a vertical capability also. Now I'm in the process of writing the code for the stepper motor control of the 3 axises and select the proper control algorithms and drivers. I've learned quite a bit about stepper motors, control and the drivers lately, especially from a precision use standpoint (and what not to use/do!!). Now I'm dealing with the software side (haven't programmed anything in over 40 years!!), but learning new things is part of the adventure
Please show & describe your robot system, I'm certainly interested and sure others are also.
Best,
Research is like a treasure hunt, you don't know where to look or what you'll find!
~Mike
~Mike