Using IMAQ Cast Image to convert 16 bit to 8 bit image.

I am trying to convert a 16 bit image to a bit image, and I am using IMAQ Cast Image. I am wondering what I am supposed to wire into the # of shifts? When I use NI Vision Assistant it asks I can convert by the adjust dynamic method. Does anyone know how to do this with IMAQ Cast Image? Thank you in advance.

The number of shifts is the number of bits that will be chopped (in the dark regions) from the initial image to fit into 8 bits.
For instance, if you have a 10 bit image, compressing into an 8 bit image will obviously introduce some losses. You can decide to loose information either in the "whithe" parts or in the "black" parts of the image.
With #shifts = 0, the two most significant bits will be lost, so the whitest parts of the image will be uniformely white, but the darl grey levels will be preserved.
With #shifts = 2, the two least significant bits will be lost, preversing the whitest parts grey variations, but losing the subtilities in the darkest parts.
With #shifts = 1, a single bit is lost on either sides...
Chilly Charly    (aka CC)
         E-List Master - Kudos glutton - Press the yellow button on the left...        

Similar Messages

  • Using IMAQ create, set-up, acquire and windraw to save image without color map

    Hi,
    Attached is my VI (using labview 8.5) and am not sure where it is getting the color info from, but it saves the image as jpeg/bmp/tiff with colormap (confirmed by imread in matlab). Can someone help me save these images without colormap info.
    Thanks
    Attachments:
    HL Grab with two boards and SONY XC55_Images.vi ‏166 KB

    Hi Maverick269,
    I noticed that you posted this question over on the Machine Vision forums as well. That will definitely be a better place to get this question answered, so let's work on the issue over there :
    http://forums.ni.com/t5/Machine-Vision/Using-IMAQ-create-set-up-acquire-and-windraw-to-save-image/m-...
    In the future it helps us stay organized if we limit each issue to a single thread.
    Cheers,
    Andy C.
    Applications Engineer
    National Instruments 

  • Do IMAQ Cast Image or IMAQ Linear averages give different results when using different computers that are running under Windows XP ?

    Hello
    I'm currently developping an image processing algorithm using Labview 7.1 and the associated IMAQ Vision tools. After several tests, I found a weird result. Indeed, I put the labview algorithm - including the IMAQ VI on the library to get sure that I use all the time the same VI - on my memory stick and used it on two different computers. I tested the same picture (still in my memory stick) and had two very different results.
    After several hours trying to understand why, I found that there were a difference between the results given by both computers at the very begining of the algorithm. Indeed, I used a JPEG file.
    To open it, I first create an Image with IMAQ Create (U8). Then, I open it.
    Then in my first sub-VI, I use IMAQ Cast Image to be sure that the picture is a U8 grayscale picture.
    Right after that, I use the IMAQ Linear Averages. The results of this VI are different on the two computers.
    I tried several time on the same picture : one computer always give me the same result but the two computers give me a different result. So there is no random variable on the results.
    So my question is : Do IMAQ Cast Image or IMAQ Linear averages give different results when using different computers that are running under Windows XP ?
    My bet is on IMAQ Cast Image but I'm not quite sure and I do not undestand why. The labview and IMAQ are the same on both computers.
    The difference between the two computer are above :
    Computer 1 :
    Pentium(R) 4 CPU 3.20GHz with a RAM of 1Go. The processor is an Intel(R).
    The OS is windows XP Pro 2002
    Computer 2 :
    Pentium(R) 4 CPU 2.80GHz with a RAM of 512Mo. The processor is an Intel(R).
    The OS is windows XP Pro 2002.
    If anybody can help me on this problem, it would be really helpful.
    Regards
    Florence P.

    Hi,
    Indeed it's a strange behaviour, could you send me your VI and your JPEG file, (or another file that reproduces) so that I could check this inthere ?
    I'll then try to find out what's happening.
    Regards
    Richard Keromen
    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;}
    >> Découvrez, en vidéo, les innovations technologiques réalisées en éco-conception

  • 16 bit vs 8 bit

    I have a Nikon D50 and I typically shoot it in Raw Mode.
    I have been playing with several work flows. I love working in layers, but if I uncheck all the RAW enhancements on import and leave it in 16bit mode, I cannot use the layers until I convert it to 8 bit.
    I read somewhere that leaving it in 16 bit mode for auto-levels and auto-color correction is a good idea.
    I usually try this and then convert to 8 bit to do some finishing (reduce noise, unsharp, adjust skin tone).
    Is this consistent with what others have found? Or do you prefer to use 8 bit mode right off (is the difference not that huge)?

    I agree with Barbara, and agree to disagree with straight conversion to JPEG in almost any case, but see the point that if you aren't taking advantage of RAW, you are letting some process decide for you -- one that can't see the image. However, in Elements 4, you still have the potential to make limited changes in 16-bit, so letting the camera convert to JPEG isn't the best option, even if you don't make corrections in the dialog.
    Unchecking the boxes isn't enough for working with the RAW plugin. You want to move the sliders about to try some balance and variations of tone. the dialog tries to guess for you by looking at the weighting of capture information, but in many exposure situations it will not produce the best result. You can make some changes to make the most of the capture information before moving to Elements--and continuing to improve the image.
    As to workflow, have a look at the course offered on Betterphoto.com:
    http://www.betterphoto.com/photocourses/RIC01.asp

  • Problem using IMAQ Array to Color Image vi

    I am doing some pixel manipulation & while going from an image to an Image Pixels (U64) array using IMAQ Color Image to Array VI I cannot see the image once it is modified.
    I am...
    1) converting the image to the 64 bit pixel data using IMAQ ColorImage to Array.vi
    2) doing the manipulation
    3) converting back to an image using the IMAQ Array to ColorImage.vi using the 64 bit input.
    What I get is...
    1) a black image with data behind it... meaning... if I take the magnifier tool and go to the approximate locations of my image where I expect to find the manipulated data, it is there.
    2) cast that image to a 32 bit image & still get a black image for the output.  The data however is no longer there and appears to have been stripped.  
    3) no error's out of any VI's...
    TIA  

    With Vision 2009 situation is not better.
    It happened because U64 image displayed in full scale. So, if you have full range of intensities (from 0 to 65535), then you can see something. But if your intensities in small range, for example, 0...255 in all channels, then you will see black image.
    Feel differences:
    It should be possible to map U16 values into U8 display range  with given range (like IMAQ WindDisplay Mapping does), but right now this feature available for I16 images only, not for U64. What you can do is following - map each channel to U8 (with linear LUT, for example), put channels together, then display 32 bit RGB instead of U64.
    Andrey.

  • What does the IMAQ Cast Image VI do exactly?

    Hi everyone,
    I want to convert a RGB image to grayscale. By now I can do this, using the IMAQ Cast Image VI. But now I was wondering what exacly does this VI do? How does it make a grayscale image from the RGB image? What is happening under the hood?
    Hope someone can tell me, since I really can't find it. Thanks in advance ^^.
    Solved!
    Go to Solution.

    For each type conversion there is specific operation. In your case The VI sets the destination value to the average of the three color components of the source.
    For more:
    http://zone.ni.com/reference/en-XX/help/370281P-01​/imaqvision/casting_images/
    Thanks
    uday,
    Please Mark the solution as accepted if your problem is solved and help author by clicking on kudoes
    Certified LabVIEW Associate Developer (CLAD) Using LV13

  • I want to convert pictures to 1 bit image

    dir sir;
    i want to make a programe by it i want to upload image real image and then it converted it for 1 bit image ;
    can i use java to do that?
    and if soo what method and package and function helps me to do that .
    if you can provide me with simple code i will be thankfull.
    beast regards.

    Hi,
    if you have vision, you could use the functin IMAQ Image to Array to have a 2D array of the pixel values.
    You can then compare pixel by pixel; if your images come from a camera, I would recommend to set a treshold of acceptance.
    This is a time consuming solution anyway.
    Alternative methods:
    1) Make a subtraction of the two images, the resulting image will be the difference of them
    2 ) Use IMAQ LogDiff function (operators palette)
    3) Calculate the histogram of both image and compare the histogram reports
    Good luck,
    Alberto

  • Is possible to Convert a 1 bit B&W Tiff image to a 16 Bit Greyscale Tiff image?

    Hi there,
    I am trying to convert a 1 bit Black & White Tiff image to a 16 Bit Greyscale Tiff image, Anyone out there know if it is possible and how it may be done? We are using Adobe Acrobat 9 Pro Extended.
    Any help would be appreciated.
    Cheers, Chris

    Almost any graphic editor can do it, but it doesn't make a sense. The picture information remain the same - 1 bit. It has nothing to do with Acrobat.

  • Converting a Signed 16 bit colour Image to 32 bit Image without Losing the Colour

    Hi,
    I am using the IMAQColourHistogram which only accepts 32 bit image inputs. I changed the Image from 16 bit to 32 bit using 'Cast Image'. The program worked but inserting an indicator, I realised that the Cast Image actually changes the Color in the image to a black and white Image. Is there a way I can change the 16 bit to 32 bit without losing the colour. 
    Any suggestions on this would be very helpful as I am currently stuck in my project.
    Thanks.

    Hi,
    Is your 16bit image a real color image or only a grayscale image with a false color palette?
    If your image is only a grayscale image, simply use the IMAQHistogram function  (located in the Analysis palette) wich accepts 8 and 16bit images.
    Color images are 32bit because you have 3 planes of 8 bit (Red, Green, Blue)
    16bit are not usually color images, but grayscale image with extended pixel depth compared ti traditionnal 8bit images.
    Regards

  • Using IMAQ Image Display control vs IMAQ WindDraw for large image files

    Hello All;
    I am designing an application that is currently using IMAQ Image Display control to view large images (5K x 3K and larger).  My problem is that these images take 10-20 seconds to load and display, whereas if I use IMAQ WindDraw to display my image in a separate window, it only takes a couple of seconds.  My application is designed such that I am making use of the Subpanels in LabVIEW 8.0, and to make it pleasant for the user, the interface is such that my line profile, histograph and image viewer displays are contained within the same GUI (panel).
    I read the National Instruments application note regarding displaying of large images, and it did not seem to make a difference.  For example, I switched the 'modern' IMAQ Image Display control with the classic Image Display control, since the 'classic' does not contain any of the 3D rendering tools which might slow the process down.
    Why is there such a huge difference in loading times if I am trying to do exactly the same thing with both methods?  How can I bring the IMAQ Image Display control up to the same speed as the IMAQ WindDraw tool?
    I am currently using LabVIEW 8.0 with the latest IMAQ/NI Vision package from NI (IMAQ v7.1?).  Thanks.
    DJH

    Use a property node and select 16 bit image mapping. You can create a control for this or whatever you need. If you select the individual elements, you can get enumerated controls.
    Bruce
    Bruce Ammons
    Ammons Engineering

  • Using Adobe Export PDF, I converted a PDF document into MS Word. However, all the images are missing

    Using Adobe Export PDF, I converted a PDF document into MS Word. However, all the images are missing--replaced by black rectangles. How can I fix this? Thanks for any assistance.

    Hi Ravinder,
    As I mentioned in my email to you, I wasn't able to reproduce the behavior your described.  The images appear properly.
    Please let me know if you have any questions.
    -David

  • Do images imported to Keynote retain their previous color profile? In other words, if the Keynote presentation will be shown using an sRGB profile projector, should the images be converted to sRGB prior to importing?

    Do images imported to Keynote retain their previous color profile? In other words, if the Keynote presentation will be shown using an sRGB profile projector, should the images be converted to sRGB prior to importing or can they be batch adjusted in Keynote?

    While I feel your comment doesn't directly address my question, why I am worrying is this.
    This presentation is to a camera club. Color is important. Images shown in meetings are projected by an sRGB color profile projector. Most serious photographers us a color profile with a bigger space than sRGB (typically RGB1998). If you project an RGB1998 image on an sRGB projector the colors go to crap. More precisely they become dull and lifeless. Thus, I am trying to determine whether I need to convert the images I plan to put into my Keynote to sRGB and boost the saturation PRIOR to importing them or whether Keynote has a way to do this as part of the software.
    Jerry

  • Using QuickTime Pro to convert a series of JPEG images into a QT movie?

    Can I use QuickTime Pro to convert a series of JPEG images into a QT (uncompressed) movie? Thanks...
      Windows XP  

    Yes.
    One of the features of the QuickTime Pro upgrade is "Open Image Sequence". It imports your sequencially named (1.jpg, 2.jpg) liked sized images (any format that QT understands) and allows you to set a frame rate.
    http://www.apple.com/quicktime/tutorials/slideshow.html
    You can also adjust the frame rate by adding your image .mov file to any audio clip. Simply "copy" (Command-A to select all and then Command-C to copy) and switch to your audio track.
    Select all and "Add to Selection & Scale". Open the Movie Properties window and "Extract" your new (longer or shorter) file and Save As.
    As you've posted in the Mac Discussion pages but your profile says XP you'll need to subsitute Control key where I reference Command key.

  • Images When Converting InDesign CS5.5 using Kindle plugin

    Hi,
    I've been reading, looking for a solution to an image conversion problem. If I create and place an image in Illustrator (for example combining a car drawing and the sun-2 items in one drawing), then export an ePub, convert for Kindle to mobi using the Kindle plugin or Calibre, I am getting the second item (in this case the sun) below the car instead of where it should be. I've tried every conceiveable variation: re-did the image in Fireworks as a PNG, re-saved into jpeg, used the AI image directly, etc. I've unzipped the ePub, but can see no way to fix the car-sun problem.
    original as placed in InDesign project                  converted version
    Any help with this image problem much appreciated. (Wish: CS6 InDesign exports for mobi).
    Regards,

    Hi,
    I didn't combine in the above image in InDesign. The car was a PNG to which I added a star drawing: probably tried it in Fireworks and Illustrator. But, not using InDesign (no star shape tool for the sun).
    (However, I originally did combine the 2 separate images (car and sun) in my first attempt in InDesign, which produced the same result. When it converted poorly, I then deleted the 2 images from InDesign and placed a single combined image-probably imported the car PNG into Illustrator/Fireworks and drew the sun, then exported the combined and placed. The combined, see above, still converts with the same problematic result. Is it possible that although the initial 2 images were deleted in InDesign and replaced, and a re-export was done of the newly saved file, somehow InDesign is caching these 2 images?)
    The InDesign PDF export's image, like in  the ePub, is fine.
    Puzzling result for the conversion.

  • Using IMAQ Extract on a Calibrated Image

    Hello,
    I'm a student new to Labview working on a project to get a web cam to identify and analyze the state of a checkers game board. My VI calibrates the image of the board to correct for distortion and to fit it to its real world coordinates. At this point I want to extract the game board from its surroundings to make the rest of my analysis easier. However, if I do this I end up voiding my calibration. Is there a way that I can make a new image based on my calibrated image so I can use the extract VI or do I need a new approach? 
    Thanks for your time!

    It sounds like you're not passing the calibrated image to the extract VI correctly.  The extract VI requires a new memory allocation be made and then copies the source image to that location.  It then creates a new image at the new memory location with only the extracted portion of the original image.  If you don't handle your memory locations correctly, you may be overwriting your original image instead of extracting from it.  Make sure you are allocating a new memory location by calling a new IMAQ Create VI (and using a different string input) and feeding that into the Image Dst input of the IMAQ Extract VI.  This should ensure that you save the calibrated image before running the extraction.
    Regards,
    Chris L
    Applications Engineer
    National Instruments
    Certified LabVIEW Associate Developer

Maybe you are looking for

  • Adding Labour charge to an open Production order

    Hi, How do I add a labour charge (for time spent on the job) to an open production order created in CO01?

  • Producer consumer loop for serial comms

    I have an application where I am trying to read and write to a serial port using a producer consumer loop.  My producer consumer loop seems to work fine until I put the serial comm VIs in the consumer loop.  Prior to that my event structure in the pr

  • Media Manager won't load

    I just got a new curve 8320 and I've installed the Blackberry Desktop Manager v 5.0.1.18 It connects to my BB fine via usb cable but in Add/Remove Applications, it comes up blank with the message "No software is available for your device". Also, when

  • Multiplie logon message *every* time I try to logon?

    Hello, I hope that someone can help me with this: before few weeks I had sudden failure in SAP and I was disconnected from the system and after that momment *every* time I logon I see this multiplie logon message: http://img255.imageshack.us/img255/7

  • After upgrading to OS X, can't email pictures from iPhoto.

    I cannot email photos selected in iPhoto.  I click the email icon, as I have always done, on the bottom of the iPhoto page.  Email opens, I type in my message but, when I hit send, nothing happens.  Not only that but I can't delete the stuck e-mail e