EnoxSoftware / HoloLensWithOpenCVForUnityExample

HoloLens With OpenCVforUnity Example (Support for Hololens1 and Hololens2)
MIT License
262 stars 50 forks source link

obtaining CameraIntrinsics in photo mode for a different camera size (resolution) #12

Closed naraz closed 1 year ago

naraz commented 6 years ago

Hi,

I'm trying to get the intrinsic Parameters of my HoloLens at a resolution of 2048x1152 (PhotoMode). Modifying CameraIntrinsicsCheckerHelper.cs
Line 165 to: x.Width == 2048 && and Line 166 to: x.Height == 1152 &&

yields to following Problem in the VisualStudio output window:

Exception thrown: 'System.ArgumentException' in Assembly-CSharp.dll Unhandled 'Platform.InvalidArgumentException' exception caught! - 'The parameter is incorrect. Value does not fall within the expected range.', Sender: ''. Missing try/catch blocks. (Filename: C:\buildslave\unity\build\PlatformDependent/MetroPlayer/MetroDebug.cpp Line: 46)

I guess this is because the camera doesn't support video mode in that resolution as doucemented here in the first table.

Is it possible to get the intrinsics in photo mode instead of video mode?