Using LabVIEW with OpenCV DLL & C DLL

3 posts / 0 new
Last post
Offline
Last seen: 6 years 4 months ago
Joined: 08/07/2018
Posts: 1
Using LabVIEW with OpenCV DLL & C DLL

I have developed C++ DLL by using the C wrapper that is used for various languages. At present, I can use in Python & C#. I have to find the way to read it in same in LabVIEW.

I use visual studio have installed OpenCV on c:\ added include directory and the .lib files for my project,  & I have created a variable in my DLL and I use that during #include <opencv2/core/core.hpp>.

The problem is when I create a node "Call Function", after setting outputs/inputs there the problem arises LabVIEW can't find the DLL associated with OpenCV

 

 

 

Ismael Mendez's picture
Offline
Last seen: 10 months 4 days ago
Joined: 07/03/2017
Posts: 74

HI isabejason

I don't understand your issue. Is your issue related with the DDS Toolkit or any DDS functionality? How is the Toolkit involved? Could you please be more elaborate?

Regards

Offline
Last seen: 1 year 11 months ago
Joined: 01/24/2023
Posts: 1

In order to use your C++ DLL that includes OpenCV in LabVIEW, you will need to ensure that the correct version of the OpenCV DLLs are also present on the machine where you are running LabVIEW. You will also need to ensure that the correct paths to the OpenCV DLLs are included in the system PATH environment variable. Once you have done this, you should be able to successfully call the functions in your DLL from LabVIEW using the "Call Function" node.

Another way to include OpenCV in your DLL is by linking it statically. This means that all the necessary code from OpenCV will be included in your DLL so that it does not need to look for external DLLs at runtime. This will make it more portable and easier to distribute, since the user does not need to have OpenCV installed.

You can also use a wrapper library to connect the DLL with LabVIEW. The wrapper library should contain a header file that exposes the Python & C++ functions you want to use to LabVIEW and a C wrapper that calls the functions in your DLL.

Also, you can use the LabVIEW toolkit called "LabVIEW OpenCV Palette" that can be used to call OpenCV functions in LabVIEW with few lines of code. It should be noted that this toolkit requires OpenCV to be installed on your machine and the correct version of OpenCV should be used with the toolkit.

I hope this will help you.
 
Thanks