Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

how to convert image from grayscale to binary

Hello,

 

I m reading a 32-bit colour image using IMAQ read options and converting it into grayscale. In, order to perform few morphological operators like dilation, filling holes and erosion. I want to convert the grayscale image to binary image. When I use the IMAQ auto2threshold 2 vi to convert it to binary image the output image is just a black but when I convert the image to array values I can see 0s and 1s.  Help, me figure out why do I just get a plain black image . Using labview 2015 version and IMAQ developement module.

0 Kudos
Message 1 of 8
(4,846 Views)

I think you simply have to right clic on your "binary image" display on the front panel, go to "palette" and select "Binary"


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 8
(4,836 Views)

Thank you ! I have got the binary image now . Smiley Very Happy

0 Kudos
Message 3 of 8
(4,831 Views)

Is there any other way to get only black and white image ? So, to it better for analysing the image when I detect the corners. 

0 Kudos
Message 4 of 8
(4,830 Views)

Well... can you post the image file and your VI so we can try?

 

When you convert the colour image to a greyscale image, what method do you use and what plane do you extract?

Maybe you should have a look at the example for color threshold.


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 5 of 8
(4,824 Views)
that is easy
just use IMAQ Equalize VI after using threshold
0 Kudos
Message 6 of 8
(4,812 Views)

Hello,

 

I have used the equalize vi and got a black and white image. Now, how to perfrom segmentation of the erode image ? 

 

Thanks ! 

0 Kudos
Message 7 of 8
(4,805 Views)
your question topic is how to convert image from grayscale to binary
but what you ask is different now!
you can use erode morphology before using equalize by binary morphology vi or after that by grayscale morphology vi
0 Kudos
Message 8 of 8
(4,802 Views)