Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

OpenCV on a cRIO

If I write a C++ program using OpenCV that captures and image using a USB webcam and performs a face detection algorithm, how could I integrate that into:

1) LabVIEW VI local to my desktop

2) LabVIEW RT embedded onto cRIO

 

I believe the basic process for 1) is that I would create a .DLL file of my C++ code, and LabVIEW can simply call this file?

 

For 2), I'm not sure how to go about packaging OpenCV into something that the cRIO can deal with.

 

I don't have any LabVIEW code written at this point, I'm merely at the conceptual stage. My C++ code is written and works fine from a desktop environment, but my end game is to get that onto the cRIO if possible.

0 Kudos
Message 1 of 6
(3,951 Views)

1) LabVIEW VI local to my desktop:

 

You are correct.! You need to call OpenCV functions in LabVIEW using library (DLL)

For that you can google or refer links on NI

http://forums.ni.com/t5/Machine-Vision/Using-OpenCV-library-in-LabVIEW/td-p/648429

2) LabVIEW RT embedded onto cRIO

I haven't done this before but the behavior on RT could be different.

Reference link:

http://digital.ni.com/public.nsf/allkb/D016E3CA63A3786E86257C6F000579DF

0 Kudos
Message 2 of 6
(3,924 Views)

NI Vision OpenCV Utilities will help you to integrate OpenCV and NI Vision in cRIO (or any other NI Linux RT based system)

 

Here is the link

NI Vision OpenCV Utilities

 

Following things comes with package

1. LabVIEW examples

2. C++ Examples

3. User Manual

4. Prebuilt binaries for Windows and NI Linux RT

 

By the way, one of the example does face detection 🙂

 

Thanks,

Antony

0 Kudos
Message 3 of 6
(3,873 Views)

Thanks for the info, those are definitely helpful. I was hoping to be able to build OpenCV into an application without the NI Vision Package, but it doesn't seem like that is practical.

0 Kudos
Message 4 of 6
(3,855 Views)

The package will help you to intergrate NI Vision Image to OpenCV Mat and complex LabVIEW arrays to C++ arrays. 

 

If you want to completely ignore NI Vision (Vision Acqusition and Vision Development Module) then you can only make use of pre-built binaries and LabVIEW array interfaces.

 

You can also build the application just using Vision Acqusition Software. Vision Development Module is NOT mandatory.

 

 

 

Message 5 of 6
(3,850 Views)

May be, I did not understand your comment. Did you mean, you want to build a application without NI Vision OpenCV Utilities?

0 Kudos
Message 6 of 6
(3,849 Views)