08-03-2009 07:05 PM
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
Solved! Go to Solution.
08-04-2009 08:56 PM
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
08-05-2009 10:52 AM
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
08-05-2009 03:32 PM
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:
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.
08-05-2009 03:33 PM
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
08-05-2009 03:42 PM
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
08-07-2009 10:25 AM
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
08-07-2009 01:33 PM
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
08-07-2009 07:22 PM
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
08-07-2009 11:31 PM - edited 08-07-2009 11:33 PM
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