Created
July 13, 2017 00:14
-
-
Save olokobayusuf/9b711c529fdf5475ac9cfbc8bf9a615f to your computer and use it in GitHub Desktop.
This is an example script that demonstrates using the new OpenCVBehaviour in NatCam Professional 1.6.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using NatCamU.Core; | |
using NatCamU.Professional; | |
using OpenCVForUnity; | |
public class DrawLine : OpenCVBehaviour { | |
public override void OnMatrix () { | |
// Draw a diagonal line on our image | |
Imgproc.line(matrix, new Point(0, 0), new Point(matrix.cols(), matrix.rows()), new Scalar(255, 0, 0, 255), 4); | |
// Display it | |
preview.texture = texture; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment