コード例 #1
0
        /// <summary>
        /// Raises the disable event.
        /// </summary>
        void OnDestroy()
        {
            WebGLFileUploadManager.FileUploadEventHandler -= fileUploadHandler;
            WebGLFileUploadManager.Dispose();

            capture.release();

            if (rgbMat != null)
            {
                rgbMat.Dispose();
            }
            if (grayMat != null)
            {
                grayMat.Dispose();
            }

            if (rectangleTracker != null)
            {
                rectangleTracker.Dispose();
            }

            if (faceLandmarkDetector != null)
            {
                faceLandmarkDetector.Dispose();
            }

            if (frontalFaceParam != null)
            {
                frontalFaceParam.Dispose();
            }
        }
コード例 #2
0
        /// <summary>
        /// Raises the disable event.
        /// </summary>
        void OnDisable()
        {
            WebGLFileUploadManager.FileUploadEventHandler -= fileUploadHandler;
            WebGLFileUploadManager.Dispose();

            webCamTextureToMatHelper.Dispose();

            if (cascade != null)
            {
                cascade.Dispose();
            }

            if (rectangleTracker != null)
            {
                rectangleTracker.Dispose();
            }

            if (faceLandmarkDetector != null)
            {
                faceLandmarkDetector.Dispose();
            }

            if (frontalFaceParam != null)
            {
                frontalFaceParam.Dispose();
            }
        }
コード例 #3
0
    // Start is called before the first frame update
    void Start()
    {
        Debug.Log("WebGLFileUploadManager.getOS: " + WebGLFileUploadManager.getOS);
        Debug.Log("WebGLFileUploadManager.isMOBILE: " + WebGLFileUploadManager.IsMOBILE);
        Debug.Log("WebGLFileUploadManager.getUserAgent: " + WebGLFileUploadManager.GetUserAgent);

        WebGLFileUploadManager.SetDebug(true);
        WebGLFileUploadManager.Show(false);
        WebGLFileUploadManager.SetDescription("Select netcdf files (.nc)");
        WebGLFileUploadManager.SetImageEncodeSetting(true);
        WebGLFileUploadManager.SetAllowedFileName("\\.(nc)$");
        WebGLFileUploadManager.onFileUploaded += OnFileUploaded;
    }
コード例 #4
0
 // Use this for initialization
 void Start()
 {
     WebGLFileUploadManager.SetDebug(true);
     if (
         #if UNITY_WEBGL && !UNITY_EDITOR
         WebGLFileUploadManager.IsMOBILE
         #else
         Application.isMobilePlatform
         #endif
         )
     {
         WebGLFileUploadManager.Show(false);
         WebGLFileUploadManager.SetDescription("Select image files (.png|.jpg|.gif)");
     }
コード例 #5
0
        /// <summary>
        /// Raises the destroy event.
        /// </summary>
        void OnDestroy()
        {
            WebGLFileUploadManager.FileUploadEventHandler -= fileUploadHandler;
            WebGLFileUploadManager.Dispose();

            if (faceLandmarkDetector != null)
            {
                faceLandmarkDetector.Dispose();
            }

            if (cascade != null)
            {
                cascade.Dispose();
            }
        }
コード例 #6
0
        // Use this for initialization
        void Start()
        {
            WebGLFileUploadManager.SetImageEncodeSetting(true);
            WebGLFileUploadManager.SetAllowedFileName("\\.(png|jpe?g|gif)$");
            WebGLFileUploadManager.SetImageShrinkingSize(640, 480);
            WebGLFileUploadManager.FileUploadEventHandler += fileUploadHandler;

            #if UNITY_WEBGL && !UNITY_EDITOR
            StartCoroutine(getFilePathCoroutine());
            #else
            haarcascade_frontalface_alt_xml_filepath       = OpenCVForUnity.Utils.getFilePath("haarcascade_frontalface_alt.xml");
            shape_predictor_68_face_landmarks_dat_filepath = DlibFaceLandmarkDetector.Utils.getFilePath("shape_predictor_68_face_landmarks.dat");
            Run();
            #endif
        }
コード例 #7
0
        // Use this for initialization
        void Start()
        {
            Debug.Log("WebGLFileUploadManager.getOS: " + WebGLFileUploadManager.getOS);
            Debug.Log("WebGLFileUploadManager.isMOBILE: " + WebGLFileUploadManager.IsMOBILE);
            Debug.Log("WebGLFileUploadManager.getUserAgent: " + WebGLFileUploadManager.GetUserAgent);

            WebGLFileUploadManager.SetDebug(true);
            if (
                #if UNITY_WEBGL && !UNITY_EDITOR
                WebGLFileUploadManager.IsMOBILE
                #else
                Application.isMobilePlatform
                #endif
                )
            {
                WebGLFileUploadManager.Show(false);
                WebGLFileUploadManager.SetDescription("Select image files (.png|.jpg|.gif)");
            }
コード例 #8
0
 /// <summary>
 /// Raises the upload image button event.
 /// </summary>
 public void OnUploadImageButton()
 {
     WebGLFileUploadManager.PopupDialog(null, "Select image file (.png|.jpg|.gif)");
 }
コード例 #9
0
 /// <summary>
 /// Raises the upload face mask button event.
 /// </summary>
 public void OnUploadFaceMaskButton()
 {
     WebGLFileUploadManager.PopupDialog(null, "Select frontal face image file (.png|.jpg|.gif)");
 }
コード例 #10
0
 public void OnUpload()
 {
     WebGLFileUploadManager.PopupDialog(null, "Select netcdf files (.nc)");
 }