|
1 | 1 | using UnityEngine; |
2 | 2 | using System.Collections; |
| 3 | +using OpenCVForUnity.CoreModule; |
| 4 | +using OpenCVForUnity.ImgprocModule; |
| 5 | +using OpenCVForUnity.UnityUtils; |
| 6 | + |
3 | 7 |
|
4 | 8 | #if UNITY_5_3 || UNITY_5_3_OR_NEWER |
5 | 9 | using UnityEngine.SceneManagement; |
@@ -69,9 +73,9 @@ void Update () |
69 | 73 | // Utils.texture2DToMat(videoTexture, rgbaMat); |
70 | 74 | Utils.fastTexture2DToMat (videoTexture, rgbaMat); |
71 | 75 |
|
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); |
73 | 77 |
|
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); |
75 | 79 |
|
76 | 80 | // Utils.matToTexture2D (rgbaMat, texture, colors); |
77 | 81 | Utils.fastMatToTexture2D (rgbaMat, texture); |
|
0 commit comments