01-18-2016 07:51 PM
01-20-2016 06:26 AM
Attached you can find the following samples for opencv (using emgu cv : http://sourceforge.net/projects/emgucv/ 49Meg file)
This is in LabView 15
Opencv image grabber
canny edge
image filters
threshold and contours
HSV image tracker
graphics overlays on video
perspectve transforms on live video
houghlines
houghcircles
find chessboard, calibrate camera with chessboard
3D viewing of a chessboard (+ with a 3D man at cursor location)
2 functions not working - viewing a video (any suggestions?)
Histogram (any suggestions?)
01-20-2016 11:17 PM
Update: CalcHist requires a Vector of MAT instead of a MAT, and the output histogram is of type float..... got it working for 1 channel, but returns nothing for multiple channels (RGB).
Any suggestions?
04-19-2016 07:12 AM
Hy Phillippe.
I've downloaded your zip but i'm not able to use your VI. I've tried with a couple of version of emgu, but when i try to link a invoke note to the dll SCM.LabView.Utils.dll it doesn't work (no method or properties available).
Can you help me?
Thanks a lot
04-20-2016 05:20 AM
Ok, now it works. I've downloaded the cuda version of Emgu (3.0.0).
Tips: To pass data (such as array or 2d array) is also possible to use variant.net object
04-21-2016 10:57 AM
Just would like toi add my five cents here.
Latest NI Vision supported OpenCV. I have no chance to try it yet, but it looks pretty interesting:
NI Developing Vision Applications using OpenCV and NI Vision
04-21-2016 09:56 PM
@Andrey_Dmitriev wrote:Just would like toi add my five cents here.
Latest NI Vision supported OpenCV. I have no chance to try it yet, but it looks pretty interesting:
NI Developing Vision Applications using OpenCV and NI Vision
I noticed this too. It looks as though you still need to write and compile a dll which interfaces between LabVIEW and OpenCV, but at least the support code (for transferring images etc) is provided.
04-26-2016 01:39 PM
Hi Philippe_RSA
Could you save your attachments in LV2013?
I don't have 2015 yet.
Thanks in advance!
09-13-2016 09:51 AM - edited 09-13-2016 10:01 AM
Is there some way to use the SCM.LabView.Utils.dll (maden by Reyn Vlietstra) that attached to the posts of Philippe_RSA
(the first post on the bottom of page 3 of this topic) with ordinary version of EmguCV?
I mean, use it just for ordinary calculations on CPU (not with special CUDA version of EmguCV).
Or, may be, some one have another version of SCM.LabView.Utils.dll especially for CPU?
(or some another good dll-wrapper/solution, etc.).
09-16-2016 09:12 AM - edited 09-16-2016 09:20 AM
@Philippe_RSA wrote:I have finally managed to get OpenCV working in LabView.... with all credit to Reyn Vlietstra.
I previously used wrappers from various people, some on this forum.... all great, but always only a subset of the OpenCV library (e.g. no SolvePnP, InRange and many other functions)
A few steps to using opencv, without wrappers, and full functionality (to version 3, with Cuda) is listed below:
1) download the opencv with .net : I used the version on http://sourceforge.net/projects/emgucv/files/emgucv/3.0.0/libemgucv-windows-universal-3.0.0.2157.exe
I used this one, but there are 3 other variants also.... make your pick
2) I then had to make use of a tiny app made by Reyn Vlietstra such that the .mat can be used as a pointer to data (there must be a more direct way in LabView.... anyone?) this is called SCM.LabView.Utils.dll (attached).
place this in the same directory as opencv above (bin)
3) I then used .net to access all the required functions.
an example is attached.... note all the links to the dll (in the .....\emgucv-windows-universal 3.0.0.2157\bin directory) will need to be refreshed for your specific inatallationn path.
I am not a .net expert, but in 10 minutes managed to create a frame grabber, display the image, and perform a Canny edge detection, and display this also.
example ported to LabView 8.... so it should be quite generic.
Good luck.
This is first post of Philippe_RSA (above). After this he wrote another post with renewed files, and I use new files.
Now I use CUDA version of EmguCV 3.0.0 on the PC with GF GT630, but there is always the same error:
A path to the bin folder is added to the System Path variable (without reboot).
GT630 is just a rebranded version of GT440 (with CUDA compute capability version 2.1).
Microsoft LifeCam VX-3000 webcam is connected to the PC and drivers for it is installed (cam worked with skype fine).
Anyone know where is my mistake, may be, something is missed? Is it right situation, when I see such elements on the Front Panel?
I don't know what is it, don't now anything about .NET or MAT functions (but LV 2015 is installed with NET support).
May be I should change something in the block diagram?
Also there is text from the first screen: "Not working, not idea why".
I don't understand how duxiao and caido987 were able to properly run these examples?
@duxiao wrote:Good job, @Philippe_RSA. I have finished your example and it seems good! But now my question is:how can we transfer 2d array to emgu image? just like IMAQ ArrayToImage.
http://forums.ni.com/t5/LabVIEW/LabVIEW-Datatypes-to-NET-reference/m-p/2551719 maybe give me some help. But still now I cannot get a good solution. Anybody gets good advice?
thanks!
@caido987 wrote:Ok, now it works. I've downloaded the cuda version of Emgu (3.0.0).
Tips: To pass data (such as array or 2d array) is also possible to use variant.net object
Can anyone help me, what I do wrong? is it the problem with Cam
or it is just because problems with SCM.LabView.Utils.dll or something else?
Where I should add new pathes for dll, if it is the origin of problem?
In my case LabVIEW found dll's automatically as vi started, SCM.LabView.Utils.dll and Man.stl were in the bin folder of EmguCV.
The error appear on the first element ("Capture" located after "camIndex" control on the block diagram).
Can someone help to replace this "Capture" element with just some picture readed from HDD to check is it this dll or webcam error?