void Awake() { openCVImage = OpenCVImage.Instance(webCamHeight, webCamWidth); renderTexture = new RenderTexture (webCamWidth, webCamHeight, 16); screenShot = new Texture2D (webCamWidth, webCamHeight); screenShotRect = new Rect (0, 0, webCamWidth, webCamHeight); }
public ContinueExercise() { _srcBinaryImage = new Mat(); _removeBgImage = new Mat(); openCVImage = OpenCVImage.Instance(); size = new Size(5, 5); point = new Point(3, 3); StructuringElement = Cv2.GetStructuringElement(MorphShapes.Ellipse, size, point); }
public StepByStep() { openCVImage = OpenCVImage.Instance(); _srcBinaryImage = new Mat(); _middleImage = new Mat(); StructuringElement = Cv2.GetStructuringElement( MorphShapes.Ellipse, new Size(5, 5), new Point(3, 3)); _dstImageBuffer = new Mat(); stepImageBufferOfBuffer = new Mat(); stepImageBuffer = new Mat[2]; }
void Update() { if (this.isActiveAndEnabled) { text.text = (int)time + " / " + (int)(endTime - 1) + "초 안에 자세를 잡아주세요!\n" + currentExercise + " " + currentStep + " / " + maxStep; switch (currentStep) { case 1: time += Time.deltaTime; if (time >= endTime) { OpenCVImage.Instance().stepOne = true; nextCurrentStep(); okay.PlayOneShot(okay.clip); GameObject.Find("/ImageTarget/Beta") .GetComponent <BetaController>().nextStep(); } break; case 2: time += Time.deltaTime; if (time >= endTime) { OpenCVImage.Instance().stepTwo = true; nextCurrentStep(); okay.PlayOneShot(okay.clip); } break; case 3: text.text = "잘하셨습니다!"; if (!okay.isPlaying) { Init(); GameObject.Find("/ImageTarget/Beta") .GetComponent <BetaController>().endStep(); GameObject.Find("/ImageTarget/Beta") .GetComponent <BetaController>().stopExerciseAnimation(); GameObject.Find("/Managers/Canvas Manager") .GetComponent <CanvasManager>().nextCanvas(); } break; default: break; } } }
void Awake() { openCVImage = OpenCVImage.Instance(webCamHeight, webCamWidth); webCamImage = new Texture2D(webCamHeight, webCamWidth); }
void Start() { openCVImage = OpenCVImage.Instance(); }
void Awake() { openCVImage = OpenCVImage.Instance(webCamHeight, webCamWidth); }