07-20-2009 06:42 PM
Hello, I'm evaluating a USB camera (Mightex) for use as a laser profiling camera with LV8.6. I do not yet own IMAQ or vision toolkits but loaded the NI Vision toolkit to see how it worked. The IMAQ routines, together with the USB IMAQ library, seems to work fine in that I can acquire images and change the vendor supplied image properties. The only thing I need is to get the image into an array format so I can process the images, and I'd be happy.
Here's the problem: I cannot control the output format of the acquired image. I specify an 8-bit monochrome image type but the IMAQ USB Snap routine seems to change the image to a u32 RGB format (although the color is still grayscale since each color of the pixels are identical). That's not so bad except that I haven't found a way to use the standard IMAQ routines to convert the image to an array. I found the colorImageToArray routine in the NI Vision palette but I do not want to spend an extra $2500 for the vison toolkit just for this privilege. Is there something I am missing that would make this camera work with IMAQ alone? Thanks, Rod
07-21-2009 10:57 AM
The IMAQ ColorImageToArray is part of the Vision Utilities Palette given with Vision Acquisition Software according to our documentation here:
http://digital.ni.com/public.nsf/allkb/392E8F10F049918986256A3B005D484A?OpenDocument
-Zach
07-21-2009 11:02 AM
Another thing I forgot to mention is that although you do not need the Vision Development module to use the ColorImageToArray function, you do need it to use the IMAQ for USB driver. This is outlined in the page here:
http://zone.ni.com/devzone/cda/epd/p/id/5030 .
So either way, you will need NI-Vision in order to use both the driver and functions you desire.
-Zach
07-21-2009 11:53 AM
Zach, first I will begin with a thanks for clarifying what VIs are in each software package. It is hard to figure out from the online help what's included where. From your last comment however, I have a complaint! You mean to tell me that I cannot use a USB camera without buying the complete NI Vision Development toolkit?? What the ? Nice way to encourage 3rd party vendors - they make a cool $1k camera but it's going to cost me another $3k to use it with LV? I've been a LV user since v3.1, and I usually respect NI's commitment to supporting hardware, but this is ridiculous. VB isn't looking so bad. Rod
07-21-2009 12:03 PM
Hello,
If you would like to further voice your concerns over this matter, I would suggest that you fill out a product suggestion so that your points can be taken into consideration.
http://digital.ni.com/applications/psc.nsf/default?OpenForm
-Zach
07-21-2009 12:26 PM
07-21-2009 12:30 PM
Hi, Rod,
Fully agree with you.
Anyway, there are other possibilities, how to get images from USB camera.
For example, you can try attached example (just run 00.Grab Test.vi). May be it will work for you (but without guarantees).
Here RGB images coming via OpenCV wrapper and converted to I32 array. Try this.
Andrey.
07-21-2009 01:09 PM
Andrey, thanks for the code. It works. I'll play around with it some more to see if it will do what I want, but it looks encouraging. (And I don't need the IMAQ library? what a shame )
Rod
07-21-2009 01:40 PM
Rod, thank you for feedback. The given code pretty "quick and dirty", for example, with big probability will be crashed if camera not connected, and so on. It was just small exercise with acquisition through OpenCV functions. Later I'll do it a little bit more robust and also will add some basic processing functionality (probably within next two weeks). And yes, IMAQ is not necessary for this 😉 .
Andrey.
07-23-2009 11:40 AM
Hi Rob!
We have been listening to you and the many other users who are using the USB drivers/cameras, and Vision Aquisition Software will officially be supporting DirectShow devices (USB) as part of IMAQdx in the next release. It is already in Beta release.
Take care!