10-27-2009 11:54 AM
Hi,
my task is to display/process images acquired from a USB camera using the VDM 8.5, in MSVC++ 2008.
I'm using an ActiveX server routine for snapping images from the camera (into a CBitmap object), and then I store the pixel values into an array. However, the color format of the snapped images is RGB24.
Thus, I cannot use 'imaqArrayToImage()' because VDM accepts color images with RGB32 format (i.e. RGB24 plus the Transparency channel).
Is there any workaround?
Obviously I can go through the RGB24 pixel array and copy each pixel value into a new array that has for each pixel an extra byte (=0) for transparency, but I want to avoid this.
Thanks!
10-27-2009 12:59 PM
Does your USB camera have a directShow interface? If so, I would recommend you try the latest version of the NI Vision Acquisition Software. The latest NI-IMAQdx driver supports acquiring images from DirectShow compliant USB devices. You can download the eval version from here:
http://joule.ni.com/nidu/cds/view/p/id/1393/lang/en
Christophe
10-28-2009 05:59 AM
I think that the latest NI-IMAQdx driver supports USB camera acquisition only for LabView (neither CVI or VC++).
Please correct me if I'm wrong!!
10-28-2009 09:13 AM
Greetings Costas,
I just verified that with Vision Acquisition 2009, using IMAQdx 3.4, you can acquire from a DirectShow USB camera through IMAQdx using our .NET API that installs with Vision Acquisition. NI-IMAQdx 3.4 will see a DirectShow USB camera the same as it sees a GigE camera or a FireWire camera, so you shouldn't have any problems using IMAQdx to acquire from your DirectShow camera in any supported text-based language.
Let us know if you have problems doing this.
Take Care,
10-28-2009 02:53 PM
ok, that's perfect!
one more minor question...the .NET API is in C#.NET , C++.NET, VB.NET, any of them??
Thanks again!
10-28-2009 03:01 PM
> one more minor question...the .NET API is in C#.NET , C++.NET, VB.NET, any of them??
VDM 2009 and Vision Acquisition 2009 provide a native .NET implementation (assemblies) and examples in C# .NET and VB .NET.
-Christophe
10-31-2009 09:41 AM
Ok, thanks a lot,
I guess 'VDM 2009' does not include the .NET API for acquiring from DirectShow compliant USB cameras , right?
11-02-2009 09:10 AM
> I guess 'VDM 2009' does not include the .NET API for acquiring from DirectShow compliant USB cameras , right?
Actually, it does. The Vision Development Module package contains the image processing library API for all development languages and also contains Vision Acquisition Software, the driver software for IMAQ devices, GigE Vision, IEEE 1394 and USB camera. Your serial number for Vision Development module should license Vision Acquisition as well.
National Instruments also give its customers the possibility to purchase Vision Acquisition software separately, for people who are just interested in displaying images, or are not using our image processing library.
Hope it clarifies things.
Best regards,
Christophe