Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

saving grayscale 8 bit image

Hi, I am trying to save an 8bit grayscale image in bmp format.
I am trying to save 2 images in the same VI.  One binary (after image processing) and the orignial 8bit grayscale image.
The binary image comes out ok but the grayscale image does not.
The grayscale image is either black with 0,0,0 values as my color pallette or white particles in a gray background with i.e. (100,100,100).

Thanks,

Michael
 
0 Kudos
Message 1 of 4
(3,562 Views)

My guess is that you didn't make a copy of the original image when you did the binary processing.  This means the original image was replaced by the binary image.  When you try to save the original image, you end up saving the binary version again.

Create a second image and use it as the destination image for your first image operation.  This will preserve the original image for saving.

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 2 of 4
(3,555 Views)
Hello Michael,

Here is an example that I created for you by modifying the HL Snap.vi shipping example.  The example demonstrates how to save and display both the acquired image and the binary image created by the threshold operation.

Best Regards,
Travis M.
0 Kudos
Message 3 of 4
(3,537 Views)

Thanks, that was it.

I didn't know that Labview would overwrite the image after processing.

I had wired the original image to a save block before going to my processing sub VI and then wired the output of the subvi to another save block.

Michael

0 Kudos
Message 4 of 4
(3,532 Views)