05-04-2009 07:36 AM
I have a pixelink camera that when I run through the IMAQdx vi's, it produces a BW image. When I view the image, I can select from the palette bar when I right click on the image out display and select rainbow, temperature, etc....but I can't save these colored images. I'm guessing that the image out viewer converts the U8 image into a RGB image for display. I would expect that there would of been a VI (or maybe there is and I haven't seen it) that would do this task and allow you to save the image as a RGB. Is there a VI to do this?
Thanks,
guilio_2008
05-04-2009 07:49 AM
There's a function in LV to convert color (U32) into RGB : "Color to RGB.vi"
You can find this VI in the function palette : Programming > Graphics & Sound > Picture Functions > Color to RGB.vi
Best,
J.
05-04-2009 09:04 AM
guilio,
It sounds like you would like to save a bitmap of the image rendered in the control when viewing one of the mappings - temperature, rainbow, etc?
If you have access to the NI Vision Development module, you can use IMAQ GetPalett.vi to generate the R, G, and B lookup tables to remap pixel values to render temperature or rainbow. You can then use IMAQ ReplaceColorPlane.vi to combine your R, G, & B planes into an RGB image, and IMAQ Write File 2.vi to write your file as a bitmap.
-cb
05-04-2009 09:06 AM
05-04-2009 02:38 PM
I tried doing just the pallette, but it doesn't change the image when I have on front panel. I'm guessing you need to use the open image window to get this working? Any examples?
Thanks,
guilio
05-05-2009 11:10 AM - edited 05-05-2009 11:11 AM
Do you have the NI Vision Development Module? If so, this sloppy little bit of code will let you change an image palette on the fly, then save out a copy of the color image you see. You can also choose a user defined palette and create your own palette with the color ramp next to the window.
-root