Ejemplo n.º 1
0
        // Use this for initialization
        void Start()
        {
            fpsMonitor = GetComponent <FpsMonitor>();

            sourceToMatHelper = gameObject.GetComponent <VideoCaptureToMatHelper>();
            if (string.IsNullOrEmpty(sourceToMatHelper.requestedVideoFilePath))
            {
                sourceToMatHelper.requestedVideoFilePath = VIDEO_FILENAME;
            }
            sourceToMatHelper.outputColorFormat = VideoCaptureToMatHelper.ColorFormat.RGB; // Tracking API must handle 3 channels Mat image.
            sourceToMatHelper.Initialize();
        }
Ejemplo n.º 2
0
        // Use this for initialization
        void Start()
        {
            fpsMonitor = GetComponent <FpsMonitor>();

            sourceToMatHelper = gameObject.GetComponent <VideoCaptureToMatHelper>();

#if UNITY_WEBGL
            getFilePath_Coroutine = GetFilePath();
            StartCoroutine(getFilePath_Coroutine);
#else
            haarcascade_frontalface_alt_xml_filepath = OpenCVForUnity.UnityUtils.Utils.getFilePath("haarcascade_frontalface_alt.xml");
            sp_human_face_68_dat_filepath            = DlibFaceLandmarkDetector.UnityUtils.Utils.getFilePath("sp_human_face_68.dat");
            Run();
#endif
        }
        // Use this for initialization
        void Start()
        {
            fpsMonitor = GetComponent <FpsMonitor>();

            sourceToMatHelper = gameObject.GetComponent <VideoCaptureToMatHelper>();


            dlibShapePredictorFileName = DlibFaceLandmarkDetectorExample.dlibShapePredictorFileName;
#if UNITY_WEBGL
            getFilePath_Coroutine = GetFilePath();
            StartCoroutine(getFilePath_Coroutine);
#else
            dlibShapePredictorFilePath = DlibFaceLandmarkDetector.UnityUtils.Utils.getFilePath(dlibShapePredictorFileName);
            Run();
#endif
        }
        // Use this for initialization
        void Start()
        {
            fpsMonitor = GetComponent <FpsMonitor>();

            drawLowPassFilterToggle.isOn     = drawLowPassFilter;
            drawKalmanFilterToggle.isOn      = drawKalmanFilter;
            drawOpticalFlowFilterToggle.isOn = drawOpticalFlowFilter;
            drawOFAndLPFilterToggle.isOn     = drawOFAndLPFilter;

            sourceToMatHelper = gameObject.GetComponent <VideoCaptureToMatHelper>();


            dlibShapePredictorFileName = DlibFaceLandmarkDetectorExample.dlibShapePredictorFileName;
#if UNITY_WEBGL
            getFilePath_Coroutine = GetFilePath();
            StartCoroutine(getFilePath_Coroutine);
#else
            dlibShapePredictorFilePath = DlibFaceLandmarkDetector.UnityUtils.Utils.getFilePath(dlibShapePredictorFileName);
            Run();
#endif
        }