question

25424685 avatar image
0 Votes"
25424685 asked FranklinChen-msft commented

Try using hololens2 and UE4, but I followed the instructions provided by unreal engine officail website but failed to get the camera parameters

I tried the instructions of this URL(https://docs.microsoft.com/en-us/windows/mixed-reality/develop/unreal/unreal-hololens-camera?tabs=426) but failed to get the camera parameters we wanted (eg.the location,angle,view,scale).We can't capture any texture and can't show the feed.We used the blueprint methods(we are new to UE4 and Hololens2), so maybe we tried something wrongly or we missed some important operations but we don't know.And this is my first question on stackoverflow. I really hope that someone who knows them it well can help me fix it. And if possible tell me a proper route to learn hololens 2 and UE4 developing. Thanks a lot!

hololens-development
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello,

May I ask some questions to understand your issue?

  1. That instruction contains two versions for different Unreal engines. From your description, I believe you are saying the 4.26 one. If so, could you please give us a screenshot of your Blueprint? Have you installed OpenXR plugin? Any other steps you have done except as described in the documentation will be help for troubleshooting.

  2. Have you seen any exceptions when you debugging your app on HoloLens 2?

0 Votes 0 ·
25424685 avatar image 25424685 FranklinChen-msft ·

Thanks a lot, we can get these parameters now. But we have one more question that we are not sure about is the camera viewport of hololens2 different from the viewport of UE4, we saw something related with(https://docs.microsoft.com/en-us/windows/mixed-reality/develop/unreal/unreal-hololens-camera?tabs=426). But it puzzels me more. The method we use to get camera parameters shows as the following screenshot of our blueprint. We used the coordinates provided by unreal, we are not sure that if it's the correct coordinates of real hololens. And if there's a real offset, how can we solve this?94922-%E5%9B%BE%E7%89%871.png


0 Votes 0 ·
图片1.png (1.6 MiB)
25424685 avatar image 25424685 FranklinChen-msft ·

I can also show you the experiment result of our project. Our main idea is that we take a picture by hololens, then we get the 2D coordinates of something(the thermos and the printer) in this picture. Then we deproject these two things' 2D coordinates of their screensht back to 3D coordinates in the unreal world, then we draw a box at coordinates' position. However, as you can see, we marked the thermos(the first picture) and the printer(the second picture) with the 3D coordinates we caculated from their coordinates in their 2D screenshot with a staticmesh, but they have an obvious offset to leftdown. We speculate that maybe such kind of problem comes from the reason that our camera center is wrong. Did you meet or solve such kind of problem? Can you give me some advice? Thanks a lot!!!!94931-12.jpg94932-23.jpg


0 Votes 0 ·
12.jpg (147.8 KiB)
23.jpg (720.6 KiB)

Hello, we recommend discussing one single question in one Q&A question thread. As you original issue of getting camera parameter has been resolved, if you can share the reason and action you did, it will be good for other developers who have the same issue.
For your new question, I also noticed that you already have a new one in other third-party community platform. Normally we will recommend you posting a new thread in Q&A forum. Thank you for your understanding.

0 Votes 0 ·

0 Answers