12-02-2011 11:53 AM - edited 12-02-2011 11:54 AM
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.
Solved! Go to Solution.
12-02-2011 12:52 PM
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.
12-02-2011 12:55 PM
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!
12-05-2011 02:07 AM
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.