Skip to content

Commit e514617

Browse files
committed
fix issue with right eye calib
1 parent 706e960 commit e514617

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

ZEDCamera/Assets/SDK/Helpers/Scripts/MR/ZEDMixedRealityPlugin.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,9 +402,9 @@ void ZEDReady()
402402

403403
if (hasVRDevice) {
404404
sl.CalibrationParameters parameters = zedCamera.CalibrationParametersRectified;
405-
scaleFromZED = ComputeSizePlaneWithGamma (new sl.Resolution ((uint)zedCamera.ImageWidth, (uint)zedCamera.ImageHeight),
405+
scaleFromZED = ComputeSizePlaneWithGamma (new sl.Resolution (zedCamera.ImageWidth, zedCamera.ImageHeight),
406406
perception_distance, zed2eye_distance, offset.z,
407-
ComputeFocal (new sl.Resolution ((uint)XRSettings.eyeTextureWidth, (uint)XRSettings.eyeTextureHeight)),
407+
ComputeFocal (new sl.Resolution (XRSettings.eyeTextureWidth, XRSettings.eyeTextureHeight)),
408408
parameters.leftCam.fx);
409409

410410
scale(quadCenter.gameObject, scaleFromZED);

ZEDCamera/Assets/SDK/NativeInterface/ZEDCommon.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@ public struct Resolution
7676
/// </summary>
7777
/// <param name="width"></param>
7878
/// <param name="height"></param>
79-
public Resolution(uint width, uint height)
79+
public Resolution(int width, int height)
8080
{
81-
this.width = (System.UIntPtr)width;
82-
this.height = (System.UIntPtr)height;
81+
this.width = width;
82+
this.height = height;
8383
}
8484

85-
public System.UIntPtr width;
86-
public System.UIntPtr height;
85+
public int width;
86+
public int height;
8787
};
8888

8989

@@ -517,7 +517,7 @@ public struct CameraParameters
517517
/// <summary>
518518
/// Distortion coefficients.
519519
/// </summary>
520-
[MarshalAs(UnmanagedType.ByValArray, ArraySubType = UnmanagedType.U8, SizeConst = 12)]
520+
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)]
521521
public double[] disto;
522522

523523
/// <summary>

ZEDCamera/Assets/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "com.stereolabs.zed",
3-
"version": "5.0.0",
3+
"version": "5.0.1",
44
"displayName": "ZED SDK",
55
"description": "This package brings the features of the ZED cameras into Unity",
66
"unity": "2022.3",

0 commit comments

Comments
 (0)