Skip to content

Commit 29c79cd

Browse files
committed
v1.0.6 update OpenCVForUnity version to 2.5.0.
1 parent 430cad4 commit 29c79cd

File tree

6 files changed

+13
-12
lines changed

6 files changed

+13
-12
lines changed

Assets/HoloLensWithOpenCVForUnityExample/HLArUcoExample/HLArUcoExample.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -976,7 +976,7 @@ public void OnStopButtonClick()
976976
/// </summary>
977977
public void OnChangeCameraButtonClick()
978978
{
979-
webCamTextureToMatHelper.requestedIsFrontFacing = !webCamTextureToMatHelper.IsFrontFacing();
979+
webCamTextureToMatHelper.requestedIsFrontFacing = !webCamTextureToMatHelper.requestedIsFrontFacing;
980980
}
981981

982982
/// <summary>

Assets/HoloLensWithOpenCVForUnityExample/HLCameraStreamToMatHelperExample/HLCameraStreamToMatHelperExample.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ public void OnStopButtonClick()
383383
/// </summary>
384384
public void OnChangeCameraButtonClick()
385385
{
386-
webCamTextureToMatHelper.requestedIsFrontFacing = !webCamTextureToMatHelper.IsFrontFacing();
386+
webCamTextureToMatHelper.requestedIsFrontFacing = !webCamTextureToMatHelper.requestedIsFrontFacing;
387387
}
388388

389389
/// <summary>

Assets/HoloLensWithOpenCVForUnityExample/HLFaceDetectionExample/HLFaceDetectionExample.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -250,24 +250,24 @@ public void OnWebCamTextureToMatHelperInitialized()
250250

251251

252252
cascade = new CascadeClassifier();
253-
cascade.load(Utils.getFilePath("objdetect/lbpcascade_frontalface.xml"));
253+
cascade.load(Utils.getFilePath("OpenCVForUnity/objdetect/lbpcascade_frontalface.xml"));
254254
#if !WINDOWS_UWP || UNITY_EDITOR
255255
// "empty" method is not working on the UWP platform.
256256
if (cascade.empty())
257257
{
258-
Debug.LogError("cascade file is not loaded. Please copy from “OpenCVForUnity/StreamingAssets/objdetect/” to “Assets/StreamingAssets/objdetect/” folder. ");
258+
Debug.LogError("cascade file is not loaded. Please copy from “OpenCVForUnity/StreamingAssets/OpenCVForUnity/objdetect/” to “Assets/StreamingAssets/OpenCVForUnity/objdetect/” folder. ");
259259
}
260260
#endif
261261

262262
grayMat4Thread = new Mat();
263263
cascade4Thread = new CascadeClassifier();
264-
//cascade4Thread.load(Utils.getFilePath("objdetect/haarcascade_frontalface_alt.xml"));
265-
cascade4Thread.load(Utils.getFilePath("objdetect/lbpcascade_frontalface.xml"));
264+
//cascade4Thread.load(Utils.getFilePath("OpenCVForUnity/objdetect/haarcascade_frontalface_alt.xml"));
265+
cascade4Thread.load(Utils.getFilePath("OpenCVForUnity/objdetect/lbpcascade_frontalface.xml"));
266266
#if !WINDOWS_UWP || UNITY_EDITOR
267267
// "empty" method is not working on the UWP platform.
268268
if (cascade4Thread.empty())
269269
{
270-
Debug.LogError("cascade file is not loaded. Please copy from “OpenCVForUnity/StreamingAssets/objdetect/” to “Assets/StreamingAssets/objdetect/” folder. ");
270+
Debug.LogError("cascade file is not loaded. Please copy from “OpenCVForUnity/StreamingAssets/OpenCVForUnity/objdetect/” to “Assets/StreamingAssets/OpenCVForUnity/objdetect/” folder. ");
271271
}
272272
#endif
273273
}
@@ -834,7 +834,7 @@ public void OnStopButtonClick()
834834
/// </summary>
835835
public void OnChangeCameraButtonClick()
836836
{
837-
webCamTextureToMatHelper.requestedIsFrontFacing = !webCamTextureToMatHelper.IsFrontFacing();
837+
webCamTextureToMatHelper.requestedIsFrontFacing = !webCamTextureToMatHelper.requestedIsFrontFacing;
838838
}
839839

840840
/// <summary>

Assets/HoloLensWithOpenCVForUnityExample/HLPhotoCaptureExample/HLPhotoCaptureExample.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ private IEnumerator Start()
4646
faces = new MatOfRect();
4747

4848
cascade = new CascadeClassifier();
49-
cascade.load(Utils.getFilePath("objdetect/haarcascade_frontalface_alt.xml"));
49+
cascade.load(Utils.getFilePath("OpenCVForUnity/objdetect/haarcascade_frontalface_alt.xml"));
5050

5151

5252
var resolutions = PhotoCapture.SupportedResolutions;

ProjectAssets.jpg

16 KB
Loading

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* Visual Studio 2019
1616
* Unity 2019.4.31f1 / 2020.3.38f1
1717
* [Microsoft Mixed Reality Toolkit](https://github.com/Microsoft/MixedRealityToolkit-Unity/releases) v2.8.2
18-
* [OpenCV for Unity](https://assetstore.unity.com/packages/tools/integration/opencv-for-unity-21088?aid=1011l4ehR) 2.4.9+
18+
* [OpenCV for Unity](https://assetstore.unity.com/packages/tools/integration/opencv-for-unity-21088?aid=1011l4ehR) 2.5.0+
1919
* [EnoxSoftware/HoloLensCameraStream](https://github.com/EnoxSoftware/HoloLensCameraStream)
2020

2121

@@ -24,8 +24,9 @@
2424
1. Create a new project. (`HoloLensWithOpenCVForUnityExample`)
2525
* Change the platform to `UWP` in the "Build Settings" window.
2626
1. Import the OpenCVForUnity.
27-
* Setup the OpenCVForUnity. (Tools > OpenCV for Unity > Set Plugin Import Settings)
28-
* Move the "OpenCVForUnity/StreamingAssets/objdetect/haarcascade_frontalface_alt.xml" and "OpenCVForUnity/StreamingAssets/objdetect/lbpcascade_frontalface.xml" to the "Assets/StreamingAssets/objdetect/" folder.
27+
* Select MenuItem[Tools/OpenCV for Unity/Open Setup Tools].
28+
* Click the [Move StreamingAssets Folder] button.
29+
* Leave the following files and delete the rest. ("StreamingAssets/OpenCVForUnity/objdetect/haarcascade_frontalface_alt.xml", "lbpcascade_ frontalface.xml")
2930
1. Clone HoloLensCameraStream repository.
3031
* Copy the "HoloLensCameraStream/HoloLensVideoCaptureExample/Assets/CamStream/" folder to the "Assets/" folder.
3132
1. Import the Microsoft Mixed Reality Toolkit. (Recommend using [MixedRealityFeatureTool](https://www.microsoft.com/en-us/download/details.aspx?id=102778))

0 commit comments

Comments
 (0)