librealsense icon indicating copy to clipboard operation
librealsense copied to clipboard

Access Camera Intrinsics in Unity Wrapper

Open gjmsoftware opened this issue 8 years ago • 3 comments

Issue Description

My project requires the camera intrinsic information, which changes for each camera (D400). Accessing this information is fairly straight forward in the C# wrapper by calling the "GetInstrinics()" method on the "VideoStreamProfile" object. However, I'm not sure how to access the "VideoStreamProfile"within the current Unity wrapper example.

I'm hoping someone could provide me insight in how-to successfully call the "GetInstrinics()" function in the current Unity wrapper example.

FYI, the main variables I'm trying to access are: ppx, ppy, fx, and fy.


System Information

Required Info
Camera Model D415
Firmware Version 05.08.15.00
Operating System & Version Win 10
Platform Unity - 5.5.1f1
SDK Version V2.10.2

gjmsoftware avatar Apr 18 '18 17:04 gjmsoftware

Hi Greg, If you know how to do it in C# with a device then all you need to do in Unity is get the device in your script. Please see how it's done in RealSenseDeviceInspector and follow the same way, which is basically to get the active profile of the RealSenseDevice and take the device from it.

zivsha avatar Apr 19 '18 06:04 zivsha

Thanks for the guidance @zivsha - it helped and I was able to solve my issue fairly quickly.

gjmsoftware avatar Apr 20 '18 20:04 gjmsoftware

Hello @gjmsoftware ,I also need to get the intrinsics in unity, but I don't know how to find the function "GetInstrinics()". Can you help me? May be I need a more detailed steps. Thanks a lot!!!

coldcoda avatar May 11 '20 12:05 coldcoda