Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert to 2-bit Binary Image

Hello

I am trying to convert an 8-bit grayscale image to a 2-bit binary image with the threshold function but it does not always give me the right image back.

So the edge function fails when the image is not a 2-bit binary (see image top right) and works when the image looks like the one below (see attachment).

It seems the problem occurs randomly after using the buffer or the remove particle function. In case of an error (edge function) I simply re-run the same vi

again and I get a 2-bit binary image which is working!

 

With the vision assistant (2011) the script file works with an 8-bit grayscale image without problem but fails sometimes when I use the camera to

read the image. For the conversion I am using the threshold function (set to 128).

 

Question: Do I need to convert the 8-bit image which comes from the camera in a different way than the threshold function?

 

 

Thanks in advance

 

Download All
0 Kudos
Message 1 of 2
(3,604 Views)

Hi,

 

Post your labview file. so that can help u much better

---
Silver_Shaper | CLD
0 Kudos
Message 2 of 2
(3,588 Views)