Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

real time inspections in VBAI with USB camera

Solved!
Go to solution

Hi.

I have to do real time inspections in Vision Builder using a USB camera. Is it possible? In fact, I have found this tutorial:
http://www.ni.com/tutorial/9411/en/
however, it uses a GigE or IEEE 1394 camera, while I can use only a USB camera and for it I did not find any solutions.
Thanks for your help.

0 Kudos
Message 1 of 8
(3,414 Views)

Hello,

 

Any camera that's supported by Vision Acquisition Software is supported in VBAI. Therefore, USB (USB3 Vision or USB webcam) cameras are included.

 

Katie

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

Thanks for your answer. Are there any other files that I can study to make a real time inspection in VBAI with a USB camera besides the tutorial that i have linked?

0 Kudos
Message 3 of 8
(3,390 Views)

The question is how much analysis do you need to do, and what frame rate do you need to achieve?  Simple analysis can take a few msecs, or complex analysis can take a few seconds.  VBAI uses a linear test sequence - grab image, process image, signal results, repeat.  Even with very simple analysis, you are not likely to get 30 or 60 fps.  The amount of time it takes to grab an image can be the limiting factor sometimes.

 

If you really need to analyze images at high frame rates, you will likely want to consider using LabVIEW.  With this, you can have separate loops that acquire images, process them, and output the results.  They can all run in parallel, which greatly increases the throughput of the system.  I have a system that is capable of capturing images at 50 fps and analyzing multiple regions in every image, but it is only possible due to parallelization, which can't be done with VBAI.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 4 of 8
(3,372 Views)

In VBAI the acquisition actually happens in the background so when the acquire step executes it only takes a few milliseconds to copy the image from the driver to the VBAI step. You can also do data logging and image logging in the background as well. I'd recommend seeing if you get the throughput you need with VBAI before jumping to a development environment. Feel free to post sample images and your VBAI inspection if you want pointers on how to accomplish certain tasks. 

Hope this helps

Brad

0 Kudos
Message 5 of 8
(3,364 Views)

Hi, thanks for your support.
I was able to interface the USB camera with Vision Builder.
I have a last question. Can I simulate the trigger mode with a normal USB camera with VBAI?
In fact, the piece to analyse is on a conveyor belt and when it arrives in front of a sensor, I tell to Arduino board to take a photo to the camera and the picture is sent to the pc with VBAI. So, I would like that VBAI does the inspection every time and only when the camera take a new photo of the object. 
The inspection is very simple, therefore, I think do not need to LabView.
Thanks again for your disposability.

0 Kudos
Message 6 of 8
(3,356 Views)
Solution
Accepted by topic author AlbiVal

If you can trigger the USB Camera, you can use the State Diagram in VBAI to keep looping on the acquisition step until it acquires the triggered image. When you launch VBAI, on the splashscreen, choose "New Inspection from Template" under "Configure Inspection".  Then choose the template under My Computer>>"Acquire Image (1394 GigE USB) with Trigger Template".

 

Hope this helps,

Brad

0 Kudos
Message 7 of 8
(3,352 Views)

Thank you Brad! I try immediately. 

Else my usb camera can save images to a specific PC folder with a wifi connection, so I could take pictures directly from the folder as in simulation mode, but would be possible to inspect only the last photo and overlook the other ones already inspected?

0 Kudos
Message 8 of 8
(3,350 Views)