Save grayscale as Rainbow

Hello

How can I save a sgl in grayscale as the Rainbow?

I analyze the image to grayscale, but for the presentation, I need to show it in the Rainbow.

my code does not work, however

This turns out be a "deep" enough question that penetrates in many subjects, not particularly well covered in the documentation of the IMAQ (or not always as accessible as one would like).  There are several related subtopics:

  • Display Images in grayscale on the screens of PC 'normal '.
  • Efficient "colorization" to the image in grayscale.
  • Use of Tables (LUT) in the Image colorization.

On several occasions, I've tinkered with elements of this problem, but never quite "understood."  However, some comments and messages by Hatef Fouladi and some research around the Documentation of Vision LabVIEW has led me to a better understanding of this issue and a "partial" solution (I call that because he could not directly answer the question posed by the original poster).

I will start your indulgence - as well for myself, my students and this Forum, I want to try to provide some of the 'missing Documents', which will need about a day or two of work.  I can tell you that I have a provisional working routine that can take a 'gray gradient", and after applying the 'Rainbow' LUT, turn it into a PNG that... looks like a rainbow.

But the drafting of this response and is about to "apologize" to make you wait, I realized that I had, indeed, 'colorized' my Image (as verified by the on-screen display), I had forgotten that the goal was to save the PNG image colorized.  Then I added the function Write PNG, saw the entrance of the "color scheme" and said: "Hmm, I wonder...". ", which brings me to this:

I chose to work with Images in grayscale U8.  A note of hard to find here, from the manual of Vision LabVIEW 2010, explains that the PC screens can show 256 gray levels, so U16 Images must be 'remapped' to a range of U8 before visualization in grayscale.

The nested for loops generate a 128-by-128 pixels "grayscale, with 0 (black) in the upper left and 254 (white, almost) lower right."  This is the Image I want to use, write it as Gray.png.  The IMAQ write file 2 (IMAQ functions changed a few years ago, many taking a suffix '2') has a Color Palette and IMAQ entry provides some standard LUTs (that he calls "Pallets"), including "Rainbow", using IMAQ GetPalette.  I plugged this place to a second function write file 2, and the results are presented below.

I still intend to write this to the top again, but this "solution" is so simple, and explain what I hope is already sufficiently complex, I can take a little more time to "do things."  I'll (eventually) post here (or, at least, these are my good Intentions).

Bob Schor

Tags: NI Software

Similar Questions

  • Publisher 2007 when I save as PDF, the red color becomes grayscale.

    I created a document in Publisher 2007.  I used the font color to red and saved.  When I then its ved to PDF or XPS, red font converted to grayscale in PDF and XPS.  No idea how to solve this problem?

    Hello Rburla,

    Welcome to the Microsoft Answers Forum!

    I suggest to change the color of the text in the Pdf file by accessing the properties bar by pressing Ctrl + E and change the color of the text that is selected according to the needs and save the file and check if it helps.

    For more information about how to convert publisher to pdf files or xls files, please see the links below.

    Save a publication as a PDF or XPS file

    http://Office.Microsoft.com/en-us/Publisher/HA100649921033.aspx

    http://Office.Microsoft.com/en-us/Publisher/HA100643861033.aspx

    How to create a PDF file in Publisher

    http://support.Microsoft.com/default.aspx/KB/302835

    If the problem persists, you can post your question in the Microsoft Office community for best results. Please visit the link below to find a community that will provide the support you want.

    http://www.Microsoft.com/Office/Community/en-us/FlyoutOverview.mspx

    Please get back to us if you have any other questions.

    Thanks and greetings
    Mir - Microsoft Answers Support Engineer
    Visit our http://social.answers.microsoft.com/Forums/en-US/answersfeedback/threads

  • How to save a file as a non compressed TIFF in grayscale at 300 dpi or more?

    I need to save a file as an uncompressed TIFF in grayscale at 300 dpi or more for a photo for a magazine entry.  How do I do that?

    Use Image menu > Image size in the image size dialogue box uncheck resampling and enter 300 in the resolution field and click OK.  Note No pixel is modified that the resolution setting change.  The use of son Menu > save as in the record that the use of the file dialog box type pull down and select Tiff, and then click Save

    Click OK in the dialog box Option Tiff in the Compression of the Image the value None section.

  • Display/save image in 8-bit grayscale

    I have a VI that captures an image in grayscale 8 bits (table 1 d of 1500 pixels). It has a 10-byte header that I remove and try to view it.  The problem is that the image is considered to be a RGB.  In addition, the saved image can be opened with an image viewer but is not correct.  The pixel data is missing. How do I get this to display an image in 8-bit grayscale.  I would also like to duplicate the 1 line of the image to about 50 lines data to make it easier to observe.  using a loop and indexing the line only leaves the empty pxmao.

    Bjoles,

    You are missing a color table entry to your flatten pixmap block. See extract vi I have attached. Also, I found that building the tables of a loop is a quick way to do it, Labview seems to pre-allocate memory correctly.

  • How can I save images in 16-bit grayscale in Labview without IMAQ

    Hi, I'm trying to record images in grayscale of 512 x 512 16-bit of the camera for each period of time (eg. every 5 sec) and also display them in the control panel in the corners.

    However, I can get a bunch of pictures of bluish and greenish rather than gray ones. Please give me some advice. I really appreciate it.

    Please see the attached VI. Thank you.

    I would simplify the gray color table code:

    Then, you must map the values 16-bit to 8-bit of the display values.  Right now you are just forcing to U8-U16 table which is likely to smudge the highlights.  Instead, you should find the table max and min and scale the entrance so max-> min scales 0-> 255.

    (x min) /(max-min) * 255

    Whimsical programs do not use a linear, but it's a good start.

  • The image passes grayscale when you save or print preview Postscript/PDF but the text remains in color?

    It is in color, until I have turn on overprint preview, or try to save the booklet in Postscript or PDF format.

    In print preview or when you do everything above, it goes gray scale but the text and rectangles are in color?

    The images have been placed as eps files from Photoshop and have been duatone in PS.

    Help, please.

    You and all those who have contributed, thank you.

    The problem is that the files were not CMYK Pantone color library, they were the nuances I had made myself were not recognizable to the printer.

    I can't say why we are forced to use eps or Postscript files, as far as I know is that I have to follow the guidelines directly or it will result in a failure. It is a strange Bachelor of Graphic Design.

    Thank you all, the problem has been resolved.

  • How is an image in 16-bit grayscale in LabVIEW without IMAQ important?

    Hello

    I am writing a simple demonstration of Imaging for a camera to infrared imaging IR-160 of Solutions. I do not have IMAQ and unfortunately, there are no funds at this stage. (If the demo is successful, funds may become available.) I have LV 8.5.1, complete edition.

    The camera creates 16-bit grayscale images, but the format of the image is not well documented. I know that the image is 160 pixels pixels wide x high 120, that gray values are stored as simple bytes (not ASCII), and that the data format is 16-bit signed words, the most significant byte first.

    I attach two sample images (8 bits and 16 bits) and two live test.

    I am able to read the image, but instead of shades of gray, everything is blue, and there are artifacts in the upper part of the image.

    The camera also creates 8 bits to the pgm format images, but I have the same problems there. (The image of pgm opens well in for example, corel paintshop pro.).

    What should I do so that the image appears in grayscale, then save it as a bitmap?

    Thank you for your help.

    Peter


  • Convert an image to grayscale 10-bit color

    Hi all

    I am a programmer of experience of labview 8 years, but new to the procession of the image or NOR-Vision. And now, I came to a problem with the conversion of the image.

    I have an image acquisition card that acquires 1 k * 1 k 10-bit grayscale image, I saved the image acquired in *.raw (binary) format, and now I have to convert these images to bmp (jpeg, png, or diff) format. When I try to use the VI "Imaq save 2", I got an error saying something like "unsupported image type. After searching this forum, it seems that if I have to use an image of color type save as bmp format, but to receive my 10-bit RAW files, I first need to create an image in grayscale U16. So, how can I solve this problem?

    Thanks for your suggestions!

    My guess: you're referring to the 'writing IMAQ 2.VI of the file' as I do not know everything "IMAQ save...". Screw.

    The 'writing IMAQ 2.VI of the file' does not support writing 16-bit BMP.  You can take this information among image types supported this VI, see here.  Look at the pictures above, the designation of VI: 'IMAQ writing file BMP 2' says that he accepts "U8" and "RGB32 image types.

    Proposal: Write a PNG image.

  • Save to PNG using IMAQ file write file does not save good Gray Scale

    Hi - I have a simple VI which reads a raw U16 file and then try to save the option IMAQ write PNG file (because I want the 16-bit format).

    I defined a custom color table which is just opposite of gray, and this is applied to the image.

    The Image displays properly, but saves the PNG file with non-inverted grayscale.

    U16 RAW file is titled "Martha 1849-02-001-6 - view0000_raw_grey_16bit.raw' and sent to ftp://ftp.ni.com/incoming. "

    How is it and how do we get this working correctly?

    Thank you

    Don

    DonRoth wrote:

    I defined a custom color table which is just opposite of gray, and this is applied to the image.

    No! your custom color table to display the images, not apply to the image.

    In additional, it cannot save the palette as well as the 16-bit image. The pallet can be stored with 8-bit 'indexed' image.

    What you can do - if you need just reverse gray, use IMAQ opposite to calculate the negative value of an image.

    Andrey.

  • Save image 12 bit < with > imaq

    Following a previous question, I've done here, I discovered that I am able to install and use IMAQ.

    So I try to do what I need, is to record a 12-bit grayscale with IMAQ image.

    I read somewhere here that more can I go to save as 16 bit - I hope that it will not create problems in the final image.

    in any case, is to know how far I could go - trying to understand works IMAQ:

    (Sorry for the confusion - the lower left part deals with it without imaq, the party is on the right)

    It works, I get a "error-1074396154 occurred at WritePNGFile IMAQ - or the possible reasons: IMAQ Vision: the image is not big enough for that operation.

    -but just for this reason that I have inserted a SetImageSize IMAQ!

    any clue?

    Thanks for any help...

    Alessandro

    I have not installed imaq/SAV/vdm, so I'm going from memory here, but

    (1) you will encounter many problems with memory. you create a new image for each iteration of the loop and never remove. At the very least put an image destroy after imaq functions. The way I have always done things is to create the image once and then just re-use before destroying once at the end.

    (2) I think that your problem is perhaps the fact that you need to explicitly set the type of image in grayscale 16 on the imaq create functions, but I'm not positive

    This article refers

    http://digital.NI.com/public.nsf/allkb/B51CCE62D00112B68625735C0000DDCF

    These

    http://www.NI.com/example/28120/en/

    examples that may help you more

  • Color LaserJet CP1518ni: No option to print in color / grayscale HP Color LaserJet CP1518ni

    My computer recently automatically upgraded to Windows 10 day.  I can't find anywhere is more where I can spend my color to grayscale printer or vice versa.  It only prints B & w now.  I downloaded the recommended printer driver (PCL 6), firmware, etc.  I spent hours trying to find a way print in color!  There is no option in the properties of the printer, printer properties or preferences.  Any help would be greatly appreciated because it's completely frustrating.  This was not a problem in Windows 7 for me.

    Hello @raydunc

    Try this

    Go to devices and printers and right click on printer properties then go to device settings and go almost all the way down to the type of device a color change and save the changes then go in the printer preferences and in the color tab, make sure that in its unaudited grayscale printing option

  • MacOS 10.9 scanner and CM1415fnw won't save what it shows also scanned.

    I have a CM1415fnw all-in-one and was scanning in grayscale controls at 200 dpi and saving to jpg fine under MacOS 10.8.  I upgraded to 10.9 MacOS and the update of Applel because it has been installed.   Now when I'm scanning a check or any document in grayscale or black and white, I see the appropriate document in the overview of the HP software.   However, when I save the resolution is reduced and the right side of the paper is cut.   I can scan as an image color and it will record fine.   I use the IRIS, that came with the software to convert documents in searchable PDF format and that does not work either.   It seems that the IRIS is running, but the document is not available.   The HP software is version 4.0.50 (114).  I can scan with Image capture/preview and save in JPG or PDF (not available) and that works very well.   So the problem is in the HP software when I select send to folder.  I looked for a more recent version of the software, but HP is said to use Apple Updater.    Is there a solution for this.

    Hello ArchieP,

    I understand that you are not able to save your scans correctly since the update to 10.9 Mavericks. I've included the document according to "uninstalling the printer software. Please select the option for 10.9 Mac and follow the steps to ensure that all software are removed for your Laserjet.

    Once the uninstall is complete, I suggest running a check and repair the permissions of the disc on your Mac. I have included the following document "12.x disk utility: repair disk permissions'." The disk you want to check is the MacIntosh HD. Once this step is complete, restart the Mac. When full, the Mac has restarted, please empty the trash. To do this right-click on the Recycle Bin in the dock and select Empty trash.

    The next step is to install the software update Maverick 10.9 for your printer. Please click on the following link "color HP LaserJet Pro CM1415fn MFP series Full Software Solution - OS X 10.9 Mavericks. Then click on the orange download button. Once the download is complete, open the software and follow the instructions on the screen to install the software.

    After the software has been installed successfully, please click on the link following "HP v.2.16.1 for OS X printer drivers." It is of the most up-to-date and current Apple update for HP printers print driver.

    Please let me know if you are able to save your scans after these steps, thank you.

  • How to change my default printer from color to grayscale permanently.

    How can I change my default printer of color in grayscale on a permanent basis.  Because for the most part, I print in black and white, I want this as the default value and then can change manually, if necessary, when I want to print in color.  Thank you

    Go to the ORB start and select devices and printers. Right-click on your printer, and then select Printing Options. Here, you should be able to select under gray color and save it...

  • How can I configure my impression by default to be grayscale (color NOT)

    I have a printer HP LaserJet CM1415fnw on a wireless home network.  We have a mac, macbook and 2 windows based computers.  I don't want the printer to automatically print in full colour.  How to set the default value of shades of gray or black ink only?  I've looked everywhere!

    Thank you!!

    We must have the full software installed on each computer to get this functionality.

    To set levels of gray:
    Open the printing preferences for the CM1410 driver that installs for this printer
    * Click the color at the top tab
    * Click on printing in grayscale box
    Save the options and try printing

    I would like to know how this happens.

  • I am trying to print in black and white to save the ink color on a officejet 6500 has

    I am trying to print in black and white with my hp officejet 6500 a. I use a macbook with safari.

    Can you help me?

    Hello

    1. Open the file woiuld you want to print, and then click file > print.
    2. Look for and click on the area of selection below, known as the name of the Application (e.g. Safari) ot Copies & Pages in MS Office print dialog box.
      You may need to dedicate the printing options by clicking on the arrow next to the name of the printer for Mac OS 10.6 or by clicking on the button show details for Lion.
    3. Click on Paper Type / quality.
    4. Click on the arrow beside Color Options to spend the color options.
    5. The value of color to Grayscale.
    6. Now you can set like quality or using black ink only.

    You can save your settings for future use by clicking on the preset selection box.
    Then, you'll be able to easily select from the presets list

    Please let me know of any questions,

    Shlomi

Maybe you are looking for