pythonopencvkinectopenkinect

Using the kinect depth camera to track a ball in python


I am looking to create a project similar to this one https://ptolemy.berkeley.edu/projects/chess/eecs149/fall2014/projects/_Report/Ball%20is%20Life.pdf and I am trying to track a ball using only the depth sensor on Kinect v1. However, I am unable to get accurate results. I am using OpenCV with python and I am using contours to try and locate the ball. I have tried using many filtering methods such as background subtraction and thresholding, but there is a lot of noise which led to false results.

This is an image sample as seen through the depth camera. The circular object is the ball. https://i.sstatic.net/M4waE.png


Solution

  • I used the kinect depth camera for a few projects, and TA'd a project where the student used a kinect to track a hand skeleton.

    In all these projects, controlling the environment and some thresholds (x,y, and z) were needed to produce a semblance of accuracy. By this, I mean you should define a 'box' where you will attempt to find/track the ball. As well, adding a median or gaussian filter step may help you reduce the noise issues.

    For other tracking algorithms/approaches, check out these resources: