www.photomacrography.net :: View topic - How to calculate DOF to stacking must better...

An online community dedicated to the practices of photomacrography, close-up and macro photography, and photomicrography.
 Photomacrography Front Page Amateurmicrography Front Page Old Forums/Galleries

Author Message
ofarcis

Joined: 27 Jan 2013
Posts: 278

 Posted: Wed Mar 13, 2013 5:38 pm    Post subject: How to calculate DOF to stacking must better... Hi all, In my program evolution Macrophotography I'm thinking of doing a series of calculations similar to those performed for calculators of Deep of Field (DOF). As I have understood, for the calculation the following is required: 1. - Circle of Confusion (CC). It is a model that depends costante of our camera. As the application runs reflex cameras from Canon, Nikon and Olympus, I have only to identify the camera to attach to a table that has that value. This is not a problem. 2. - F-stop (F). You can tell the program which aims f value invested, the microscope objective or lens macro we are using. 3. - Focus. I have no clear meaning, but ... 4. - Focal distance (FD). I have no clear how to calculate too, but ... But I think for the calculation in macro photography, is not required to take into account neither the distance nor the focal distance approach. Therefore must be applied this formula: DOF = FD * CC * ((M +1) / (M elev 2)) this is for the beginning And the double for the end. I'm a little confused with these calculations, see if someone experienced in these formulas can clarify. Thank you very much, Oscar.
elf

Joined: 18 Nov 2007
Posts: 1370

rjlittlefield

Joined: 01 Aug 2006
Posts: 19786
Location: Richland, Washington State, USA

Posted: Wed Mar 13, 2013 7:09 pm    Post subject:

Well, I'm happy to share with you some words I recently wrote in response to zerenesystems.com support question.

Question:
 Quote: Would you know if there is simple math to figure out the number of steps and slices per inch for a given depth? (I know you have a tutorial on steps and slices using a book page; maybe I need to give that a try.)

The bottom line is that if you want to compute DOF for a system in which the user provides the camera and optics, you had better be prepared to ask the user a lot of questions about what they're using and how they have it set up, then choose the proper formula from among a half dozen that are each appropriate in some different situation, and provide some nice adjustable scale factor that the user can set to adjust the calculation after the basic formula gives a result that does not work well for them.

--Rik
ChrisR

Joined: 14 Mar 2009
Posts: 8313
Location: Near London, UK

 Posted: Wed Mar 13, 2013 7:19 pm    Post subject: PMR, diffraction & probably more screw up the equation but I'm not best qualified to "go there". (Not sure what you mean about "double for the end"? Certainly the front and rear focused depths are only considered equal at macro distances, but I can't remember where they become significantly different. It would certainly be great if some of these parameters could be incorporated into an automatic stepper. The NA of a microscope objective would be the input figure for those, of course. (DOFs are quoted on eg Nikon and Mitutoyo websites, though they disagree a bit). The thing I grapple with more, is getting the C of C right, for the size of the reproduction of the picture. For example if I only need 1000 pixels wide but a deep stack, I know I want a smaller aperture, because I don't need ultimate resolution from the lens and do want to minimize the number of shots. Therefore I'd like to be able to set the C of C , perhaps in terms of pixel-width multiples. Edited for typos - I'd fallen asleep, so on waking just hit "send" without thought..Last edited by ChrisR on Thu Mar 14, 2013 2:04 am; edited 1 time in total
ofarcis

Joined: 27 Jan 2013
Posts: 278

 Posted: Wed Mar 13, 2013 7:25 pm    Post subject: That's what I had planned Rik, it is not easy for an normal user (not advanced) to give sufficient data to make the appropriate calculation. I think the best is to have an Excel chart type in the app so that the user will fill in the data as Magnification, FOV, slices according to the experience of each so you can reference it at any time. Regards, Oscar. P.D.: Let's see if I fall asleep at 3:25 that are already in Spain!!!
rjlittlefield

Joined: 01 Aug 2006
Posts: 19786
Location: Richland, Washington State, USA

Posted: Wed Mar 13, 2013 7:40 pm    Post subject:

 ChrisR wrote: DOFs are quoted on eg Nikon and Mitutoyo websites, though they disagree a bit

More than a bit. The ones I've seen disagree by at least a factor of 2.

http://www.microscopyu.com/tutorials/java/depthoffield/index.html says that
d_tot = lambda*n/NA^2 + (n/(M*NA))*e

Mitutoyo Catalog Ne. E4191-378, page 30 (http://www.krebsmicro.com/MitutoyoE4191-378.pdf ) says
+-DOF = lambda/(2*NA^2) [implicitly in air]

The basic disagreement in the formulas is only that Mitutoyo quotes maximum distance from perfect focus (single-sided DOF), while Nikon quotes distance between front and rear limits (double-sided DOF).

In addition Nikon gives allowance for finite resolution of the camera sensor, while Mitutoyo assumes a perfect sensor.

--Rik
ofarcis

Joined: 27 Jan 2013
Posts: 278

 Posted: Sat Mar 23, 2013 12:10 pm    Post subject: Ok, i think to calculate the DOF with Lefkowitz formula like this: Distance = 2*CoC*f*((m+1)/(m*m)) CoC is a constant. Because i know the camera parameters, i can use this. f is the Aberture of the lens. m is the magnification. For example, my Canon lens inverted have 4x magnification. I ajust my lens to f5,6 before to inverted. Lock in this. And my CoC for my EOS 600D are 0,019 If i apply the formula the result are: Distance = 2 * 0,019 * 5,6 * ((4+1)/4*4) = 2*0,019*5,6*(5/16)=2*0,019*5,6*0,3125=0,0665mm displacement between photos. In this case i think is important to overlap 25% between photos. The result are 0,049875mm, round to 0,05mm In my Foucus Rail i have 0,005mm of resolution per step of my stepper motor. In this case i need 10 steps = 0,05mm displacement to take another photo. This is valid? This is valid too for microscope lens? I think for microscope lens to use conversion between f and NA. Any people know the formula for this? I know, this calculations isen't for all the case but if it is for the majority of cases, i think. Regards, Oscar._________________Collection http://www.flickr.com/photos/23556887@N05/ Photography http://macrorail.com/GaleriaEng.php Personal http://TuPlaneta.es
rjlittlefield

Joined: 01 Aug 2006
Posts: 19786
Location: Richland, Washington State, USA

Posted: Sat Mar 23, 2013 12:58 pm    Post subject:

 ofarcis wrote: This is valid?

The calculation appears to be correct.

 Quote: This is valid too for microscope lens? I think for microscope lens to use conversion between f and NA. Any people know the formula for this?

Example #1: treat a 10X NA 0.25 objective as if it were f/2 (1/(2*0.25)=2). Then the Lefkowitz formula will calculate DOF = 2*0.019mm*2*(10+1)/(10*10) = 0.00836 mm. The actual DOF is a little more than that: 0.0088 mm using the 1/4 lambda criterion (0.00055/NA^2).

Example #2: treat a 4X NA 0.10 objective as if it were f/5 (1/(2*0.10)=5). The formula calculates 2*0.019mm*5*(4+1)/(4*4) = 0.059375 mm. In this case the actual DOF may be a little smaller: 0.055 mm by 1/4 lambda criterion.

Example #3: treat a 20X NA 0.40 objective as if it were f/1.25 (1/(2*0.40)=1.25). The formula calculates 2*0.019mm*1.25*(20+1)/(20*20) = .002494 mm. The DOF by 1/4 lambda is 0.003438 mm.

Example #4: treat a 50X NA 0.55 objective as if it were f/0.909 . The formula calculates =2*0.019mm*0.909*(50+1)/(50*50)=0.000705 mm; DOF by 1/4 lambda is 0.001818 mm.

--Rik
ofarcis

Joined: 27 Jan 2013
Posts: 278

 Posted: Sat Mar 23, 2013 1:28 pm    Post subject: Ok, thanks Rik. Regards, Oscar._________________Collection http://www.flickr.com/photos/23556887@N05/ Photography http://macrorail.com/GaleriaEng.php Personal http://TuPlaneta.es
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
 All times are GMT - 7 Hours Page 1 of 1

 Jump to: Select a forum Rules and Guidelines----------------Posting GuidelinesImage Hosting Procedures Community Discussions and Announcements----------------General Discussion Forum and Community AnnouncementsCommunity Members and FriendsFavorite LocationsEquipment Exchange Image Galleries----------------Nature Photography -- Macro and Close-upTechnical and Studio Photography -- Macro and Close-upPhotography Through the MicroscopeMacro and Close-up Archives Techniques and Technical Discussions----------------Macro and Micro Technique and Technical DiscussionsEquipment DiscussionsMacro & Microscopy ArticlesFrequently Asked Questions (FAQs) Beginners Forums----------------Beginners MacroBeginners Micro Administrator's Appreciation Galleries----------------Administrator's Appreciation Gallery...Macro and Close-up ImagesAdministrator's Appreciation Gallery...Photography Through the Microscope
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum