04-01-2010
10:07 AM
- last edited on
04-27-2025
03:36 PM
by
Content Cleaner
04-01-2010 12:09 PM
Hi Greg,
You have a datalow issue. Your image deletion can run in parallel with the ImageToArray in your code because its only dependencies are the Grab Image VI. This is going to be a problem if the image you are converting is getting deleted at the same time. You probably want to move the error wire so that the deletion happens after the conversion to the array...
Eric
04-01-2010 01:11 PM
04-01-2010 01:24 PM
Greg,
If I recall, the old USB driver would always return RGB images. I'm no expert on ImageToArray, but my hunch would be that it doesn't work with RGB images since the outputs are all grayscale-looking. You likely want to convert the image to grayscale first before converting it to an array.
Eric
04-01-2010 01:39 PM
You said the "old USB" driver. Is there something more recent that I can use with a USB camera? I'm certainly not wedded to those drivers.
Also, would the driver still return an RGB even if the memory location I've created for it is unsigned 8-bit grayscale? That seems odd to me. But I can certainly try using IMAQ Cast before the array function to "force the issue."
04-01-2010 01:47 PM
Yes, IMAQ for USB cameras was never released as a product and was mostly for experimental use by customers. Similar functionality has since been included in the IMAQdx driver (part of Vision Acquisition) and improved quite a bit. It is now has first-class support in all applications that use our drivers (MAX, Vision Builder AI, etc).
All of our drivers will change the source image into a type that matches what the camera is returning, so the type you create it with will not necessarily be what you get out of the driver when you retrieve an image. With IMAQdx, if the driver for your camera supports it, IMAQdx can get monochrome images from the camera rather than RGB. Otherwise you will still have to convert afterwards.
Eric
04-01-2010 02:53 PM