Beispiel #1
0
        // Use this for initialization
        void Start()
        {
            #if !UNITY_WEBGL || UNITY_EDITOR
            weightsPositionsSmoothing.Add(1);
            weightsSizesSmoothing.Add(0.5f);
            weightsSizesSmoothing.Add(0.3f);
            weightsSizesSmoothing.Add(0.2f);

            //parameters.minObjectSize = 96;
            //parameters.maxObjectSize = int.MaxValue;
            //parameters.scaleFactor = 1.1f;
            //parameters.minNeighbors = 2;
            parameters.maxTrackLifetime = 5;

            innerParameters.numLastPositionsToTrack       = 4;
            innerParameters.numStepsToWaitBeforeFirstShow = 6;
            innerParameters.numStepsToTrackWithoutDetectingIfObjectHasNotBeenShown = 3;
            innerParameters.numStepsToShowWithoutDetecting    = 3;
            innerParameters.coeffTrackingWindowSize           = 2.0f;
            innerParameters.coeffObjectSizeToTrack            = 0.85f;
            innerParameters.coeffObjectSpeedUsingInPrediction = 0.8f;
            #endif

            webCamTextureToMatHelper = gameObject.GetComponent <OptimizationWebCamTextureToMatHelper> ();
            webCamTextureToMatHelper.Init();

            rectOverlay = gameObject.GetComponent <RectOverlay> ();
        }
        // Use this for initialization
        void Start()
        {
            isUsingSeparateDetectionToggle.isOn = isUsingSeparateDetection;
            isShowingWebCamImageToggle.isOn     = isShowingWebCamImage;

            webCamTextureToMatHelper = gameObject.GetComponent <OptimizationWebCamTextureToMatHelper> ();
            webCamTextureToMatHelper.Init();

            rectangleTracker = new RectangleTracker();
        }
        // Use this for initialization
        void Start()
        {
            useSeparateDetectionToggle.isOn = useSeparateDetection;
            displayCameraImageToggle.isOn   = displayCameraImage;

            webCamTextureToMatHelper = gameObject.GetComponent <OptimizationWebCamTextureToMatHelper> ();
            webCamTextureToMatHelper.Initialize();

            rectangleTracker = new RectangleTracker();
        }
 // Use this for initialization
 void Start()
 {
     webCamTextureToMatHelper = gameObject.GetComponent <OptimizationWebCamTextureToMatHelper> ();
     webCamTextureToMatHelper.Init();
 }