Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I stream video from a DirectShow camera into .NET with VDM 2009?

Solved!
Go to solution

Hello,

 

I need to stream video at 30fps from a non-NI DirectShow firewire camera into a .NET C# program with VDM2009.  I was told that this functionality was not available in VDM8.6.4 but was new in VDM2009, however, I cannot find any examples or documentation.


Can someone please provide a simple example to get me started?


Thanks,
Neville 

0 Kudos
Message 1 of 11
(6,405 Views)

Hi Neville,

 

If you install Vision Acquisition 2009 it includes several good C# examples for acquiring from cameras using IMAQdx. Since

DirectShow is now natively supported, any of those examples should see the camera and acquire images.

 

Hope this helps,

Eric 

0 Kudos
Message 2 of 11
(6,391 Views)

Hello Eric,


Thanks for your help.  I think I have Vision Acquisition installed.  Can you please tell me the path to the examples you're talking about?  I can't seem to find them...

 

Also, do I need to use IMAQdx to use DirectShow?  I've been told that I need to buy a separate runtime license of Vision Acquistion ($419) for each deployed system if I want to use IMAQdx.  Our product can't afford that additional license fee.

 

Thanks,

Neville 

0 Kudos
Message 3 of 11
(6,382 Views)

I can see that you have been struggling to do a streaming video using IMAQ. As BlueCheese mentioned, you must use Vision Acquisition 2009 to gain this feature with the new VDM 2009.

 

The dirty approach which is cheap as well is to use a free controls like that offered by Mitov Software:

 

Mitov VideoLAB

 

Eventhough you may experience a minor delay, it will save you from sinking into DirectShow APIs. It is a dilemma that I hope you can tackle someday. Since VDM provides  a high quality solution, I decided that Vision Acquision rutime license would be cost effective for my clients who would make use of this technology.

 

Hope you tackle your peoblem. Have a lovely day.

Waleed El-Badry MSc.,MCPD, ISTQB Certified Tester
Assistant Lecturer
Mechatronics Department
Faculty of Engineering
Misr University for Science & Technology



View Waleed El-Badry's profile on LinkedIn

0 Kudos
Message 4 of 11
(6,373 Views)

Hello Eric,

 

I still haven't been able to find the C# examples that you're referring to, so if you could provide a path, that would be super.

 

NI Tech support said that IMAQdx is now included in the Vision Run-Time Engine/License, so my second question is moot.

 

Thanks,

Neville 

0 Kudos
Message 5 of 11
(6,373 Views)

Hello Waleed,

 

Thanks for your  post.  VDM2009 includes VA2009 and I have VDM2009 installed, so I should also have VA2009 installed (License manager says I'm activated for it at any rate).  So, it looks like all I'm missing is the path to the examples that Eric was referring to.  If you know the path and can provide it, that would be great.


There's a knowledgebase post ( http://zone.ni.com/devzone/cda/epd/p/id/2279 ) about how to do it, but it appears to use the older (non-VDM2009) functions and the older functions don't appear to have new similar-named equivalents, so I'm at a bit of a loss as to how to proceed.

 

I'd like to stream into a ring buffer and then display in an ImageViewer.

 

Thanks,

Neville

0 Kudos
Message 6 of 11
(6,370 Views)
Solution
Accepted by topic author nb1forxp

Hi Neville,

 

On my machine the .NET examples get installed to:

C:\Documents and Settings\All Users\Documents\National Instruments\NI-IMAQdx\Examples\dotNET

 

Eric 

Message 7 of 11
(6,320 Views)

Hi Eric,

 

Many thanks!  I'm not sure I ever would have found that directory on my own.  "Documents" was a hidden directory, so I couldn't even browse to it; I had to type it in manually.

 

Thanks!
Neville 

0 Kudos
Message 8 of 11
(6,314 Views)

I don't know why don't they install Examples in the same program files folder as Binaries and assemblies????

 

Something odd that I may not comprehend Smiley Very Happy

Waleed El-Badry MSc.,MCPD, ISTQB Certified Tester
Assistant Lecturer
Mechatronics Department
Faculty of Engineering
Misr University for Science & Technology



View Waleed El-Badry's profile on LinkedIn

0 Kudos
Message 9 of 11
(6,300 Views)

VBCoder wrote:

I don't know why don't they install Examples in the same program files folder as Binaries and assemblies????


Because of tightened file permissions and Microsoft's recommendations regarding making files/directories that live under paths such as C:\Program Files be writable by all users on the system...
Since the example code should ideally be able to be opened and compiled by a normal user on the system, the directory must be writable by such a user. Microsoft recommends placing such items under the Shared Documents pseudo-path, which is where NI places such things.
To be fair, I gave the actual exact path. Normally you don't access that directly but rather use the pseudo-path I mentioned above that maps to the appropriate location (which is different between XP and Vista, for instance). 
Eric 

 

Message Edited by BlueCheese on 08-07-2009 11:33 PM
0 Kudos
Message 10 of 11
(6,292 Views)