Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Autofocus camera but autofocus is not an option in VBAI 2019

I'm using an Image Source DFK AFU420-L62 autofocus camera with VBAI 2019.  When setting up the camera focus attribute in VBAI, autofocus is not an option.  When using the manufacturer software, I can set the camera to autofocus.  We have multiple systems using the same inspection files.  Since the system aren't perfectly identical, focusing has become an issue.  This is why we went with an autofocus camera.

 

How do we get VBAI to recognize this is an autofocus camera?

  • Camera is USB 3.0 and the drivers are current.
0 Kudos
Message 1 of 8
(2,371 Views)

Anyone out there run into issues with the camera attributes before?  NI Support (which used to be better) doesn't seem to understand the question and is no help at all.  Any help would be greatly appreciated.

0 Kudos
Message 2 of 8
(2,291 Views)

VBAI only exposes the standard GenICam attributes, so the camera may be using a non standard command to achieve the autofocus, or it's buried in attribute tree, or uses a non expected name. I would contact the camera manufacturer to find out how to access this feature using standard GenICam attributes.

0 Kudos
Message 3 of 8
(2,289 Views)

Actually Brad, I wonder if this camera is Genicam or USB3Vision compliant.

Looking at the product page, there is nothing about that so I guess this camera is handled by IMAQdx through Directshow.

However, what you said remains true : IMAQdx will only expose what DIrectShow filter gives access to anyway.

The Imaging Source is providing a set of VIs to control this camera.

Maybe the only alternative would be to create a custom VI or plugin for Vision Builder based on this labVIEW driver.

 

Sami

0 Kudos
Message 4 of 8
(2,283 Views)

Good call Sami. If the camera is using a Directshow driver, the manufacturer may not have exposed as many attributes/features using the standard directShow API that their own proprietary API provides.

0 Kudos
Message 5 of 8
(2,279 Views)

Per Brad's advice I contacted the manufacturer and yes, Directshow is the issue.  Image Source responded with:

 

"Unfortunately the auto focus one push is not accessible in VBAI, because the NI DirectShow implementation does not support all properties available by the camera."

 

They did recommend a work around but it involves using their SDK in parallel with VBAI.  I was trying to avoid adding another layer to the program but I may not have a choice.  I'm not sure if it will work since the VBAI camera settings have a focus attribute that may override the autofocus setting from the manufacturer's SDK.  We shall see.

 

Thanks for your feedback guys!

0 Kudos
Message 6 of 8
(2,270 Views)

Your custom step may also need to acquire the image because there isn't a good way to re-use the camera session used by the built-in VBAI IMAQdx Acquisition step. If you're using the Run LV step, you would need to have a "Mode" control for the VI to Init the session (called once), an Acquire mode (called in the Inspect state), and a Close value that will be called once when closing the inspection (i.e. in the Cleanup state). So the Run LabVIEW step would be added in the Setup state, Inspect State, and Cleanup state unless you want a single call to do the init, acquire, close.

 

Hope this helps,

Brad 

0 Kudos
Message 7 of 8
(2,268 Views)

I'm using CVI, but the steps are basically the same.  You bring up a good point and a good idea.  I could acquire the image using the manufacturer's SDK and save it as a temp image.  The VBAI inspections would then read the image file instead of accessing the camera directly.  I would only have to update one step in each inspection sequence then.  That may be the way to go.

 

Thanks again Brad.

0 Kudos
Message 8 of 8
(2,264 Views)