Slow autofocusing compared to NIS-Elements

classic Classic list List threaded Threaded
6 messages Options
FS
Reply | Threaded
Open this post in threaded view
|

Slow autofocusing compared to NIS-Elements

FS
Dear MM users/developers,

MM software-based autofocusing is rather slow, compared to Nikon NIS-Elements. Is there any way of speeding it up? Here are my observations:

SETUP:
Autofocusing: 10ms exposure time. H&P Autofocus, 1st step size: 0.2 um3. No fine. Threshold: 1, Crop: 0.2
Hardware: Nikon TE2000 (no Piezo), Hamamatsu Orca-R2

MICROMANAGER:
For an autofocusing with 5 planes, it takes 960ms/step
For an autofocusing with 5 planes, it takes 870ms/step
For an autofocusing with 9 planes, it takes 810ms/step

I used a script to understand where the delays are coming from:
(1) Movement of the objective: takes ~300ms/step
(2) Capturing the image, which takes ~300ms/step (even though the exposure time is only 10ms)
(3) Doing the autofocus itself takes ~300ms/step

NIS-ELEMENTS:
For an autofocusing with 5 planes, it takes 642ms/step
For an autofocusing with 7 planes, it takes 459ms/step
For an autofocusing with 9 planes, it takes 422ms/step

Here's a breakdown of the delays:
(1) Movement of the objective: takes ~190ms/step
(2) Capturing the image, which takes ~160ms/step
(3) Doing the autofocus itself takes the remainder ~70-290ms/step

SUMMARY:
NIS seems to be 50-90% faster than MM. When trying to capture as many positions as possible, this makes a big difference. Note that I don't like NIS-E for other reasons and am not using it. I'm only bringing it up here for comparison.

Getting a Piezo would help, but perhaps something can be done to speed up other parts of the AF process (e.g. capturing the image, actual communication with the objective/Piezo, etc).

Francois


Reply | Threaded
Open this post in threaded view
|

Re: Slow autofocusing compared to NIS-Elements

Prashanth Ravindran-2
Hi Francois-

The C++ Simple AF adapter might be doing a faster job of the computations compared to the Java AF that you are using. It is designed to be a simple port of the Java H&P AF, only with all the math being done in C++, which is a bit faster.

Thanks,
-- Prashanth

On Fri, Feb 12, 2010 at 3:15 PM, Francois St-Pierre <[hidden email]> wrote:

Dear MM users/developers,

MM software-based autofocusing is rather slow, compared to Nikon
NIS-Elements. Is there any way of speeding it up? Here are my observations:

SETUP:
Autofocusing: 10ms exposure time. H&P Autofocus, 1st step size: 0.2 um3. No
fine. Threshold: 1, Crop: 0.2
Hardware: Nikon TE2000 (no Piezo), Hamamatsu Orca-R2

MICROMANAGER:
For an autofocusing with 5 planes, it takes 960ms/step
For an autofocusing with 5 planes, it takes 870ms/step
For an autofocusing with 9 planes, it takes 810ms/step

I used a script to understand where the delays are coming from:
(1) Movement of the objective: takes ~300ms/step
(2) Capturing the image, which takes ~300ms/step (even though the exposure
time is only 10ms)
(3) Doing the autofocus itself takes ~300ms/step

NIS-ELEMENTS:
For an autofocusing with 5 planes, it takes 642ms/step
For an autofocusing with 7 planes, it takes 459ms/step
For an autofocusing with 9 planes, it takes 422ms/step

Here's a breakdown of the delays:
(1) Movement of the objective: takes ~190ms/step
(2) Capturing the image, which takes ~160ms/step
(3) Doing the autofocus itself takes the remainder ~70-290ms/step

SUMMARY:
NIS seems to be 50-90% faster than MM. When trying to capture as many
positions as possible, this makes a big difference. Note that I don't like
NIS-E for other reasons and am not using it. I'm only bringing it up here
for comparison.

Getting a Piezo would help, but perhaps something can be done to speed up
other parts of the AF process (e.g. capturing the image, actual
communication with the objective/Piezo, etc).

Francois



--
View this message in context: http://n2.nabble.com/Slow-autofocusing-compared-to-NIS-Elements-tp4563273p4563273.html
Sent from the Micro-Manager mailing list archive at Nabble.com.

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general



--
Thanks,
-- Prashanth

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
FS
Reply | Threaded
Open this post in threaded view
|

Re: Slow autofocusing compared to NIS-Elements

FS
Hi Prashanth, Nico

I think the AF is only part of the problem. For some reason, and as shown in my earlier email, it also takes more time (60-90%) for MM than NIS-E to (a) move the objective and (b) capture an image. Is this due to the fact that MM is Java-based?

Regarding SimpleAF, I've had many problems with it:

(1) First, it doesn't seem to work, at least in v1.3.43. Even after selecting a "Channel", as suggested by Nico in an earlier message, I get the following error:

Error code: 17
Can't find the device with the specified label

(2) Bizarrely, after installing SimpleAF, all other AF devices appear twice in "tools" menu.

(3) More importantly, and at least equally bizarrely: after installing SimpleAF, my Perfect Focus System (on a TE2000) has trouble finding the interface, enough not finding a lock, or moving incredibly slowly. This occurs even after rebooting the machine and all equipment. Removing the SimpleAF solved the issue.

Cheers,
Francois
Reply | Threaded
Open this post in threaded view
|

Re: Slow autofocusing compared to NIS-Elements

Arthur D. Edelstein
Hi Francois,

I will try reproducing your reported errors and get back to you.

Best regards,
Arthur



On Mon, Feb 22, 2010 at 12:12 PM, Francois St-Pierre
<[hidden email]> wrote:

>
> Hi Prashanth, Nico
>
> I think the AF is only part of the problem. For some reason, and as shown in
> my earlier email, it also takes more time (60-90%) for MM than NIS-E to (a)
> move the objective and (b) capture an image. Is this due to the fact that MM
> is Java-based?
>
> Regarding SimpleAF, I've had many problems with it:
>
> (1) First, it doesn't seem to work, at least in v1.3.43. Even after
> selecting a "Channel", as suggested by Nico in an earlier message, I get the
> following error:
>
> Error code: 17
> Can't find the device with the specified label
>
> (2) Bizarrely, after installing SimpleAF, all other AF devices appear twice
> in "tools" menu.
>
> (3) More importantly, and at least equally bizarrely: after installing
> SimpleAF, my Perfect Focus System (on a TE2000) has trouble finding the
> interface, enough not finding a lock, or moving incredibly slowly. This
> occurs even after rebooting the machine and all equipment. Removing the
> SimpleAF solved the issue.
>
> Cheers,
> Francois
>
> --
> View this message in context: http://n2.nabble.com/Slow-autofocusing-compared-to-NIS-Elements-tp4563273p4614694.html
> Sent from the Micro-Manager mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> micro-manager-general mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/micro-manager-general
>

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Slow autofocusing compared to NIS-Elements

Nico Stuurman-4
In reply to this post by FS
Hi Francois,

> (1) First, it doesn't seem to work, at least in v1.3.43.

Before doing anything else, please upgrade to the latest version  
(everyone reporting problems should really do so).  We have reworked  
the autofocus system quite extensively and I remember fixing at least  
some of the bugs you report.  We are simply not able to support all  
Micro-Manager versions out there, and it becomes all much easier if  
you work with the same code version that we work with.

Best,

Nico


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Slow autofocusing compared to NIS-Elements

Arthur D. Edelstein
In reply to this post by FS
Hi Francois,

As Nico point out, it will be good to test again with our latest release.

> For some reason, and as shown in
> my earlier email, it also takes more time (60-90%) for MM than NIS-E to (a)
> move the objective and (b) capture an image. Is this due to the fact that MM
> is Java-based?

I don't think so. It is more likely to be specific hardware settings
that are different, or something in our code that is not optimized.

> (2) Bizarrely, after installing SimpleAF, all other AF devices appear twice
> in "tools" menu.

 I think this is because you may have duplicate copies if the
autofocus jars. Go to the mmautofocus directory (inside the main
Micro-Manager directory), and remove jars that have an underscore
(they should be older).

After trying the various autofocus options on a fluorescent slide, I
had the best results with JAF(H&P).

Best regards,
Arthur



On Mon, Feb 22, 2010 at 12:12 PM, Francois St-Pierre
<[hidden email]> wrote:

>
> Hi Prashanth, Nico
>
> I think the AF is only part of the problem. For some reason, and as shown in
> my earlier email, it also takes more time (60-90%) for MM than NIS-E to (a)
> move the objective and (b) capture an image. Is this due to the fact that MM
> is Java-based?
>
> Regarding SimpleAF, I've had many problems with it:
>
> (1) First, it doesn't seem to work, at least in v1.3.43. Even after
> selecting a "Channel", as suggested by Nico in an earlier message, I get the
> following error:
>
> Error code: 17
> Can't find the device with the specified label
>
> (2) Bizarrely, after installing SimpleAF, all other AF devices appear twice
> in "tools" menu.
>
> (3) More importantly, and at least equally bizarrely: after installing
> SimpleAF, my Perfect Focus System (on a TE2000) has trouble finding the
> interface, enough not finding a lock, or moving incredibly slowly. This
> occurs even after rebooting the machine and all equipment. Removing the
> SimpleAF solved the issue.
>
> Cheers,
> Francois
>
> --
> View this message in context: http://n2.nabble.com/Slow-autofocusing-compared-to-NIS-Elements-tp4563273p4614694.html
> Sent from the Micro-Manager mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> micro-manager-general mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/micro-manager-general
>

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general