- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, this looks nice. Did you use the sr300 or the r200 ? I'm not sure if it's possible with the sr300.
I don't know if i understand you right. Is the camera attached to your head in the real world then ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It was developed with the F200, the direct predecessor of the SR300. The camera is on my desk about 0.8 m in front of me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, Thank you for the Help ! I hope i can get this to work within Unity with the sr300.
Have a nice day !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You're welcome, please come back to the forum any tme you have questions. Have a great day too!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page