Monday, January 14, 2013

Plan for Kinect Ball-Tracking program

The good news is that I believe I have a method for tracking the ping pong ball using the Arduino. I'll post code and a more detailed explanation shortly, but in the meantime, I'll just provide a basic idea of the system I plan to use. It will consist of, in essence, a closest-point tracking system. I plan to position the Kinect off to the side of the ping pong table, facing it horizontally. From this angle, the Kinect will be programmed to ignore objects such as the net or the edge of the table, and to only recognize objects within a depth range as wide as the table. After these changes to the program are enacted, the moving table tennis ball will be the closest point to the Kinect within its frame of view. From this point, it is a simple matter to track the closest point using an application of code I learned in Making Things See. By then comparing the x, y, and depth positions of the closest point from each frame to the next, the velocity and trajectory of the ball could be roughly calculated. The main issue that could arise with this system would be the straying of people's hands or paddles into the Kinect's viewing frame. This would introduce a new moving closest point, confusing the system and ruining ball tracking. I believe, however, that a relatively simple piece of code could introduce a limiting case that would eliminate this problem. As the trajectory of the ball after it is hit by the Pong-Assist-equipped paddle has no bearing on the motorized actions of the paddle, by recognizing only objects entering from the field of view opposite the player, it could be ensured that only the ball would be tracked.

No comments:

Post a Comment