Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
2 ratings:
 2 out of 5     Rate this Document

Pixel Intensities of a 16-bit Image from LabVIEW

Primary Software: Driver Software>>Vision Acquisition Software
Primary Software Version: 8.5
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
I used a camera to acquire images and saved them as 16-bit images in LabVIEW. When I look at the image in an external viewer it will not display properly and the pixel values within the images do not appear to have 16 bits worth of data. Why is this?

Solution:
There are several different things that may cause this to happen. Your camera may not actually acquire images at 16-bit depths. Many cameras will acquire 10- or 12-bit images. Within LabVIEW these images will be represented as 16-bit because images can only be stored in multiples of 8 bits. The extra bits are simply disregarded by LabVIEW. If you are expecting to see 16 bits worth of information but your camera is acquiring fewer than that, then this might be the problem. On most cameras you can check the bit depth of the image they acquire in Measurement & Automation Explorer under the Acquisition Parameters tab.



If you are looking at the image data in an external viewer it is possible that it is looking for signed numbers. If your image contains unsigned values this could cause the information to seem off. This would also most likely cause display problems in your image viewer.

The attached VI will allow you to generate an image with either signed or unsigned values up to 16 bits. You can use this VI to test the types of images that your external viewer uses and the information you can expect with that image type.This VI will generate an image with a pixel of each possible value from the smallest value to the largest.

Related Links:
KnowledgeBase 3W6EEVD3: 16-bit Images in NI Vision
KnowledgeBase 491KUMP9:  16-Bit Display Mapping is Not Working On IMAQ Image Display

Attachments:

Generating Images.vi




Report Date: 12/22/2008
Last Updated: 01/21/2009
Document ID: 4SLE536T

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit