11-13-2009 08:29 AM
11-16-2009 05:42 PM
Hi Nasgul,
As a quick answer, this example: http://decibel.ni.com/content/docs/DOC-4759 Does what you would like, only in reverse. So, instead of subtracting 32767, you would add 65535. If this solution is too processor intensive, then we can look into your code structure and find a better way to do this (queues, producer/consumer, etc).
Before doing this though, I wanted to make sure that you are using that IMAQ Create, and have the U16 (Grayscale) wired up to the Image Type. If so, then what type of camera are you acquiring from? What interface (CameraLink, Analog, etc)? What version of the driver do you have?
Thanks,
Marti
11-16-2009 06:18 PM
Hi Nasgul,
As Marti indicated, you can do a conversion of the data using something like the link here: http://digital.ni.com/public.nsf/allkb/3C727E03F004EA528625714900706CA0
However, as you pointed out this may not be very fast since it requires modification of every pixel.
Currently the IMAQ 4.3.0 driver (included in Vision Acquisition 2009) does not support directly returning U16 image types. However, based on requests like yours, we will be adding true support into the IMAQ driver to directly return images with a U16 data type in an upcoming release. However, I cannot give any details at this point as to when it will be released.
Eric
01-08-2010 03:46 PM
After a hiatus, this problem has reared its ugly head again.
The issue I am having is as though the conversion in the previous article has already happened - the camera is streaming U16, but it is being read bitwise by LabView as though it is I16, so the 2's complement error is already built in and I need to remove it. I can't conceive of a simple subtractive method to accomplish this - is there a mathematical solution apart from making a pixel-by-pixel adjustment?
The conversion that I'm trying to undo is attached.
01-11-2010 10:56 AM
Hi Nasgul,
I'm not personally aware of a better way to do it, but you might want to keep an eye out for a future release that includes it as Eric pointed out.
01-12-2010 11:53 PM - edited 01-12-2010 11:56 PM
Hi Nasgul,
Upon some further reflection, I came up with a quick hack that will let you "reinterpret" an I16 image into a U16 image without having to touch the pixel data. This should allow you to work around this problem until IMAQ allows camera files to specify an unsigned 16-bit image type.
Please try out my attached file with the following caveats:
-The file will only work on 32-bit LabVIEW versions (8.2+) and is Windows-only. Please let me know if you need RT or 64-bit VIs (I can't make one that does everything without it being 2009+)
-The VI is password protected because it touches some internals in a very ugly way. You really don't want to see the code! 🙂
Let me know how it works,
Eric