Counting number of people inside room

Hello there,

I am using a Kinect Azure and want to keep track of how many people there are in a room. My idea is basically depending on how many people are inside a room, the number of circle (TOP’s) will increase. So 1 person = 1 circle and each circle will follow a specific person. I also want the size of each circle to decrease depending on how many people there are, so more people = smaller circle.

The reason I am using the circle TOP is because I am basically using some form of matte that masks the visual and the circle will reveal the image.

Any help would be great, be it from how I can count the number of people in the room or how to add circles depending on how many people there are.

Hi @ThunderrCrapp,

the Azure comes with a limitation on how many people it can track (6 maximum). Is that enough? If so, the Kinect Azure CHOP will output World Space Positions of the people in the room. As this is the position as measured from the Azure’s Lens, you will have to approximate the actual position on the floor by taking the Azure’s position in relation to the floor into account.

From there I would advise on using instancing for rendering the circles as that process is much easier compared to having to composite n-amount of circles.


That sounds like a good idea, however I need to control the position of each circle. My plan is to use 2 Azure to stitch together so total would be 12 people detection (in theory, please correct me if I am wrong or if it is not possible).

I imagine that if I instance the circles I would not be able to control the circles individually, however if it is possible, could you share some references that would help me achieve that?

Hi @ThunderrCrapp,

while in theory plausible, stitching kinects will come with issues:

  • if there is overlap between the kinects then there is no way of directing each camera to only pick up people that are not already detected by the other camera
  • if there is no overlap, people might refuse to stay in equal numbers in the two zones, so one zone might be 7 and going over the limit…

this is something you can glance over but especially in interactive environments can become a experience issue for your visitors. Probably worthwhile experimenting around with! Maybe in the end using some machine learning to do the object detection will be the simplest approach.

Regrading instancing: controlling the size is very well possible. Please have a look at this a bit older, but still valid tutorial:

You can also find instancing examples in the Geometry COMP examples in the OP Snippets.


Hey @snaut ,

Regarding the kinects, that sounds like an interesting challenge! Thank you for letting me know, I will keep those issues in mind when setting it up. Just wondering if you have any tips or general advice to share when it comes to using kinects, or any good practices.

For the instancing, I have decided to do it manually for the time being as I am strapped for time. Thank you for providing me some help, I will definitely check out the video you shared. While I have dabbled in instancing before, I am unsure about whether this is what I am looking for or if I know how to do it.

While I cannot share the TOE file, I will share some screenshots and videos to help you get an idea of what I am trying to achieve. Thanks again :slight_smile:

@snaut what is the best current approach for multi-camera/depth-sensor tracking? The bodytrack chop has me interested but I assume this is out of its scope. You mentioned machine learning as the simplest method(?). I remember following a project called openptrack for this a long time ago, it seems that most robust tracking requirements need camera/sensor stitching of some kind. Disguise is showing it off I think. Do you know if anything close to a turn-key system is on the cards with TD?

Hi @bLackburst

honestly not sure. A quick search brought up:

just a sidenote - for placing the circles I would not use tracking but basic object detection as you overcome the issue of the max 6 players of the Azure. Or the OAK would come in handy here as well.

For tracking it’d be interesting to see if there is a pedestrian reidentification that works across multiple OAKDs.