We need to know the absolute simplest way to do blob tracking using a windows pc.
We are building a robot that seeks and collects tennis balls. Everything is working except for the ball recognition. All the PC software has to do is get the x,y coordinates of a yellow blob, and then send the appropriate signal to the COM port (we have 4 values that are sent to the comport to be interpreted by a pic micro and translated into "move forward" "move backward" "turn left" "turn right")
Because all the PC has to do is find blobs and send COM data, we don't care about what language or software package we do it in - we can figure out COM port communication in just about any language (we've done it in c# and VPL so far), we just want the simplest way of getting the x,y values of a yellow blob.
The hardest thing to deal with here is going to be background noise.
You haven’t mentioned what kind of environment the ball and bot are going to be in.
If, for example, you are looking for a yellow ball in a completely blue room then it is not too hard.
Get the image from the web camera as a bitmap.
Read the RGB values for each pixel in the image and it becomes apparent where the ball is. Pixels for the ball have a high Red and Green count (red + green = yellow), the blue room has a high blue count.
Average the location of the yellow pixels to get the balls location.
processing Try downloading processing from http://www.processing.org. there is a brightest pixel script in there that shows you how to track the brightest pixel on screen, this can easily be modified to first of all take a video feed and then to track a certain color. From there you can expand it to make out blobs. It also has a script for edge detection which should help.
I was wondering if there was a GNU driver for this to use with a laptop bot, seems all drivers I have found wont pass vars and stuff to either QB,QB64 or batch that I could then pass to basic. I seen it done with java on an EE but I desperately hate OBJoriented languages…
I dloaded the processing prog too, to see if it can or will have some source there that shows some method…