0

I'm looking for a simple Kinect app which allows me to a) detect and b) track a single moving object in an otherwise static background.

I don't need any fancy skeleton or other features, just the center of mass of the moving object will do it. Any pointers?

memyself
  • 11,907
  • 14
  • 61
  • 102

2 Answers2

1

I would see Comparing a saved movement with other movement with Kinect to track the entire body. The answer shows the code here which shows how to save skeleton data. And mapping an ellipse to a joint in kinect sdk 1.5 to have the tracking of joints if you want to track the joints not the entire body (currently works better, but when the tracking the entire body works, use that because it is more effective and efficient).

Community
  • 1
  • 1
Kinected
  • 441
  • 5
  • 19
0

your case is pretty simple, but requires initialization for the object since in general a term "object" is ill-defined. It can be a closest object or moving object or even the object that was touched, has certain color, size or shape.

Let's assume that you define object by motion that is whatever moves in your point cloud is an object. I suggest to do this:

  • Object detection is easy if object moves more than its size since
    then you just may subtract depth maps and end up with your object:
    depth1-depth2 > T but if the object moves slowly and shifts only by a fraction of its size you have to use whatever high frequency info you have, which can be depth or colour or both. It is going to be noisy as the figure below shows

enter image description here

  • as soon as you have your object selected you may want to clean it by running some morphological filters (erode + dilate) to erase noise and get a single blob. After that you just need to find some features in the blob such as average depth or mean color and look for them in a small window around the object's previous location in order to rediscover the object;
  • finally don't forget to update these features as object moves through.

Some other ideas you may want to use are: depth gradient, connected components in depth, pre-recording background depth for cleaner subtraction, running grabCut on depth area selected by mouse click, etc.

Vlad
  • 4,425
  • 1
  • 30
  • 39