We have decided to phase out the Mixed Reality Forums over the next few months in favor of other ways to connect with us.
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.
The plan between now and the beginning of May is to clean up old, unanswered questions that are no longer relevant. The forums will remain open and usable.
On May 1st we will be locking the forums to new posts and replies. They will remain available for another three months for the purposes of searching them, and then they will be closed altogether on August 1st.
So, where does that leave our awesome community to ask questions? Well, there are a few places we want to engage with you. 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. And always feel free to hit us up on Twitter @MxdRealityDev.
Hololens in Camera (Resolution Differences when Taking a Photo and Using Unity's Camera GameObject)
I'm trying to use the Hololens camera to take a photo, run an OCR on the photo, and then place tags in world space based on the pixel coordinates I get from the OCR. However, I find that the world coordinates are little bit off because of the different image resolutions I'm using.
When I take a photo using the Hololens camera, I take the photo in 2048x1152. I send this to the OCR and get back pixel coordinates. During this time, I position a second camera (not the main camera) to where I took the picture. Then, I raycast from this camera using Unity's Camera.ScreenPointToRay function. However, the Unity camera is 1280x720. Even if I scale the pixel coordinates from the 2048x1152 resolution to the 1280x720 resolution, the tags are still off in world space. It seems like the Hololens is cropping the photo instead of scaling since nothing can be raycasted outside the 1280x720 resolution. I think this is the issue because when I take the photo in 1280x720, everything shows up correctly. However, I'd like to make the field of view bigger so using 2048x1152 would be ideal.
Unfortunately, Unity cameras have read-only pixel width and height so I can't change the resolution. I tried to do Screen.SetResolution(2048, 1152, false) but that didn't work so well. I look at https://developer.microsoft.com/en-us/windows/holographic/locatable_camera, but didn't find much on changing the resolution of the Unity camera.
Has anyone encountered this problem or have suggestions? Thanks!