05-31-2009 10:55 PM - edited 05-31-2009 10:58 PM
I am a beginner with IMAQ functions and graphic concept.
I am using IMAQ to save an numerical array to image not to acquire image with camera.
1) What is a difference between color palette and lookup table? please explain shortly.
2) By using imaq write image.vi, I saved I16 array to Tiff(I16).
Is the color palette consisted of 256 RGB array elements regardless of image data types(U8, I16 or I32)?
3) How to control the color palette in various ranged data?
For example, -32000 in I16 can be represented in dark black(absolute color in I16) or white gray(relative color with other data) in some cases.
4) is it one of best ways to obtain the (RGB) color palette array by conversion of (Color value) color table from "intensity graph" z scale?
or other?
5) Actually, my raw I16 data were obained from DAQmx 16bit card. I would like to check really if 16bit array and tiff 16bit should represent whole data without loosing the precision of analog input of DAQmx. Sometime, I found my great misconcept in interim stages.
Does it mean I don't have to use DBL data type (but SGL data type) to save hard disk or memory's capacity?
labmaster.
06-01-2009 05:11 PM
Hi Labmaster,
First, from my understanding, you'd like to acquire data from your DAQ card, then convert this data to some kind of colormap, is this correct?
This link provides some information about lookup tables: http://digital.ni.com/public.nsf/websearch/F64F223FDC2D15DD86256F480064FB26?OpenDocument
From my understanding, the main difference is that lookup tables are applied in hardware, and color palettes used on the software side.
The color palette should be 256 RGB elements, regardless of image data type.
When you are looking at these images, are you viewing them within LabVIEW or in another program (such as Adobe or another picture viewer?) Other programs typically do not support the 16bit images.
I do not understand your fourth question- could you please clarify? Are you using a specific VI to convert the color value from an intensity graph?
Finally, I don't see why you would be losing any resolution going from a 16bit array to a 16bit tiff file. To be sure, I would convert the array to an image, then convert that image back to an array and compare it with the original array to ensure that you are not losing any data.
Please let me know what questions you have from here.
06-01-2009 08:53 PM
Thank you Marti,
Regarding to 3) and 4), I would like to write my custom color palette in various situation.
Sometime, I need an absolute color palette (black->white or color) or relative representation (user defined) of specific range of data.
But I don't know how to prepare the RGB color palette.
Anyway, my trial was not in success.
Would you please let me know again how to prepare user defined color palette?
For example, I want to write color table information to tiff as the attachment.
but output is still gray in color not blue.
labmaster.
*) Labview 8.6 and IMAQ development module
06-02-2009 11:26 AM
Hi LabMaster,
I took a look at your code, and noticed that the color palette that you end up wiring to the input of the IMAQ Write File is actually black. If you wire an indicator to the color palette input you will see that it is zero. I have been trying to get that blue color as the color palette with little success. It seems that within the for loop, the RGB to color VI has values; however, outside of the for loop, I'm getting that the array is zero. Have you had any luck with this yet?
Cheers,
Marti C
06-02-2009 01:10 PM - edited 06-02-2009 01:13 PM
I believe the converted palette represent blue color.
In my example, the color palette is an array (256 elements) of RGB.
Did you check this?
What is the color palette's requirement? only 256 or more elements of array?
I still didn't understand why I got the gray scale in black.
labmaster.
06-02-2009 01:32 PM
Can't I use user color palette in 16 bit tiff saving?
final message in the http://forums.ni.com/ni/board/message?board.id=200&message.id=22641&query.id=429347#M22641
06-04-2009 12:54 PM
Hi labmaster,
I've been playing around with your VI and have made some headway. Have you tried using the ArrayToColorImage.vi? The problem is that when you are creating the file with the IMAQcreate, you are choosing a grayscale I16. Unfortunately, there is not a color image type for the I16. You can, however, use the IMAQ Cast Image to change the image type.
Another thing that to note is that you are given the option to open a color palette with the IMAQOpenFile. You should try creating a color palette, saving it, then using IMAQOpenFile to open it and apply it to an image.
I'm posting the VI of what I've been working on, I apologize for the messiness but I wanted to give you an update.
Cheers!
06-05-2009 12:45 AM - edited 06-05-2009 12:48 AM
06-05-2009 03:32 PM
Hi Sundar,
Could you please describe what you are posting?
Thanks!
06-05-2009 09:23 PM
i posted this in the wrong thread.
wanted this to be deleted.
found the option only to edit rather than delete.
kindly request to delete my posting on this thread.