Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Binary images

Hi,

I am a little bit puzzled about the binary image concept in LabVIEW. I thought a binary image would be an image with one bit per pixel, telling whether the pixel is black or white. Now I see that the thresholding on my grey-scale images yields another grey scale 8-bit image. Unfortunately this 8-bit image cannot be saved properly as a tiff. I must convert it to a 16-bit image first. Why do I end up with 16 bits to encode just the information "Pixel black or white"?

Thank you,
Peter
0 Kudos
Message 1 of 2
(3,036 Views)
The binary image is stored as 8 bits because that is the smallest format available in LabVIEW. One advantage of this format is the ability to label the blobs, where each blob is assigned a different value. It is still binary objects, but they aren't just 0 and 1.

I don't understand why it won't save as an 8 bit tiff image. I see no need to convert it to 16 bits for saving. Perhaps try saving it in a different format.

Another option might be going the picture control route. I know the picture control VIs can manipulate packed images that have less bits per pixel. You might be able to use IMAQ ImageToArray to get the image data, then convert it to a boolean array that you can save using the picture controls. This is just an idea - I haven't tried
anything so I don't even know if it is possible.

Bruce
Bruce Ammons
Ammons Engineering
Message 2 of 2
(3,036 Views)