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.

Tags: NI Software

Similar Questions

  • How to convert an image to grayscale 8 bits unsigned 2D table

    Hello.

    The "Color Utilities' Vision Development Modulde function contains the ColorImageToArray IMAQ, who only has the 32-bit unsigned integer as output values. Y at - it an option to reach a value of the integer not signed 8 bit at the exit?

    Please check this box. what you did is not correct (according to me).

    -Please use formulations appropriate for the types of images

    32-bit color

    8-bit gray

    -Intype casting you use RGB (U32) conversion, Image type should be grey it according to your requirement. If the image is in color, why do you need cast once again he in RGB?

    -After plan color extraction, it is no more color(32bit) of image. There is no point in using image color table. use IMAQ image for table instead.

  • Convert an image to grayscale in C

    Hello. I want to convert an image, acquired by webcam, grayscale in C, using myRIO. I have a webcam connected to myRIO, working on simple image acquisition, but I can't find a way to convert the image to grayscale. I get no error to the building or a run Configuration.

    It's the image is written in the file: (black)

    The code is here:



    #include "MyRio.h".

    #define CAM_NAME 'cam1 '.
    #define CAPTURED_IMAGE_PATH ".» "/ capturedImage4.png".

    #define WINDOW_NUMBER 15 / / number of Image display window
    #define IMAQDX_ERROR_MESSAGE_LENGTH 256

    bool Log_Vision_Error (int valeurerreur);
    bool Log_Imaqdx_Error (IMAQdxError valeurerreur);

    int main (int argc, char * argv)
    {
    #if 1
    Status of NiFpga_Status;

    printf ("\n + ImageAcquisitionAndDisplayExample \n");

    Image * captureImage = NULL;
    Image * processedImage;

    Session IMAQdxSession = 0;
    /*
    * Open the myRIO NiFpga Session.
    * This function MUST be called before all other functions. After this call
    * is complete the myRIO target will be ready to be used.
    */
    status = MyRio_Open();
    If (MyRio_IsNotSuccess (status))
    {
    return the situation;
    }

    Create the Image buffer
    captureImage = imaqCreateImage (IMAQ_IMAGE_HSL, 0);
    processedImage = imaqCreateImage (IMAQ_IMAGE_HSL, 0);
    imaqSetImageSize (processedImage, 640, 480);

    Log on to the selected camera
    If (Log_Imaqdx_Error (IMAQdxOpenCamera (CAM_NAME, IMAQdxCameraControlModeController, & session)))
    Goto cleanup;

    Acquire an image
    If (Log_Imaqdx_Error (IMAQdxSnap (session, captureImage)))
    Goto cleanup;

    Process the image Captured here.
    Grayscale

    If (Log_Imaqdx_Error (imaqExtractColorPlanes (captureImage, 1, NULL, NULL, processedImage)))
    Goto cleanup;

    Write the image captured in the file
    Log_Vision_Error (imaqWriteVisionFile (processedImage, CAPTURED_IMAGE_PATH, NULL));

    cleaning:
    Log out of camera
    IMAQdxCloseCamera (session);

    Have the image
    imaqDispose (captureImage);
    imaqDispose (processedImage);

    printf ("\n--ImageAcquisitionAndDisplayExample \n");
    return 0;

    status = MyRio_Close();
    #endif
    }

    bool Log_Imaqdx_Error (IMAQdxError valeurerreur)
    {
    If {(valeurerreur)
    errorText tank [IMAQDX_ERROR_MESSAGE_LENGTH];
    IMAQdxGetErrorString (valeurerreur, errorText, IMAQDX_ERROR_MESSAGE_LENGTH);
    printf ("%s \n", errorText);
    Returns true;
    }
    Returns false;
    }

    Print the VISION Error Message
    bool Log_Vision_Error (int valeurerreur)
    {
    If ((valeurerreur! = TRUE) & (imaqGetLastError()! = ERR_SUCCESS)) {}
    char * tempErrorText = imaqGetErrorText (imaqGetLastError ());
    printf ("%s \n", tempErrorText);
    imaqDispose (tempErrorText);
    Returns true;
    }
    Returns false;
    }

    BoKnows wrote:

    Does not include the LabVIEW code you posted anything to send the image to a file.  I'm curious to know if we run out of questions at this point.  If we comment out code to convert grayscale, writing original image to the file properly or you didn't post in events where you say it works?

    I guess that LabVIEW code, you have published work to complete the task.  It's a little different from what I posted.  But I am not too concerned about that as long as things are working.

    The code works now. The problem is there:

    If (Log_Imaqdx_Error(imaqExtractColorPlanes (captureImage, 1, NULL, NULL, processedImage)))

    Instead of Log_Imaqdx_Error, it must be Log_Vision_Error.

  • Convert image to grayscale in monochromatic color (CS4, Win7)

    Photoshop CS4, Win7: What is the best way to take a grayscale image and convert it into monochromatic color?  I've done this before, but after I change the mode to grayscale to RGB color, I can't rememeber stage next and how to choose the base color for the monochromatic version.

    This change in CS5?  Thanks in advance for your help.

    Change the blending mode to normal instead of the hue of the adjustment layer.

    MTSTUNER

  • Convert images to grayscale

    Hi guys, I have a problem for you, experts...
    I inserted a few RGB images in my reports (MS Word, PDF output template); in some cases, I need to convert the image to grayscale.
    Y at - it an option of the BI Publisher that helps me to achieve this goal? Maybe in the same time, or in the model (where I address these images with url syntax: {concat('${OA_MEDIA}','/',//LOGO_AZIENDA)})...?
    Thanks for the help

    The only way I can see this working is now convert 'before' files as Tim States above and then wrap them in a conditional statement that determines which should be displayed.

    Scott

  • How to convert a Tiff image to JPEG without being FORCED to 8-bit color?

    I'm an artist.  I have high quality TIFF images.  When I convert TIFF to jpeg it make me color 8-bit automatically. (Forget about 32 bit - it does not in jpeg format that at all)   The only way that I can return to the 16-bit color is to use the already broken file and bring it up to 16 bits.  IT makes NO sense at all.  Once the jpeg format is broken, how is the world supposed to convert back to the top. ??  So even though it says that you have converted the 16 - bit file, metadata is always about the 8-bit file.

    In addition to en plus de tout all this confusion, an image, for example, in the case of so-called converted to 16-bit, gets a lot grow so even the original Tiff image.  It looks good on the one hand and more exposed on the other.  I guess that's throwing in resolution photoshop fake, I'm good?

    I'm wasting my time with this 16-bit imaginary conversion?

    Is it possible to take the original Tiff image and convert default 8-bit to 16-bit jpeg without value?  I tried all sorts of things.  I even asked my web guy.  My web guy said only 8 bits is unexceptable for printing, same for the web.

    Would this have something to do with my computer and the scanner?

    I have the memory of 8 GB iMAC OS X 10.8.3 (3.2 GHz).

    And I also have a capable graphic arts Epson Expression 10000XL scanner from scanniing to 48-bit color.

    This color stuff is really important!  This is IMPORTANT!  I have files FINE art.  I'm already losing so much quality with jpeg conversion. (which I am required to do for SmugMug, in addition to the compression of all my files of 50 MB or less)

    Anyone who knows anything that could help me would be much appreciated.

    Aloha,

    -Melissa

    First jpeg is 8-bit only it there's no way to register as a 16 or 32-bit jpg, just does not exist. Secondly people print in 8 bit all the time and most if not all web graphics are 8-bit because this is the only way to see because there is no 32-bit or 16-bit monitors to see. All pro monitors are 8-bit monitors.

    If you like on the color range and want the range of colors that provide 16 and 32 bit, so why jpg? Jpg by his own nature throws of color just to compress, why it is popular on the web, because of its small file size not its quality. If you need 16 or 32-bit for what it is, it must be in a format that supports this color depth.

    That being said, that a jpg to 8 bit image displays 16 million colors, 256 shades of red, 256 shades of green and 256 shades of blue.

    Now, here's where I think your information bit is disabled. a jpg image is a 24-bit image that will produce 8-bit red, 8-bit, 8 bits of blue and green.

    8, 16 and 32 channel are not total not the color information.

    If the overall picture was of 8 bits, the image would be gayscale.

  • How can convert 2D image color table

    Hello

    I have a 2d chart and you want to convert into an image.
    but I want a color photo of the Fund.

    that the color of each element corresponds to the picture of the attachment.
    for example if the item in the 2d array 10 color is red.
    and if the item in the table 2d is - 15 color is blue

    Thank you.


  • convert an image to 8 bits in a 1 bit image

    I have the image that are 8-bit grayscale, I want to change a 1-bit image. Could someone show me how to do this. I have no idea how to proceed.

    Hey alang.

    an idea:

  • Hi can someone help me... I try to open my photos of microscope and all of them are just empty black screen while the merged file shows the image. I can't change grayscale in RGB color space (like my single images the info on them is

    Hi can someone help me... I try to open my microscope fluorescnece images and they are all just empty black screen while the merged file shows the image. I can't change grayscale in RGB color space (like my single images the info on them is gray and the merged image color space is RGB)

    Try to update your video card driver to exclude

    Then reset your preferences - with Photoshop CC you can do it in the preferences. Earlier versions require that you press the modifier keys that you launch Photoshop. Ctrl alt shift on Windows or cmd opt shift on Mac.

  • image to grayscale to color

    I have an image in grayscale I placed in Illustrator CS6. I would change the black to a Pantone color - turning it into a kind of Duotone.

    Is this possible or do I do in Photoshop first?

    I found a way "descendant" to do so using the change > > change the colors. But I must first choose to invert the colors, then adjust the balance of color..., then set the color opposite mode CMYK, then invert the colors even once. It is a major concern and will not work with a Pantone color.

    Thanks for your help, everyone.

    -Scott

    If a raster image, simply apply the Pantone color as a fill color.

  • Print images in grayscale with color covers

    I have an Illustrator CS5 document that uses placed images in grayscale on a white background. Everything seems on screen, but when I print the file a warm gray selection border appears around each image. I tried to use a Photoshop native files transparent, the EPS and TIFF files, but the problem persists. I am Mac OS 10.6.6. Everyone knows a similar problem and, if so, how do solve you?

    Thank you.

    Bob,

    If you save as PDF, buttons appear when you open the document in Acrobat/Reader to screen)? If this isn't the case, I think the question is outside of Illy and with the printer (pilot).

    Y at - he interpreted by the printer color management (pilot; you should be able to see under the ownership of the printer or something)? If so, try disabling it.

  • Save Images in 32-bit color

    IV ' e tried many different things to cor

    Rect this problem, but simply, it seems that if I open a new document in Photoshop CS5 in 32-bit color RGB, I can't save it later as a BITMAP/JPEG/PNG or anything web partner. I can just save it as a Photoshop type documents. It is rather frustraiting because I spent hours at a drawing on my tablet, and I had to copy it and passage to a RGB 16-bit color, which also disappeared in my image immencly give the impression it's a glare, in addition to that it also made the summary of the unusable image, it is not repairable because in order to copy the entire image I had to merge the layers.

    Is there really no explanation as to why we cannot save 32-bit color as web ready formats, or even JPEG/png files?

    Cannot save as BITMAP/JPEG/PNG or anything web related.

    Correct, because these formats are limited to 8 or 16-bit per channel integer, and cannot work with 32 bits/channel values in floating point.

    The web is almost entirely 8 bits/channel formats (because there are very few screens that can do more than 8-bit/channel).

    Looks like that confuse you the term often used "32 bits of images" (i.e. 8 bits/channel and channel RGBA) 32-bit/channel.

  • How to convert images to Grayscale black and white

    I don't have a scanner.  When I need to analyze something, I place under a piece of glass and shoot with my digital camera, then transfer the file jpg on my PC.  My "scans" interpreted that way many pages of text n & B, so the jpg that results is enough grayscle; because I do not use an official copystand there are a good amount of shadow in the image.  It is quite easy to desaturate these images so there is no color in them, but there are still a lot of tweaking if I want to remove the shadows and the end upward with an image strictly B & W.  It seems to me that there should be a filter that allows me to set a threshold such that everything above the level is rendered in form of black (or white), and everything else is rendered as white (or black).  If so, what is it?  Thank you.

    Am_I_Lame? wrote:

    each pixel beyond a certain level in an image desatruated in white and the rest black

    Image > adjust > threshold for this. But I am pretty sure that is not what you want, the result will be crap.

    I would use levels to set the white and black points and then curves to increase the contrast. You can do both with curves, but endpoints are not as easy to spot there.

  • 8-bit color?

    You read that right: my VI displays data for 8-bit with colors. Well not exactly with the color, but let me explain.

    I wanted to do a basic image processing and tried as a result of:

    Get a picture of my webcam

    Convert the image to 8-bit

    Transform data 8 bits in an array

    Divide the table with a number (two, three, four, etc.)

    The new Bulletin Board

    However, this causes a flicker on my screen. It appears the normal video with a 8-bit divided by the number, but it flickers back and forth between several modes, including normal view 32-bit color. About one on each flickers of 5 or 6 is a view of the color. Can someone tell me what went wrong here?

    You can create another image of the destination of the image array.  Another option is to click with the right button on the display of the image (front), and then select Snapshot.  Who's going to make a copy of the current state of the image to display.

    Bruce

  • IMAQ flatten image for the 64-bit version of string

    Hello

    I noticed customer odd based on vision "flatten image chain" on labview 64-bit edition. In my program I use flatten image to the string (with compression to JPEG and kind of flatten Image) to compress and send data to another application. I noticed on the compressed image color missmatch. I say red (255,0,0) 32-bit RGB image and I flattened for string and then save this string as a binary JPEG using Write to vi. When I open the file of the picture is blue (0,0,255). It doesen't matter how data is written (big endian, little endian or native) the result is always the same. 32-bit edition Labview, the code worked correctly.

    I reported a bug in the NC and I'm still waiting for a solution to this problem.

    LabVIEW: labview professional development system 2010 32/64 bits (with vision development module) completely v10.0f2 lie

    Systems: labview 64 bit on windows 7 64 bit-> flatten image to string-> false color

    LabVIEW 32-bit on windows 7 64 bit-> flatten image to String-> colors OK

    LabVIEW 32-bit on windows 7 32 bit-> flatten image to String-> colors OK

    A picture of the block diagram that I used to test the conversion is attached.

    See you soon

    Hi 3DVision.

    I think I see the problem... you code looks like he expects that out of "flattening the image of the chain" will actually be a JPG file as a string, because you have chosen to use the JPG compression options. However, this is not the way that VI is intended to be used. It is simply a way to convert an image type of Vision in a string representation which can be easier to haul around (for example via the network, the user file format, etc.). It is a parallel to normal 'flatten' that can be used on any type of data from LabVIEW. The format of this string is the owner and has provisions for storing information that is specific to the Vision images that cannot be represented in the file formats normal image (overlay information, benchmarking, custom, etc. data info). If you are save the string flattened in a file and expects to open as a normal JPG file, it is unlikely to work properly. The only way that it would be guaranteed to work is if you switch to the corresponding VI "unflatten chain. I don't know why it works in 32-bit mode, but it sounds like a lucky fluke.

    For your use case, you probably want to use the VI "IMAQ write the string. This does not give a result string that is identical to the specified file format.

    Eric

Maybe you are looking for

  • A30 - 714 overheating? before turning off.

    Hi, my A30 714 is just over a year, and a couple of months he began to turn itself, maybe due to overheating. It can happen at any time, no similar applications, which can be general purpose, watch DVDs, or burning CD someone can help?

  • Cannot change the rip options in Windows Media Player

    Original title: Windows Media Player I can't see or change the location of the files of torn pieces. I can't change the rip options.  It won't let me change, but when I hit it Ok replys "changes were made not."

  • I'm getting strong feedback on my windows xp netbook. How can I get rid of him?

    I hear a high return on my netbook. I tried adjusting the sound volume, etc. but can't seem to get rid of feedback unless I have disable sounds all the way. Help!

  • Upgrade Vista to Windows 7, need product key

    I have a computer that was originally purchased with Windows Vista on it. I am now anting upgraded to Windows 7 and have a question before doing so. I bought a disc to upgrade to 7 through my University and the disk, it says that you need a product k

  • Call phone app not called in work profile

    A duplicate of this http://supportforums.blackberry.com/t5/Cascades-Development/Invoking-a-Phone-call-in-Work-Profile-ap... In my application I have managed to make a phone call to a number using the native c ++ api in the profile phone as below:BB::