Hello everyone.
The Mixed Reality Forums here are no longer being used or maintained.
There are a few other places we would like to direct you to for support, both from Microsoft and from the community.
The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.
For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.
If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.
And always feel free to hit us up on Twitter @MxdRealityDev.
The Mixed Reality Forums here are no longer being used or maintained.
There are a few other places we would like to direct you to for support, both from Microsoft and from the community.
The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.
For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.
If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.
And always feel free to hit us up on Twitter @MxdRealityDev.
Options
How to convert a face bound box cordinates to real world cordinates in hololens
I am trying to create an Hololens 3D application which will detect human faces from the video frame and show a rectangle around each face. Now i can get the face bounding box from the Microsoft UWP face detector API.But i don't know how to show the rectangle around the face in Hololens real 3D world.
Please help me guys.
Thanks in advance
0
Answers
You are getting x and y points on the screen? Then you should be able to convert them with https://docs.unity3d.com/ScriptReference/Camera.ScreenPointToRay.html
@S_Lincke No I am getting x and y points from a video frame not from the screen
Is this Unity?
if so...
I'm assuming the bounding box is given from the video frame's origin (center or perhaps bottom left).
If that is the case then you could do a couple of things. The easiest would be to make your visual rectangle a child of the video player and make its dimensions match what microsoft is returning using localPosition. You may have to adjust if the origin is different in Unity vs Microsoft.
The second way would be to use the transform on the video player and call transformPoint and pass in the points of the bounding box. This will return the world coordinates of your hololens scene.
Taqtile
@mark_grossnickle
Thanks for your support @mark_grossnickle
Can you please just show this with some code as I am new to unity and Hololens ?
I am getting this x,y coordinates from video frame for face detection (mark rectangle around face)
If you take a crack at it and post your code perhaps myself or someone else could point out what is wrong.
Taqtile
@mark_grossnickle
you can see the code here
https://forums.hololens.com/discussion/6360/how-to-show-rectanlge-boxes-for-each-faces-that-is-detected-in-microsoft-hololens#latest