Auto Focus On OFM

Hi, Now I’m learning how OFM works and still haven’t found an explanation of the algorithm or how normal scanning and auto focus works on the navigate panel on ofm especially on the scanning feature how to run auto focus during the scanning process, what are the parameters, can I get a more in-depth explanation or is there a source code that I can access?Thaks

Th code is on GitLab, but it may be a bit hard to skim through to get the algorithm.

There is a paper on the algorithm as well.

1 Like

hi forgive me if this question has already been asked in this forum, in the autofocus algorithm what is the optimal range for the autofocus and what is the step size and step so that the autofocus algorithm gives the best focus image, I read in your code there is dz = 2000 initialization so in fast autofocus how many steps on the stepper motor for fast autofocus, thanks

2000 steps is the standard range used. The range used is not so much about getting the best final focus, more about making sure that the focus is within the range scsnned. If you are refocusing in the same place or with a small translation on a flat sample then you can probably get away with a smaller range.

So what are the parameters used in creating the autofocus algorithm, I see in the ofm software there are 3 autofocus modes, fasr, medium, fine, what distinguishes them? Is it just the number of step sizes with the same step range?

The Fast mode uses a different method from the other two. It is usually the only one that you need.

Fast mode will have difficulty for objects that are mostly empty (like fluorescence of quantum dots) or have a small number of areas of uniform colour (a single region of black with a hard edge).

The paper that @j.stirling linked above describes the methods.