Skip to content

Commit 2ce6c15

Browse files
committed
v1.0.9.1 Updated OpenCVForUnity version to 2.6.5.
1 parent b3bd683 commit 2ce6c15

File tree

2 files changed

+22
-14
lines changed

2 files changed

+22
-14
lines changed

HLWithOpenCVExampleMRTK2/Assets/HoloLensWithOpenCVForUnityExample/Scripts/Utils/HLCameraStream2MatHelper.cs

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -499,13 +499,13 @@ protected virtual void OnFrameSampleAcquired(VideoCaptureSample sample)
499499
Core.rotate(mat, rotatedFrameMat, Core.ROTATE_90_CLOCKWISE);
500500
mat.Dispose();
501501

502-
FlipMat(rotatedFrameMat, _flipVertical, _flipHorizontal);
502+
FlipMat(rotatedFrameMat, _flipVertical, _flipHorizontal, false, 0);
503503

504504
frameMatAcquired.Invoke(rotatedFrameMat, projectionMatrix, cameraToWorldMatrix, cameraIntrinsics);
505505
}
506506
else
507507
{
508-
FlipMat(mat, _flipVertical, _flipHorizontal);
508+
FlipMat(mat, _flipVertical, _flipHorizontal, false, 0);
509509

510510
frameMatAcquired.Invoke(mat, projectionMatrix, cameraToWorldMatrix, cameraIntrinsics);
511511
}
@@ -1030,23 +1030,27 @@ public override Mat GetMat()
10301030
if (rotatedFrameMat != null)
10311031
{
10321032
Core.rotate(frameMat, rotatedFrameMat, Core.ROTATE_90_CLOCKWISE);
1033-
FlipMat(rotatedFrameMat, _flipVertical, _flipHorizontal);
1033+
FlipMat(rotatedFrameMat, _flipVertical, _flipHorizontal, false, 0);
10341034

10351035
return rotatedFrameMat;
10361036
}
10371037
else
10381038
{
1039-
FlipMat(frameMat, _flipVertical, _flipHorizontal);
1039+
FlipMat(frameMat, _flipVertical, _flipHorizontal, false, 0);
10401040

10411041
return frameMat;
10421042
}
10431043
}
10441044

10451045
/// <summary>
1046-
/// Flip the mat.
1046+
/// Flip Mat
10471047
/// </summary>
1048-
/// <param name="mat">Mat.</param>
1049-
protected override void FlipMat(Mat mat, bool flipVertical, bool flipHorizontal)
1048+
/// <param name="mat"></param>
1049+
/// <param name="flipVertical"></param>
1050+
/// <param name="flipHorizontal"></param>
1051+
/// <param name="isFrontFacing"></param>
1052+
/// <param name="videoRotationAngle"></param>
1053+
protected override void FlipMat(Mat mat, bool flipVertical, bool flipHorizontal, bool isFrontFacing, int videoRotationAngle)
10501054
{
10511055
int flipCode = int.MinValue;
10521056

HLWithOpenCVExampleMRTK3/Assets/HoloLensWithOpenCVForUnityExample/Scripts/Utils/HLCameraStream2MatHelper.cs

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -499,13 +499,13 @@ protected virtual void OnFrameSampleAcquired(VideoCaptureSample sample)
499499
Core.rotate(mat, rotatedFrameMat, Core.ROTATE_90_CLOCKWISE);
500500
mat.Dispose();
501501

502-
FlipMat(rotatedFrameMat, _flipVertical, _flipHorizontal);
502+
FlipMat(rotatedFrameMat, _flipVertical, _flipHorizontal, false, 0);
503503

504504
frameMatAcquired.Invoke(rotatedFrameMat, projectionMatrix, cameraToWorldMatrix, cameraIntrinsics);
505505
}
506506
else
507507
{
508-
FlipMat(mat, _flipVertical, _flipHorizontal);
508+
FlipMat(mat, _flipVertical, _flipHorizontal, false, 0);
509509

510510
frameMatAcquired.Invoke(mat, projectionMatrix, cameraToWorldMatrix, cameraIntrinsics);
511511
}
@@ -1030,23 +1030,27 @@ public override Mat GetMat()
10301030
if (rotatedFrameMat != null)
10311031
{
10321032
Core.rotate(frameMat, rotatedFrameMat, Core.ROTATE_90_CLOCKWISE);
1033-
FlipMat(rotatedFrameMat, _flipVertical, _flipHorizontal);
1033+
FlipMat(rotatedFrameMat, _flipVertical, _flipHorizontal, false, 0);
10341034

10351035
return rotatedFrameMat;
10361036
}
10371037
else
10381038
{
1039-
FlipMat(frameMat, _flipVertical, _flipHorizontal);
1039+
FlipMat(frameMat, _flipVertical, _flipHorizontal, false, 0);
10401040

10411041
return frameMat;
10421042
}
10431043
}
10441044

10451045
/// <summary>
1046-
/// Flip the mat.
1046+
/// Flip Mat
10471047
/// </summary>
1048-
/// <param name="mat">Mat.</param>
1049-
protected override void FlipMat(Mat mat, bool flipVertical, bool flipHorizontal)
1048+
/// <param name="mat"></param>
1049+
/// <param name="flipVertical"></param>
1050+
/// <param name="flipHorizontal"></param>
1051+
/// <param name="isFrontFacing"></param>
1052+
/// <param name="videoRotationAngle"></param>
1053+
protected override void FlipMat(Mat mat, bool flipVertical, bool flipHorizontal, bool isFrontFacing, int videoRotationAngle)
10501054
{
10511055
int flipCode = int.MinValue;
10521056

0 commit comments

Comments
 (0)