03-23-2011 04:24 AM - last edited on 06-18-2024 01:28 PM by Content Cleaner
Hi, I am having problems using U64 RGB images (raw images from a Canon DSLR camera). I want to extract UNSIGNED 16-bit greyscale information from each colour channel and compare the intensity in each channel. I want to use the full dynamic range of the camera, and I don't want to truncate or compress the images. Colour accuracy and dynamic range is essential because I am measuring light absorption of pigments in polymers.
Using the example VI, "1394 Color-to-Greyscale.vi" from this website, here:
https://forums.ni.com/t5/Example-Code/IMAQ-Color-Image-to-Grayscale/ta-p/3535022
The default setting is to convert the U64 image to a SIGNED 16-bit greyscale image. What this does is it removes half of the dynamic range, so I lose half the information. I want it to be UNSIGNED, and I can't make it do this. Does anyone know how to do this?
My only other option seems to be to convert the image to a string, but this is far from ideal as I want to use the vision tools.
Thanks for any help!
Solved! Go to Solution.
03-28-2011 07:59 AM
Hiya MadScientist (good avatar name, by the way!)
Im afraid that the ease of this application may depend on the version of LabVIEW you are using. I am using LabVIEW 2010, and I was aware that native support U16 images had recently been introduced to the Vision developemnet module - although, Im afraid, I am unable to confirm exactly which version of the module introduced the U16 support.
I opened your .vi, deleted the image type enum constants and recreated them directly from the SubVI terminals. Sure enough, U16 is now a selectable option.
Please see my Front panel, and check out the difference between the U16 and I16 luminance plane.
Please forgive the image I am converting... I did not have a U64 image available, so I had to create my own.
I hope this has been useful,
Best wishes,
03-28-2011 10:25 AM - last edited on 06-18-2024 01:36 PM by Content Cleaner
Hi RER,
Thanks for the reply! Your example shows exactly like what I want to do.
I recently found out about the U16 support problems, someone on another forum told me about it so I downloaded the update, here:
https://www.ni.com/en/support/downloads/drivers/download.vision-acquisition-software.html#306457
Hopefully it should work now. If not, I'll reply to this thread. There is a workaround involving removing the data pixels you don't want using "colour image to array", but I had to output a U64 to view the result (looked like a monochrome red, green or blue image).
MadScientist
03-29-2011 05:11 AM
I just tried the file, but my version of Labview is 2009 so it won't open 😞
03-30-2011 06:17 AM
Hey MadScientist,
I wouldnt worry about opening the .vi anyway. It was very simple, and easy to replicate from the block diagram screen capture I attached in a previous post. If LabVIEW (and the Vision Devleopement module) 2009 are able to support U16 images, you should be able to right click on "Image Type" terminal of a "IMAQ create" SubVI and select create constant. If the resulting enum includes an option for GreyScale U16, you should easily be able to replicate the rest of the code with ease.
Im afraid that I only have access to LV 2010 at the moment, so I am unable to explicitely confirm whether 2009 supports the U16 format. But, it should only take a few moments to comfirm this yourself.
I hope this has been useful.
Best wishes,
09-11-2017 01:24 AM
Hi Rich,
I downloaded your solution and loaded a U64 RGB image.
I am unable to see the U64 RGB image in the image indicator. It is black, however when I hover with my mouse, I can read the pixel values. I can see the images in the Luminance Plane(U16) and Luminance plane(I16) image indicator. I know its a very old post, just hoping that you would see this reply.
Thanks
Regards
Aveo
04-24-2018 12:36 PM
Hi,
was this ever resolved? I'm having the same problem now with LV 2016 and IMAQ.
09-20-2018 11:06 AM
HI Rich,
Please let me know if this is sorted out? I have the same the issue RGB64 image looking black / dark in image viewer.
Regards
Sandy