I'm currently working with the PersonTracking Module of the SDK R2 with the SR300. Now I need to get the exact Position with the distance to the camera.
Is it possible to get the distance between Camera and the Persons in the room to place an avatar in Unity where the Person stands in reference to my Position?
My own Unity avatar project may be a useful reference.
https://www.youtube.com/watch?v=T_V8SNwLTrY 'My Father's Face' Tech Trailer 7 - YouTube
In my project, the camera is attached to the parent object of the avatar and moves with it. But there was a time during development when the main camera was in a fixed position, detached from the avatar. So when I leaned in towards the camera, the avatar would walk off into the distance, becoming smaller as it walked across the room further away from the fixed camera, and become larger when I turned the avatar around and walked it back towards the camera position.
链接已复制
My own Unity avatar project may be a useful reference.
https://www.youtube.com/watch?v=T_V8SNwLTrY 'My Father's Face' Tech Trailer 7 - YouTube
In my project, the camera is attached to the parent object of the avatar and moves with it. But there was a time during development when the main camera was in a fixed position, detached from the avatar. So when I leaned in towards the camera, the avatar would walk off into the distance, becoming smaller as it walked across the room further away from the fixed camera, and become larger when I turned the avatar around and walked it back towards the camera position.
Hello Marty,
I'm currently trying this within Unity and now i came up to a problem where i don't know further.
I wrote a Script which uses the PersonTracking Module but since it is in preview state i can only make use of the 2D Methods like
get2DBoundingBox of a Person. So my Question is, is it possible to also get the depth data within that BoundingBox so that i
know how far away a Person is ?
I haven't worked with Person Tracking or with 2D bounding boxes (I only use 3D bounding boxes in Unity). So I'm afraid I don't know what to suggest.
When I needed to track the proximity of a person in Unity (not with Person Tracking), my approach was to have an object (e.g an Empty GameObject) track the proximity of the RL person and update the position of the virtual object as the tracked person moved. I would then compare the X-Y-Z position coordinates of that tracking object to another set of XYZ coordinates to work out how close the two locations were to each other.
So I would do a sum such as '(coordinate of position A) - (coordinate of position b). If the result was minus then the person was behind me, and if the result was a positive number then the person was in front of me (approaching). And if the result is 0 then the two are at exactly the same position, since subtracting a coordinate value from the a coordinate value of the same amount (e.g 1200 - 1200) always = 0.
Using this system, I created a mechanism where a game's AI could tell if the player and a computer-controlled character were within hearing distance of each other.
Thanks for the fast response ! Thanks for the hint, but i can't compare the positions because i don't have the Z value of the Coordinate.
Is there a way to get the depth value of a distinct region or point. Then i could just take the average of the depth values and observe how they differ.
