07-25-2016 02:11 PM - edited 07-25-2016 02:12 PM
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.
07-26-2016 12:50 AM
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
07-28-2016 03:03 PM
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
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
07-29-2016 08:08 AM
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.
07-29-2016 08:54 AM
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.
07-29-2016 09:04 AM
May be, I did not understand your comment. Did you mean, you want to build a application without NI Vision OpenCV Utilities?