What is the most accurate proximity sensor for a ping pong ball? I will be using this to calculate 3D positioning of a ping pong ball in flight. I only need to detect the ball within 0-5 feet (basically on one side of ping pong table).
-
The range of motion is roughly a ping pong table length and width and maybe 4 feet in height.– RyanCommented Feb 2, 2015 at 15:24
-
4Perhaps you should look into something like a leapmotion, or Xbox kinect. Not arduino.– GerbenCommented Feb 2, 2015 at 15:58
-
2Steven Levy in Hackers reports a tale about Marvin Minsky nearly being swatted by an early ping-pong robot when his bald head satisfied the vision system's ball-detection criteria.– Chris StrattonCommented Aug 14, 2016 at 20:17
-
1The Arduino itself isn't really fit for video processing. We've used two webcams, one top and one side, to get an 3D location. Your algorithm has to be fast, we had most luck by using an orange ping pong ball on a green tabletennis background, and by just searching for the first orange pixel. Circle detection was way too slow for us.– aaaCommented Oct 14, 2016 at 6:04
-
If you're looking to make something functional, using a 2D airhockey table is much easier. Especially if you think of making a keeper robot.– aaaCommented Oct 14, 2016 at 6:06
2 Answers
I've had some good luck with using the Pixy camera system.
http://www.cmucam.org/projects/cmucam5/wiki
You get a maximum of 50 FPS and can detect and locate different objects based on hue. The library function getBlocks() returns the X and Y center location of each of the objects the camera detects. You teach the camera what hues to recognize as blocks, and adjust the detection thresholds. I use mine in monochrome infrared light by adding a visible filter and lens kit from http://irlock.com/
In the meantime a student has made a really impressive implementation, that might answer your question: interactive tennis table