void Start() { VuforiaARController.Instance.RegisterVuforiaStartedCallback(OnVuforiaStarted); NoodleManager.noodleType = NoodleType.normal; // 入力画像用 初期 cameraMat = new Mat(Screen.height, Screen.width, CvType.CV_8UC3); cameraTexture = new Texture2D(cameraMat.cols(), cameraMat.rows(), TextureFormat.RGBA32, false); // 出力画面 初期化 outputScreenQuad = outputCamera1.GetComponent <OutputCamQuad>(); camQuad2 = outputCamera2.GetComponent <OutputCamQuad>(); camQuad3 = outputCamera3.GetComponent <OutputCamQuad>(); camQuad4 = outputCamera4.GetComponent <OutputCamQuad>(); // 飲料領域の初期化 foodRegion = new Region(0, 0, cameraMat.cols(), cameraMat.rows()); // テクスチャCreator初期化 _textureCreator = new NoodleTextureCreator(); // BinaryCreator初期化 binaryMatCreator = new BinaryMatCreator(); binaryMatCreator.setCrUpper(cr_threshold_upper); binaryMatCreator.setCrLower(cr_threshold_lower); binaryMatCreator.setSUpper(s_threshold_upper); binaryMatCreator.setSLower(s_threshold_lower); binaryMatCreator.setVUpper(v_threshold_upper); binaryMatCreator.setVLower(v_threshold_lower); }
public override void OnARMainInited() { // 出力画面 初期化 outputScreenQuad = outputCamera1.GetComponent <OutputCamQuad>(); // 飲料領域の初期化 foodRegion = new Region(0, 0, rgbMat.cols(), rgbMat.rows()); // テクスチャCreator初期化 _textureCreator = new NoodleTextureCreator(); }