Exemple #1
0
    void Start()
    {
        itemManager = GetComponent <ItemManager>();

        webcam = GetComponent <HololensCameraUWP>();

        faceRenderer = GetComponent <FaceRenderer>();
        faceRenderer.SetWebcam(webcam);

        localFaceTracker   = new LocalFaceTracker(LocalTrackerNumberOfIters, LocalTrackerConfidenceThreshold);
        backendFaceTracker = new BackendFaceTracker(nLandmarks, BackendTrackerConfidenceThreshold, 43002, localFaceTracker);

        if (PhraseRecognitionSystem.isSupported)
        {
            keywordCollection = new Dictionary <string, KeywordAction>();

            keywordCollection.Add("Show debug", ShowDebug);
            keywordCollection.Add("Hide debug", HideDebug);
            keywordCollection.Add("Computer", BackendProcessing);
            keywordCollection.Add("Local", LocalProcessing);
            keywordCollection.Add("Show face", ShowFace);
            keywordCollection.Add("Hide face", HideFace);

            keywordRecognizer = new KeywordRecognizer(keywordCollection.Keys.ToArray());
            keywordRecognizer.OnPhraseRecognized += KeywordRecognizer_OnPhraseRecognized;
            keywordRecognizer.Start();
        }
        if (FPSText != null)
        {
            FPSText.text = "";
        }
    }
Exemple #2
0
 public void SetWebcam(HololensCameraUWP webcam)
 {
     this.webcam = webcam;
 }