From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Measure contrast of image in real time

Hi, im working in a project with a microscope with a camera and a positionig table. I want to make an autofocus and i have read that it can be made with the contrast of the image but i dont know how i can get the contrast of the cameras image. I´ve the vision adquisition extension. 

Thanks. 

0 Kudos
Message 1 of 2
(1,217 Views)

Hello,

 

As I understood from description You need to build a vision application where the distance from the camera to the target is changeable. You can determine the best focus using software. Basically, take a series of images at different focus positions and analyze them to determine the best focus. Typically, the analysis is an edge detection followed by an image quantification. You can look at the mean value or the standard deviation of the edge intensities, and a peak value is the best focus.

 

And also You can find info about Detect Quality of Focus on a Camera here.

0 Kudos
Message 2 of 2
(1,131 Views)