LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

AutoFocus

Solved!
Go to solution

I need some help finding VI's that can adjust a telecentric optical sensor on Zaber hardware on an 3-axis gantry, particularly in the Z direction which utilize passive focusing, and possibly a feature to adjust the focusing window. I was hoping to find a laplacian method or fourier transform, or even a program which determines the entropy of the image.

0 Kudos
Message 1 of 4
(325 Views)
Solution
Accepted by Cochese

This forum post discusses some methods to create a "sharpness score" so that as you move the focusing axis you can determine what the best focus is.

https://forums.ni.com/t5/Machine-Vision/Check-Focus-Of-An-Image-With-Standard-LABVIEW-Functions/td-p...

 

This app note from Zaber describes how to do this with the OpenCV Laplacian function:

https://www.zaber.com/articles/autofocus-example

 

It looks like you could use the IMAQ convolution function (if using the LV Vision Toolkit) or follow Bruce Ammons' method of subtracting a rotated 1D array from itself to look for sharpness.

Message 2 of 4
(307 Views)

Super helpful. Do any of these posts discuss ROI, I know the tool exists in IMAQ or IMAQdx but I'm especially new to this logic and creating a sophisticated program in the time I have does not seem realistic, so I'm wondering if there's available VI's or examples.

0 Kudos
Message 3 of 4
(301 Views)
It depends what form your data is in. If you have a 2D array, you can get a rectangular portion of it just by using the "Array Subset" function.
0 Kudos
Message 4 of 4
(260 Views)