Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Can't get correct Binary Image from video

Solved!
Go to solution

I created a small VI that takes the first frame of a selected avi file, converts it into gray scale, and then attempts to convert the gray scale image into a binary image.  For some reason, the binary image just comes out all black (despite the gray scale image showing a very bright tennis ball).  

 

Here's a picture of my block diagram and front panel (with results): http://imgur.com/QxunT

I also attached my vi and video.  Any help is greatly appreciated, of course.

Download All
0 Kudos
Message 1 of 4
(2,796 Views)
Solution
Accepted by topic author murrdpirate

The background gray value is something around 30...50 and ball is 150..220. So, try to use Range 100,250 in IMAQ Threshold instead of 0,1 - you will be surprised.

 

Andrey.

0 Kudos
Message 2 of 4
(2,788 Views)

You are exactly right.  I originally thought that was how it was supposed to be, but every reference I saw about creating binary images said to use 0 and 1.  Thanks!

0 Kudos
Message 3 of 4
(2,786 Views)

Don't forget to use the Binary palette on your image display. This allows to see in black and red your binary image, otherwise you will see no visible difference between 0 and 1.

NTA_LabView_certified_Developper.jpg
0 Kudos
Message 4 of 4
(2,773 Views)