void Start()
    {
        RawImage image = GetComponent <RawImage>();

        //Texture2D texture = image.mainTexture as Texture2D;
        preprocess.ScaleAndCropImage(image, ImageSize, RunModel);
    }
Beispiel #2
0
    void Update()
    {
        WebCamTexture webCamTexture = CameraView.GetCamImage();

        if (webCamTexture.didUpdateThisFrame && webCamTexture.width > 100)
        {
            preprocess.ScaleAndCropImage(webCamTexture, IMAGE_SIZE, RunModel);
        }
    }