Convert "Grayscale I16" to "RGB U64"

Hello, 
I need to convert an image from Grayscale I16 to RGB U64, but it doesn't work (I have joined a zip file).
I think there is a bug in the NI Vision, or it's not implemented because I have no problem to do it from Grayscale U8 to RBG32. 
Can you help me to find a solution to do that? 
I need to use ReplaceColorPlane function or equivalent because I have to perform various treatments on each layer (RGB).
Thanks
Solved!
Go to Solution.
Attachments:
tests.zip ‏217 KB

Hi Badgones73,
The U64 image is composed of four U16 values (R, G, B and alpha). LabVIEW represents 16-bit images as an I16. When the IMAQ Extract Color Planes is called, the U16 value must be converted into I16 values. This is done by converting all values with a MSB of 1 to a value of 0. This means all the values from 32,768 to 65,535 are now 0. To avoid using losing these values, you must read the image into LabVIEW without using the vision functions.
Once you have extracted the U16 values, they can be converted from U16 images to I16 images. Once this is done, you will be able to use all of the Vision functions.
Also, i invite you to read the information on our website:
How Do I Convert a Color Image to Grayscale?
http://digital.ni.com/public.nsf/allkb/ED42C55C29B9B34C862570A60079952E?OpenDocument
Regards,
Rémi D.
National Instruments France
#adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
>> Les rencontres techniques de NI - Mesures et acquisition de données : de la théorie à la mise en ...

Similar Messages

  • Convertir une image "Grayscale I16" en "RGB U64"

    Bonjour,
    je cherche depuis un petit moment sur tous les forums que je connais, et je ne trouve pas de réponse à mon besoin, à savoir convertir une image en niveaux de gris de 16 bits en RGB 64 bits. J'ai réussi à le faire en 32 bits, mais la dégradation est trop importante pour mes besoins.
    Si vous avez une solution, je vous en serais reconnaissant.
    Si ça peut vous aider, j'ai Labview 8.6 et NI Vision.
    Merci d'avance

    Si vous souhaitez, voici le VI que j'essaye de faire. 
    Il marche très bien en grayscale 8bits => RGB 32 bits, mais pas en Grayscale 16 bits => RGB 64 bits...
    J'ai supprimé tout le traitement que j'effectue sur l'image pour que ce soit plus lisible. Comme j'effectue divers traitement suivant la couche de l'image (R,G,B), je suis obligé de passer par un Imaq ReplaceColorPlane. 
    Merci du temps que vous consacrez à mon problème.
    Pièces jointes :
    tests.zip ‏217 KB

  • Converting Grayscale To RGB

    I am trying to add some B&W photos that I scanned. In a previous post I was advised to convert any grayscale pix to RGB. Is there a way to convert using os x 10.3.9? I think I figured it out in photoshop. When I open the pic in preview and select "get info" the profile reads "sRGB IEC61966-2.1". Is that ok? Someone please help lol. Thanks in advance.

    Yes the sRGB profile is fine.
    Regards
    TD

  • 'Convert CMYK Colors to RGB' still runs havoc in 9! (Plus a PDF version problem)

    This post is to warn people about severe issues, and how to avoid them. Issues with the CMYK color setting in FM9.x have been reported here earlier, such as:
    http://forums.adobe.com/message/1237696#1237696
    http://forums.adobe.com/message/1237852#1237852
    http://forums.adobe.com/message/1237165#1237165
    However, I do not think this issue has been warned about anywhere near as much as it should have. And, as usual, Adobe is silent (they should have a big poster on their site warning about this issue! And they have even claimed that patches have "solved" the issues with CMYK).
    Just recently, while experimenting with FM9 again, I had extreme problems, which, at first, seemed totally unrelated to this CMYK setting. But after having struggled extremely hard for many many many hours, I finally found out. Now is the time to inform others:
    First a note about versions: FrameMaker 9.0p237, Acrobat Distiller 9.1, XP SP2
    It looks perfectly okay on screen in FrameMaker, exactly as in FM8. But when saved as pdf, several things are "corrupted". Examples: no kerning after the letter 'T', such as the word 'Text'. Dotted leader for a right aligned tab disappears. Some objects from the master pages, such as a logo, become enclosed in a rectangle (a border of the frame/object), but it only happens on *some* body pages, whereas other body pages using the same master page are ok!!? Equations are formatted differently from the way they should, with the wrong font for number, etcetera.
    Solutions:
    1. When 'Save as PDF...', untick 'Convert CMYK Colors to RGB' in PDF Setup. Same setting is in the file's 'Format > Document > PDF Setup...'
    A drawback with this method is that, as of Acrobat Distiller v9, it does not seem to respect the pdf version specified in the PDF job Options! I get PDF 1.6 with this method, despite my job option specifies version 1.5. (This happens also with FrameMaker 8 if Acrobat is v9.) So you *have* to optimize it in Acrobat in order to get a web friendly PDF (PDF 1.4 or 1.5).
    or
    2. Print to 'Adobe PDF'.
    In this latter case, you can set the same 'PDF Setup' settings under the button 'Setup...', EXCEPT that there is no tick box for 'Convert CMYK Colors to RGB', and it does not matter what setting you have chosen in the file's 'Format > Document > PDF Setup...', it will be RGB conversion in any case. Make sure that after you exit the setting, the tick box for 'Print to File' is NOT ticked! This method respects the pdf version specified in the PDF job Options! I get PDF 1.5, which is what my job option specifies.
    (For some reason, Acrobat/Reader does not render these two PDFs exactly the same, except in extreme magnification! Maybe it has to do with the different PDF versions of the files.)
    In either case, the solution actually solves ALL problems I listed! Despite it seems to have absolutely nothing whatsoever to do with colors! Some day in the distant future, CMYK might actually work! But, for myself, I would prefer a proper color management instead...
    Best Regards,
      /Harald

    Oops!! Not until now I discover that under 'Solutions' I happened to write 'untick' where it should be 'tick'! I.e, colors SHOULD be converted to RGB in order to circumvent the problems! I.e it runs havoc in v9 when CMYK colors are NOT converted to RGB! Don't know how I came to write the opposite, but probably I started out by describing the situation where the problems are seen rather than describing how to avoid them.
    Equally strange is that nobody corrected me, but perhaps the mistake was so obvious? (But whether you see problems or not might depend on what fonts you use. So, under certain special circumstances, CMYK might actually work without these reported problems.)
    I am also a bit surprised that others haven't reported the issue that the PDF version set in PDF job Options isn't respected when using 'Save As PDF' and Acrobat 9? (Or maybe someone has, but I have missed it.)

  • FM10 Crashes when Convert CMYK colors to RGB selected

    Hi folks,
    I have searched for info on this issue and found a couple of items but I'm still having problems doing what I need to do.
    First off, FM 10 version is 10.0.2.419. PC is Dell E6420 laptop, Win 7 SP1, 8GB RAM, big hard drive. No existing Adobe software before installing TCS 3.0 from local files (copied from DVD).
    At first I could not create a pdf (using File > Save as PDF) at all on this system (my old XP system still works fine with TCS 3.0). Instant crash and error messages (Internal error 10024, 7687848, 7688138, 10076935.). After reading the discussions, I cleared the check box for Convert CMYK colors to RGB, which allowed me to create the pdf. However, my colors are washed out completely. So I need to be able to select this check box without the crash.
    Any suggestions?
    Thanks!

    (1)     Although FrameMaker 10 is a 32-bit application, there was no issue with it running under Windows 7 64-bit. You certainly don't need to run it under any XP mode!!!!
    (2)     There were any number of save as PDF bugs in FrameMaker 10 that were fixed in various updates, but typically they were associated with when one didn't check that convert CMYK to RGB option (that uses the native Windows GDI for PostScript creation).
    (3)     Rather than printing to File and distilling, try printing directly to the Adobe PDF PostScript printer driver instance.
              - Dov

  • I get red pixels in the dark areas when converting duotone images to RGB

    Hi, I have been using Duotone with my photos, but since the other day, everytime that I process a photo this way, when I convert then back to RGB mode, the dark (black) areas of the photo become a kind of bitmap of red pixels. I have tried with many different photos from RAW or JPEG files and I get the same result with all of them. This is an example of the issue. The original is on the left.
    What may cause this? The photo looks good in duo tone. It is when converting to RGB when the corruption happens.
    Thanks

    Not following you:  why are you converting from Duotone back to RGB?

  • Layer got merged after using convert to profile form RGB to CMYK

    Hi all,
    I am converting a print design in photoshop cs5 from RGB to CMYK. My Layer got merged after using convert to profile form RGB to CMYK.
    after this i have save file and close it and i didn't have backup of this file.
    Now Please suggest How do i recover my all layers
    i need only my layers back.....  Please help me

    Sorry bud...but if you converted to CMYK and did NOT hceck Preserve Layers and then saved over your original layered RGB file, your layered RGB image is toast–as in gone, as in you are screwed...sorry, but Convert to Profile can flatten all the layers (depending on the options) and once flattened and saved, you have no option to recover the layered RGB file (unless you have is saved somewhere).

  • When preparing email IPhoto 11 converts images to gneric RGB profile

    I like the new email features in iPhoto '11 ver 9.1.1. The one thing that bothers me is the way some images are converted to the "generic RGB profile." Why not leave them alone in their initial profiles like sRGB or Adobe RGB. If I am sending "Actual" attachments the initial profiles are retained. The problem arises with the smaller attachment sizes.
    BTW Aperture does not convert...

    I'm unable to duplicate your issue. Are you using the new iPhoto 11 email capability?
    Try the following: delete the iPhoto preference file, com.apple.iPhoto.plist, that resides in your User/Library/Preferences folder.
    NOTE: If you're moved your library from its default location in your Home/Pictures folder you will have to point iPhoto to its new location when you next open iPhoto by holding the the Option key. You'll also have to reset the iPhoto's various preferences.
    Launch iPhoto and try again.
    OT

  • Converting grayscale to black & white

    I have a sketched out map of a parking lot that I want to convert to a true black and white. Can someone please tell me step by step how to do this?
    Thanks...

    Curvemeister told you how to convert from RGB to grayscale. And by the way I think the new(ish?) black and white adjustment layer does your trick in one adjustment. Please correct me if I'm wrong.
    Max:
    To move from grayscale to "true black and white" (bitmap), you can use the layer...new adjustment layer...threshold and move the slider. Personally, I like to upsample the image some, as bitmaps have no gray tones to smooth lines out. Your target resolution should be 450-600 ppi at the size you will print. Of course, you can go higher... You can upsample using bicubic smoother and then use the threshold adjustment layer. When you're happy with how it looks, just image...mode...bitmap it and you've got a true black and white.
    Of course if your image is photographic, you might want to turn it into "line art," which is kind of a different thing. If you try the threshold adjustment layer on a photo, you'll see what I mean.
    Be sure to save as, or dupe the file before you begin!
    J

  • Plugins for converting Grayscale to neutral CMYK?

    I've some B&W images that were processed as RGB, turned to Grayscale, and eventually need to be CMYK. They're being printed in a magazine, and it's important that they don't have a weird color cast. I feel a straight convertion from Grayscale to CMYK will put color information back into the B&W image.
    Does anyone know of any plugins that will pull this off effectively? I hear the manual way to go about it is having just the black channel in all highlights and midtones, and some color in the shadows. That gives it  rich depth without any colour cast. I'm not sure how to go about it though.
    Thanks in advance!

    A »dirty« method would be to use a Custom CMYK-conversion (Edit > Convert to Profile) with Maximum GCR and then just use Edit > Assign Profile to attach the proper CMYK-profile.
    Maybe use an Action or Script to automate this.
    Edit: The Dot Gain should be the same as the Grayscale’s.

  • How can I convert (or switch) the RGB percent values from the LR histogram into RGB values which are shown e. g. in PS/CameraRAW?

    In LR 5.5 (same in previous versions) the RGB values in the histogram are shown in percent (relativ) values. I prefere to see the absolute values, but I can`t find any way to switch. Maybe this option is intentional disabled, because LR works in 16-Bit mode this would result in values up to 2^16. But as i compared the relativ values from LR with the absolute values from PS i run into a conversion problem. The following example shows the differences:
    CameraRAW : RGB, 128,0,0
    Lightroom: RGB, 43,8%, 19,0%, 6,2%
    CameraRAW: RGB, 0,128,0
    Lightroom: RGB, 29,8%, 47,5%, 17,5%
    Mainly i have two questions:
    1. Is there any possibility to change the percent RGB values in LR to absolut values?
    2. How can i convert CameraRAW values to LR values (see above)?

    TThe reason that a design decision was made from the beginning of LR to show only the percentage values was that RGB values are dependent on the color space and the LR histogram and numerical readout are derived from the Develop module's display space which is a hybrid color space with ProPhoto RGB primaries and the sRGB TRC. Thus the numerical values in the display would be different from the exported RGB image (in an orthodox space) and it was feared that this would be misleading. When soft proofing was introduced, because it involved converting the display to an orthodox space, it became possible to use the 0-255 scale in that mode.

  • Redistilling PDF some pages have been converted from cmyk to rgb.

    When re-distilling a pdf on certain files, some pages convert to rgb, even though the setting "High Quality Print" in Acrobat is set up leave colours unchanged.
    Same problem occurs on Acobat X, 9, 8 versions.
    Any help or suggestions appreciated.

    Do you re-print them to Adobe PDF printer using Acrobat or use distiller for this.
    In Acrobat once you select Adobe PDF printer click on Advanced option. Click on Color Management. Select -> Same As Source under Color Handling drop down. Having selected "Leave colours unchanged" and Same As Source will not make any change.
    I believe it will work for you.
    ~SaVe

  • Converting Gray Scale to RGB

    Can anybody tell me how to convert a Gray Scale image to RGB image?
    I have written a Code:
    public BufferedImage convertToRGB(BufferedImage input){
    ColorSpace RGBSpace = ColorSpace.getInstance (ColorSpace.CS_LINEAR_RGB);
    ColorConvertOp rgbConvert = new ColorConvertOp (RGBSpace, null);
    BufferedImage output = new BufferedImage (input.getWidth(), input.getHeight(), BufferedImage.TYPE_INT_ARGB);
    return rgbConvert.filter (input, output);
    But this doesn't seem to work.
    please help me
    thanx

    Try this:
    public BufferedImage convertToRGB(BufferedImage input)
    ColorSpace RGBSpace = ColorSpace.getInstance(ColorSpace.CS_sRGB);
    ColorConvertOp rgbConvert = new ColorConvertOp(RGBSpace, null);
    output = rgbConvert.filter(input, null);
    return output;
    }

  • Convert grayscale to colored images

    Hi
    I am stuck with my program.
    BufferedImage gray = new BufferedImage(bi.getWidth(), bi.getHeight(), BufferedImage.TYPE_BYTE_GRAY);
    Graphics g = gray.getGraphics();
    g.drawImage(bi, 0, 0, null);
    g.dispose();using the above code, i have converted a colored image to a grayscale image.
    now my problem is, i want to convert that grayscale image back to colored.
    is there any way to do so?
    please help
    thanks

    I am no expert in this, but I believe that when you lose the color information, it is lost forever never to be retrieved, that the basic premise of your program is incorrect. So, perhaps you can store information on what "filters" were applied (I'm not familiar with this "filter" concept) and in what order, and then after you have completed all the gray image processing, apply these filters to the stored colored image and then save it.

  • Converting a document containing RGB images to CMYK (with a profile)

    Hi,
    I am trying to use PDDocColorConvertPage to convert all RGB images in a PDF document to CMYK (with a color profile).
    I can see the API is performing some changes to the PDF however it is not performing the conversion in the same way as Photoshop or Acrobat.
    Has anyone tried to do this before? Am I doing it the correct way?
    Thanks
    Please see additional details below:
    Input image:
    Converted pdf: http://www.fallenempires.net/misc/out.pdf
    Path = ASFileSysCreatePathFromCString (NULL, CMYK_PROFILE);
        err = ASFileSysOpenFile (NULL, Path, ASFILE_READ, &Profile);
        if (err)
            fprintf (stderr, "Unable to open the CMYK profile, \"%s\".\n", CMYK_PROFILE);
            exit (-1);
        ASFileSysReleasePath (NULL, Path);
        ProfileSize = ASFileGetEOF (Profile);
        ProfileBuffer = (ASUns8 *)ASmalloc (ProfileSize);
        ASFileRead (Profile, (char *)ProfileBuffer, ProfileSize);
        ASFileClose (Profile);
        ACMakeBufferProfile (&CMYKProfile, ProfileBuffer, ProfileSize);
        ASfree (ProfileBuffer);
    colorConvertAction[0].mMatchAttributesAny = -1;//kColorConvObj_AnyObject;
        colorConvertAction[0].mMatchSpaceTypeAny = -1;//kColorConvAnySpace;
        colorConvertAction[0].mMatchIntent= AC_UseProfileIntent;
        colorConvertAction[0].mConvertIntent = AC_UseProfileIntent;
        colorConvertAction[0].mConvertProfile=CMYKProfile;;
        colorConvertAction[0].mEmbed = true;
        colorConvertAction[0].mPreserveBlack = true;
        colorConvertAction[0].mUseBlackPointCompensation= true;
        colorConvertAction[0].mAction = kColorConvConvert;
        colorConvertAction[0].mIsProcessColor = false;
        colorParams->mActions = colorConvertAction;
        colorParams->mNumActions = 1;
        colorParams->mInks = NULL;
        colorParams->mNumInks = 0;
        pageChanged = false;
        PDDocColorConvertPage( pdDoc , colorParams , 0 , NULL , NULL , 0 , NULL , &pageChanged );

    In that case am I using incorrect parameters in the code snippet? The code below does not convert the RGB->CMYK properly.
        inPath = ASFileSysCreatePathFromDIPath( NULL, argv[1] , NULL );
        pdDoc = PDDocOpen( inPath , ASGetDefaultFileSys() , NULL , false );
        ASFileSysReleasePath( NULL , inPath );
        PDColorConvertParams colorParams = (PDColorConvertParams) calloc( 1 , sizeof(PDColorConvertParamsRec) );
        PDColorConvertAction colorConvertAction = (PDColorConvertAction) calloc( 1 , sizeof( PDColorConvertActionRec ) );
        ASBool pageChanged = false;
        AC_Profile  workingProfile;
        ACGetWorkingSpaceProfile  (kACWorkingCMYK, &workingProfile);
        //Populate the PDColorConvertAction data members
        colorConvertAction[0].mMatchAttributesAny = -1;//kColorConvObj_AnyObject;
        colorConvertAction[0].mMatchSpaceTypeAny = -1;//kColorConvAnySpace;
        colorConvertAction[0].mMatchIntent= AC_UseProfileIntent;
        colorConvertAction[0].mConvertIntent = AC_UseProfileIntent;
        colorConvertAction[0].mConvertProfile= workingProfile;
        colorConvertAction[0].mEmbed = true;
        colorConvertAction[0].mPreserveBlack = true;
        colorConvertAction[0].mUseBlackPointCompensation= true;
        colorConvertAction[0].mAction = kColorConvConvert;
        colorConvertAction[0].mIsProcessColor = false;
        colorParams->mActions = colorConvertAction;
        colorParams->mNumActions = 1;
        colorParams->mInks = NULL;
        colorParams->mNumInks = 0;
        pageChanged = false;
        PDDocColorConvertPage( pdDoc , colorParams , 0 , NULL , NULL , 0 , NULL , &pageChanged );
        printf( "page changed to CMYK\n" );
        /* save document to a file */
        outPath = ASFileSysCreatePathFromDIPath( NULL, argv[2] , NULL );
        PDDocSave(pdDoc, PDSaveFull | PDSaveLinearized, outPath, ASGetDefaultFileSys(), NULL, NULL);
        printf( "File saved\n" );

Maybe you are looking for

  • How fast should I be able to download?

    I have had BT infinity for 2-3 months now, and I never seem to get a download speed of more than 4 megs a second It can start at 6 every once in a while, last about 10 seconds and then quickly run down to 3-4 megs and sit there until the d/l is finis

  • Request not appearing in QA Worklist

    Hi, We have a 3 system landscape and the QA approval procedure is configured. Any transport request that is created and released in the DEV box is automatically trnapsorted to the QA (batch program) and then gets appended to the QA worklist for the a

  • Why won't my K9NGM shut down automatically?

    Ever since I installed this mobo it has never turned itself off (as every other board does) I have to manually turn it off when presented with the windoze ok to turn it all off now message... I've tried searching to find out why but never found anyth

  • Prob in info rec creation

    Hi, In 4.6 version, I just created one Info Record(ME11) where in screen 102(purchase organization 1) I entered net price and next have VALID TO field. This field displaying in disable mode with mandatory, So i couldn't select the valid to date . Thi

  • Calculations with date fields

    I'm trying to do a basic calculation with a CRM date form in BC. I have a form field 'dateJoined' (though this could easily be the standard DOB field for the sake of this exercies) and I need to use javascript to calculate how many days have passed b