ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

how to save binary image

Solved!
Go to solution

Hello everyone.

How to save binary image in a computer? If I right click on the image, then choose 'Save Image...', the picture saved will appear blank. I understand the image is in 0 and 1 but I do not know how to set up the code.

Thank you.

0 Kudos
Message 1 of 10
(6,610 Views)

Right click==>Save Image 

works perfect Smiley Wink

0 Kudos
Message 2 of 10
(6,581 Views)

If I right click and save image, the image will appear black.. Smiley Sad

0 Kudos
Message 3 of 10
(6,576 Views)

I don't know about yours, but mine works absolutely perfect Smiley Wink

 

 

0 Kudos
Message 4 of 10
(6,574 Views)

The image is saving correctly, but like you say it looks black.  Standard viewers do not rescale the pixel intensities.

 

If you want a black and white image, you need to increase the value of the brighter pixels before saving.  One trick I use is multiplying the image by 255, which turns all the non-zero pixels into the brightest possible pixel.  There are probably more efficient methods, such as a lookup table, but multiplying is quick and dirty.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 5 of 10
(6,564 Views)

Bruce is right. Here is a discussion on this:

http://forums.ni.com/t5/Machine-Vision/How-do-you-write-an-image-threshold-to-a-file/td-p/93172

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 6 of 10
(6,560 Views)

Hi Bruce.

I am not sure how to do the multiplication by 255. You mean multiply the whole program by 255 or just multiply the image?

Thanks.

0 Kudos
Message 7 of 10
(6,544 Views)
Solution
Accepted by nadiah

Use IMAQ Multiply to multiply the image times 255.

 

Bruce

Bruce Ammons
Ammons Engineering
Message 8 of 10
(6,534 Views)

hi can plz help me out.....i want to show grayscale images into Bitmap (0-7 bits). Is it possible to show garyscale image into bitmap 1 bit, 2bit,..upto...7bit image.

0 Kudos
Message 9 of 10
(6,461 Views)

hi can plz help me out.....i want to show grayscale images into Bitmap (0-7 bits). Is it possible to show garyscale image into bitmap 1 bit, 2bit,..upto...7bit image.

0 Kudos
Message 10 of 10
(6,460 Views)