05-18-2010 10:38 PM
Hello,
This is my first post and I consider myself a newbie with LabView, but I hope I can get some answers. Here it goes.
I have a measuring microscope with X & Y stages driven by drive motors. The CCD camera and objective lens assembly are mounted on a stage with the focus (Z-stage) and magnification stage driven by step motors.
My objectives are the following:
-Add autofocusing capability to my existing VI, such that the image will focus on a user selected region of interest (ROI).
-Calculate the depth between two part features that appear in separate ROIs.
Any assistance would be greatly appreciated!!!!
Solved! Go to Solution.
05-18-2010 11:21 PM
My first bit of advice: Only post your question once. Repeated posts are annoying...
The first step is to select a method for measuring the focus. Over the years several methods have been posted to this forum (search the forum!!!). My favorite is to find edges, then use quantify to get the standard deviation. It is a fast and accurate focus indicator, and it will work fairly well on ROIs as long as they aren't too small.
The second step is to develop an algorithm to figure out where your best focus position is. The simplest method is to take pictures at a series of Z positions, then measure the focus in each one. Typically the measurements will behave like a parabola, where the best focus is at the peak of the parabola. If you don't have a peak, you haven't reached the focus position yet. Once you know about where the focus position is, you can move in smaller steps until you get a precise value. Depending on your application, there may be other algorithms that could get there faster.
Once you have focused on the first object, record your Z position. Focus on the second object and record the difference in the Z positions. That is your depth difference between the two objects.
Bruce
05-19-2010 04:17 AM
A tricky zoom calibration I have seen on a professional optical 3D MC (probably patented, however for educational use.... )
place a beamsplitter after the zoom optic with some known cycles (DIA) light by an LED
If your targets don't have a lot of contrast: Use your beamsplitter for light injection to inject a light pattern with a very low focus length