Discussion:
Using OpenCV library in LabVIEW
(too old to reply)
Andrey Dmitriev
2008-02-03 16:40:07 UTC
Permalink
Hi, Goju-Ryu,
 
Its not extremely complicated. All what you needed is to calling OpenCV functions. Theoretically you can call these functions directly from LabVIEW, but then you should figure out how to transfer structures from call to call. I prefer usually to create DLL wrapper, which will be called from LabVIEW, and inside of the wrapper you have to place OpenCV calls.
 
For example how to use Convolution (5x5 fixed kernel - gradient) from OpenCV:
We need to call cvFilter2D in this case.
I will create following code:
<img src="Loading Image...">
In the code above we will send to DLL the pointers of the Src/Dst, LineWidth of each image and Width/Height.
This DLL will be called from LabVIEW like this:
<img src="Loading Image...">
&nbsp;
In the attachment you can found complete source code of the example.
&nbsp;
Best regards,
Andrey
&nbsp;


ConvolutionTester.zip:
http://forums.ni.com/attachments/ni/200/16713/1/ConvolutionTester.zip
Goju-Ryu
2008-02-03 22:10:08 UTC
Permalink
Excelent answer Andrey, thank you very much.
I haven't tested it yet... Just one clarification, the code you wrote should then be created in a .dll, that will then be called in LabVIEW, right?
Thanks in advance.
Best regards!
Andrey Dmitriev
2008-02-03 22:40:07 UTC
Permalink
Exactly. This is call by following chain: LabVIEW&gt;Convolution Test.DLL.dll&gt;CV100.dll (cvFilter2D)
&nbsp;
Andrey.
&nbsp;
bc7041
2008-07-14 09:10:11 UTC
Permalink
Dear Sir,
&nbsp;
I tested Convolution tester.
In then, I find error message as follows In the attachment
&nbsp;
Please check
&nbsp;
Sincerely yours,
&nbsp;
Bongchan Park
&nbsp;


convolution_1.JPG:
Loading Image...


DLL.JPG:
Loading Image...


convolution.JPG:
Loading Image...
Andrey Dmitriev
2008-07-14 09:40:08 UTC
Permalink
Hi, Bongchan,
Just downloaded and checked it. It works without problem.
But you should have OpenCV library already installed, otherwise you&nbsp;can't use it. Provided DLL is the only wrapper to OpenCV.
best regards,Andrey.
&nbsp;
bc7041
2008-07-15 23:10:09 UTC
Permalink
Dear Andrey
Thank you for your response.
Best regards,
Bongchan Park
&nbsp;
&nbsp;
Der_schorsch
2008-07-27 09:40:07 UTC
Permalink
Bump, Hey everyone, could somebody be as kind as to save this example in a LabView 8.2 Version?Would be much appreciated!George
Tim C.
2008-08-04 18:40:22 UTC
Permalink
Hello
&nbsp;
Do you have any examples of using Open CV with regular LV to detect a face in a picture?
&nbsp;
Thanks
Tim C.

Loading...