// Use this for initialization
        IEnumerator Start()
        {
            webCamTextureToMatHelper = gameObject.GetComponent <HololensCameraStreamToMatHelper>();
            webCamTextureToMatHelper.outputColorFormat = WebCamTextureToMatHelper.ColorFormat.GRAY;

            // fix the screen orientation.
            Screen.orientation = ScreenOrientation.LandscapeLeft;
            // wait for the screen orientation to change.
            yield return(null);

            if (markerTypeDropdown.value != (int)markerType || dictionaryIdDropdown.value != (int)dictionaryId ||
                squaresXDropdown.value != (int)squaresX - 1 || squaresYDropdown.value != (int)squaresY - 1)
            {
                markerTypeDropdown.value   = (int)markerType;
                dictionaryIdDropdown.value = (int)dictionaryId;
                squaresXDropdown.value     = (int)squaresX - 1;
                squaresYDropdown.value     = (int)squaresY - 1;
            }
            dictionaryIdDropdown.interactable = (markerType == MarkerType.ChArUcoBoard);

#if UNITY_WEBGL && !UNITY_EDITOR
            isImagesInputMode = false;
#endif
            if (isImagesInputMode)
            {
                isImagesInputMode = InitializeImagesInputMode();
            }

            if (!isImagesInputMode)
            {
                webCamTextureToMatHelper.Initialize();
            }
        }
示例#2
0
 // Use this for initialization
 void Start()
 {
     webCamTextureToMatHelper = gameObject.GetComponent <HololensCameraStreamToMatHelper> ();
     #if NETFX_CORE && !DISABLE_HOLOLENSCAMSTREAM_API
     webCamTextureToMatHelper.frameMatAcquired += OnFrameMatAcquired;
     #endif
     webCamTextureToMatHelper.Initialize();
 }
示例#3
0
        // Use this for initialization
        protected void Start()
        {
            webCamTextureToMatHelper = gameObject.GetComponent <HololensCameraStreamToMatHelper> ();
            #if WINDOWS_UWP && !DISABLE_HOLOLENSCAMSTREAM_API
            webCamTextureToMatHelper.frameMatAcquired += OnFrameMatAcquired;
            #endif
            webCamTextureToMatHelper.Initialize();

            VignetteScaleSlider.value = vignetteScale;
        }
示例#4
0
        // Use this for initialization
        protected override void Start()
        {
            base.Start();

            webCamTextureToMatHelper = gameObject.GetComponent <HololensCameraStreamToMatHelper> ();
            #if WINDOWS_UWP && !DISABLE_HOLOLENSCAMSTREAM_API
            webCamTextureToMatHelper.frameMatAcquired += OnFrameMatAcquired;
            #endif
            webCamTextureToMatHelper.Initialize();
        }
        private int numFrames  = 0;       // calculating FPS

        // Use this for initialization
        protected void Start()
        {
            if (!isVisibleImage)
            {
                this.gameObject.transform.localScale = new Vector3(0.0f, 0.0f, 0.0f);
            }
            redSphere   = GameObject.Find("Sphere");
            toolTipText = redSphere.transform.Find("ToolTip/Label").GetComponent <TextMeshPro>();
            webCamTextureToMatHelper = gameObject.GetComponent <HololensCameraStreamToMatHelper>();
            InitWebCamHelper();
        }
        // Use this for initialization
        void Start()
        {
            //useSeparateDetectionToggle.isOn = useSeparateDetection;

            webCamTextureToMatHelper = gameObject.GetComponent <HololensCameraStreamToMatHelper> ();
            #if NETFX_CORE && !DISABLE_HOLOLENSCAMSTREAM_API
            webCamTextureToMatHelper.frameMatAcquired += OnFrameMatAcquired;
            #endif
            webCamTextureToMatHelper.Initialize();

            rectangleTracker = new RectangleTracker();
            rectOverlay      = gameObject.GetComponent <RectOverlay> ();
        }
示例#7
0
        // Use this for initialization
        void Start()
        {
            displayCameraPreviewToggle.isOn      = displayCameraPreview;
            useStoredCameraParametersToggle.isOn = useStoredCameraParameters;
            enableLowPassFilterToggle.isOn       = enableLowPassFilter;

            imageOptimizationHelper  = gameObject.GetComponent <ImageOptimizationHelper> ();
            webCamTextureToMatHelper = gameObject.GetComponent <HololensCameraStreamToMatHelper> ();
            #if NETFX_CORE && !DISABLE_HOLOLENSCAMSTREAM_API
            webCamTextureToMatHelper.frameMatAcquired += OnFrameMatAcquired;
            #endif

            webCamTextureToMatHelper.Initialize();
        }
示例#8
0
        // Use this for initialization
        protected void Start()
        {
            displayCameraPreviewToggle.isOn      = displayCameraPreview;
            useStoredCameraParametersToggle.isOn = useStoredCameraParameters;
            enableDownScaleToggle.isOn           = enableDownScale;
            enableLerpFilterToggle.isOn          = enableLerpFilter;

            imageOptimizationHelper  = gameObject.GetComponent <ImageOptimizationHelper>();
            webCamTextureToMatHelper = gameObject.GetComponent <HololensCameraStreamToMatHelper>();
#if WINDOWS_UWP && !DISABLE_HOLOLENSCAMSTREAM_API
            webCamTextureToMatHelper.frameMatAcquired += OnFrameMatAcquired;
#endif
            webCamTextureToMatHelper.outputColorFormat = WebCamTextureToMatHelper.ColorFormat.GRAY;
            webCamTextureToMatHelper.Initialize();
        }
        // Use this for initialization
        protected void Start()
        {
            imageOptimizationHelper  = gameObject.GetComponent <ImageOptimizationHelper>();
            webCamTextureToMatHelper = gameObject.GetComponent <HololensCameraStreamToMatHelper>();
#if WINDOWS_UWP && !DISABLE_HOLOLENSCAMSTREAM_API
            webCamTextureToMatHelper.frameMatAcquired += OnFrameMatAcquired;
#endif
            webCamTextureToMatHelper.Initialize();

            rectangleTracker = new RectangleTracker();
            rectOverlay      = gameObject.GetComponent <RectOverlay>();

            useSeparateDetectionToggle.isOn = useSeparateDetection;
            enableDownScaleToggle.isOn      = enableDownScale;
        }
示例#10
0
        //HololensVideoWriterAsPlugin recorder;

        // Use this for initialization
        protected override void Start()
        {
            fpsMonitor = GetComponent <FpsMonitor>();

            base.Start();

            webCamTextureToMatHelper = gameObject.GetComponent <HololensCameraStreamToMatHelper>();

            #if NETFX_CORE && !DISABLE_HOLOLENSCAMSTREAM_API
            webCamTextureToMatHelper.frameMatAcquired += OnFrameMatAcquired;
            #endif
            webCamTextureToMatHelper.Initialize();

            cameraInstance = GameObject.FindWithTag("MainCamera").GetComponent <Camera>();

            //29n
            //recorder = gameObject.GetComponent<HololensVideoWriterAsPlugin>();
        }
        // Use this for initialization
        new IEnumerator Start()
        {
            camera = FindObjectOfType <HoloToolkit.Unity.InputModule.MixedRealityCameraManager>();
            cursor = FindObjectOfType <HoloToolkit.Unity.InputModule.Cursor>();
            input  = FindObjectOfType <HoloToolkit.Unity.InputModule.InputManager>();

            webCamTextureToMatHelper = gameObject.GetComponent <HololensCameraStreamToMatHelper> ();

            // fix the screen orientation.
            Screen.orientation = ScreenOrientation.LandscapeLeft;
            // wait for the screen orientation to change.
            yield return(null);

            if (markerTypeDropdown.value != (int)markerType || dictionaryIdDropdown.value != (int)dictionaryId ||
                squaresXDropdown.value != (int)squaresX - 1 || squaresYDropdown.value != (int)squaresY - 1)
            {
                markerTypeDropdown.value   = (int)markerType;
                dictionaryIdDropdown.value = (int)dictionaryId;
                squaresXDropdown.value     = (int)squaresX - 1;
                squaresYDropdown.value     = (int)squaresY - 1;
            }
            dictionaryIdDropdown.interactable = (markerType == MarkerType.ChArUcoBoard);

            #if UNITY_WEBGL && !UNITY_EDITOR
            isImagesInputMode = false;
            #endif
            if (isImagesInputMode)
            {
                isImagesInputMode = InitializeImagesInputMode();
            }

            if (!isImagesInputMode)
            {
                webCamTextureToMatHelper.Initialize();
            }
        }