Skip to main content
Associate
October 28, 2024
Question

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

  • October 28, 2024
  • 1 reply
  • 1051 views

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!

1 reply

John E KVAM
ST Employee
October 28, 2024

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

kumaAuthor
Associate
November 6, 2024

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