cancel
Showing results for 
Search instead for 
Did you mean: 

calculate human position for Smart Presence Detection (SPD) with ToF sensor

kuma
Associate II

Hello !

If you don't mind, could you tell me about how to calculate human position (x,y,z) in STSW-IMG048?

In 8x8 mode, I can get 64 values. I'm wondering about how to  calculate the position from the values.

Any form of help is appreciated. Thank you!

2 REPLIES 2
John E KVAM
ST Employee

The trick is to find the center of mass of an object. 

To do this, one isolates the object by looking for zones with approximately the same distance. 

If a person is standing in front of the sensor all his distances will be 50cm +/- 10, for example.

Then look at the number of zones, and the shape. Most people have heads over shoulders, but they might be turned sideways, so that's not always a clue. But at 50cm, a person would occupy 20 zones, at 1M, maybe 10 zones. (I'm guessing a bit here. I've kind of forgotten our results.) A hand at 50cm, would cover far fewer zones. 

But you can develop a table of how many zones a person is likely to cover at a few distances. Use that. 

But don't forget the value of signal strength. A zone fully covered would have a stronger signal return than would a partially covered one. One can refine which zone is the 'center' using this technique. 

Once you decide an object is a person, and you have his (or her) center of mass, you can update your screen.

- john


If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.

Thank you for your reply. I will try it myself and ask again if I don't understand something.