Skip to content
This repository was archived by the owner on Dec 16, 2024. It is now read-only.

Commit 032e921

Browse files
committed
Support for OpenCVforUnity2.3.3
1 parent 3b35abc commit 032e921

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

Assets/VideoPlayerWithOpenCVForUnityExample/VideoPlayerWithOpenCVForUnityExample.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
using UnityEngine;
22
using System.Collections;
3+
using OpenCVForUnity.CoreModule;
4+
using OpenCVForUnity.ImgprocModule;
5+
using OpenCVForUnity.UnityUtils;
6+
37

48
#if UNITY_5_3 || UNITY_5_3_OR_NEWER
59
using UnityEngine.SceneManagement;
@@ -69,9 +73,9 @@ void Update ()
6973
// Utils.texture2DToMat(videoTexture, rgbaMat);
7074
Utils.fastTexture2DToMat (videoTexture, rgbaMat);
7175

72-
Imgproc.putText (rgbaMat, "VideoPlayer With OpenCV for Unity Example", new Point (100, rgbaMat.rows () / 2), Core.FONT_HERSHEY_SIMPLEX, 1.5, new Scalar (255, 0, 0, 255), 5, Imgproc.LINE_AA, false);
76+
Imgproc.putText (rgbaMat, "VideoPlayer With OpenCV for Unity Example", new Point (100, rgbaMat.rows () / 2), Imgproc.FONT_HERSHEY_SIMPLEX, 1.5, new Scalar (255, 0, 0, 255), 5, Imgproc.LINE_AA, false);
7377

74-
Imgproc.putText (rgbaMat, "width:" + rgbaMat.width () + " height:" + rgbaMat.height () + " frame:" + videoPlayer.frame, new Point (5, rgbaMat.rows () - 10), Core.FONT_HERSHEY_SIMPLEX, 1.5, new Scalar (255, 255, 255, 255), 5, Imgproc.LINE_AA, false);
78+
Imgproc.putText (rgbaMat, "width:" + rgbaMat.width () + " height:" + rgbaMat.height () + " frame:" + videoPlayer.frame, new Point (5, rgbaMat.rows () - 10), Imgproc.FONT_HERSHEY_SIMPLEX, 1.5, new Scalar (255, 255, 255, 255), 5, Imgproc.LINE_AA, false);
7579

7680
// Utils.matToTexture2D (rgbaMat, texture, colors);
7781
Utils.fastMatToTexture2D (rgbaMat, texture);

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ Screen Shot
88

99
Environment
1010
-----
11-
* Unity 5.6.0f3
12-
* [OpenCV for Unity](https://assetstore.unity.com/packages/tools/integration/opencv-for-unity-21088?aid=1011l4ehR) 2.1.6
11+
* Unity 5.6.6f2
12+
* [OpenCV for Unity](https://assetstore.unity.com/packages/tools/integration/opencv-for-unity-21088?aid=1011l4ehR) 2.3.3
1313

1414

1515
Setup
1616
-----
1717
* Create New Project. (VideoPlayerWithOpenCVForUnityExample)
18-
* Import OpenCV for Unity 2.1.6 from AssetStore
18+
* Import OpenCV for Unity 2.3.3 from AssetStore
1919
* Import VideoPlayerWithOpenCVForUnityExample.unitypackage
32 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)