<< return to Pixycam.com

Pixy fast ball detection

Hi there,

I am working on a project involving several Pixies. I would like to get quite precise coordinates of a ball hitting the wall. For that I designed a 5 Pixies camera system to track the ball movement (see attachment). The thing is I am wondering whether this system could track small balls traveling at quite fast speeds (up to 30 m/s) and give me the XY coordinates and time of the ball hitting the wall. Do you think this would work?

Hi Pawel,

thanks for your question. How accurate do you need the coordinates to be? And how big is the ball?

Your project seems feasible - Pixy has a frame rate of 50 Hz, or a refresh every 20ms. According to my math, a ball traveling 30 m/s will travel 0.6 meters in 20 ms. At the dimensions in your drawing, the trick is getting the proper lenses on your Pixys, so they have the right zoom setting. Some experimentation may be necessary here. Then, writing code to correlate the data from multiple cameras.

Here is a page about replacing the lens on Pixy: http://cmucam.org/projects/cmucam5/wiki/Can_I_replace_the_lens_on_Pixy

Hope this helps!

Best,
Jesse

Thanks for answering. The ball is 40 mm wide. I need the coordinates of the ball hitting the wall with ±10 cm toleration.

However, the ball is black. Ive read that Pixy cannot detect black objects, so I have to make the ball visible in some other way. Can I paint the ball, and make it white? Or maybe some ultraviolet spray will do?

OK, that all seems doable. You’re correct, Pixy does not detect black or white objects with any reliability. Your best bet is to use a bright color like orange or green. See this page for more info: http://cmucam.org/projects/cmucam5/wiki/Teach_Pixy_an_Object_2