Пример #1
0
    /// <summary>
    /// Called on initialization
    /// </summary>
    private void Awake()
    {
        // このクラスのインスタンスをシングルトンとして利用する。
        Instance = this;

        // このゲームオブジェクトにImageCaptureクラスを追加
        gameObject.AddComponent <ImageCapture>();

        // このゲームオブジェクトにCustomVisionAnalyserクラスを追加
        gameObject.AddComponent <CustomVisionAnalyser>();

        // このゲームオブジェクトにCustomVisionTrainerクラスを追加
        gameObject.AddComponent <CustomVisionTrainer>();

        // このゲームオブジェクトにVoiceRecognizerクラスを追加
        gameObject.AddComponent <VoiceRecognizer>();

        // このゲームオブジェクトにCustomVisionObjectsクラスを追加
        gameObject.AddComponent <CustomVisionObjects>();

        // このゲームオブジェクトにCustomVisionObjectsクラスを追加
        gameObject.AddComponent <FaceDetect>();

        // カメラのカーソルを作成する。
        cursor = CreateCameraCursor();

        // 解析結果を表示するラベルを作成する。
        label = CreateLabel();

        // カメラの現在のステータスを表示するテキストを作成します。
        cameraStatusIndicator = CreateTrainingUI("Status Indicator", 0.04f, 0.2f, 3, true);

        // カメラの現在のステータスを読み込み中にする。
        SetCameraStatus("読み込み中です");
    }
Пример #2
0
    /// <summary>
    /// Called on initialization
    /// </summary>
    private void Awake()
    {
        // Use this class instance as singleton
        Instance = this;

        // Add the ImageCapture class to this GameObject
        gameObject.AddComponent <ImageCaptureCustom>();

        // Add the CustomVisionAnalyser class to this GameObject
        gameObject.AddComponent <CustomVisionAnalyser>();

        // Add the CustomVisionTrainer class to this GameObject
        gameObject.AddComponent <CustomVisionTrainer>();

        // Add the VoiceRecogniser class to this GameObject
        gameObject.AddComponent <VoiceRecognizer>();

        // Add the CustomVisionObjects class to this GameObject
        gameObject.AddComponent <CustomVisionObjects>();

        // Create the camera Cursor
        //cursor = CreateCameraCursor();

        // Load the label prefab as reference
        label = CreateLabel();

        // Create the camera status indicator label, and place it above where predictions
        // and training UI will appear.
        cameraStatusIndicator = CreateTrainingUI("Status Indicator", 0.02f, 0.2f, 3, true);

        // Set camera status indicator to loading.
        SetCameraStatus("Loading");
    }
Пример #3
0
    /// <summary>
    /// Called on initialization
    /// </summary>
    private void Awake()
    {
        // Use this class instance as singleton
        Instance = this;

        // Add the ImageCapture class to this Gameobject
        gameObject.AddComponent <ImageCapture>();

        // Add the CustomVisionAnalyser class to this Gameobject
        gameObject.AddComponent <CustomVisionAnalyser>();

        // Add the CustomVisionObjects class to this Gameobject
        gameObject.AddComponent <CustomVisionObjects>();

        _meshFilter   = rect.GetComponent <MeshFilter>();
        _meshRenderer = rect.GetComponent <MeshRenderer>();
        _meshCollider = rect.GetComponent <MeshCollider>();

        if (_meshRenderer.material == null)
        {
            throw new System.Exception("Material does not exist.");
        }

        _material = _meshRenderer.material;
        _meshRenderer.sortingOrder = 32767;
    }
Пример #4
0
    private void Awake()
    {
        Instance = this;

        gameObject.AddComponent <ImageCapture>();
        gameObject.AddComponent <CustomVisionAnalyser>();
        gameObject.AddComponent <CustomVisionObjects>();
    }
Пример #5
0
    private void Awake()
    {
        Instance = this;

        //添加组件即添加类class
        this.gameObject.AddComponent <ImageCapture>();
        this.gameObject.AddComponent <CustomVisionAnalyser>();
        this.gameObject.AddComponent <CustomVisionObjects>();
    }
Пример #6
0
    /// <summary>
    /// Called on initialization
    /// </summary>
    private void Awake()
    {
        // Use this class instance as singleton
        Instance = this;

        // Create the camera status indicator label, and place it above where Predictions
        // and training UI will appear.

        // Set camera status indicator to loading.
        SetCameraStatus("Loading");
    }
Пример #7
0
    /// <summary>
    /// Called on initialization
    /// </summary>
    private void Awake()
    {
        // Use this class instance as singleton
        Instance = this;

        // Add the ImageCapture class to this Gameobject
        gameObject.AddComponent <ImageCapture>();

        // Add the CustomVisionAnalyser class to this Gameobject
        gameObject.AddComponent <CustomVisionAnalyser>();

        // Add the CustomVisionObjects class to this Gameobject
        gameObject.AddComponent <CustomVisionObjects>();
    }
Пример #8
0
 private void Awake()
 {
     Instance = this;
 }