コード例 #1
0
        private IEnumerator UserRebootOpenPoseCoroutine()
        {
            if (OPWrapper.state == OPState.None)
            {
                yield break;
            }
            // Shutdown if running
            if (OPWrapper.state == OPState.Running)
            {
                OPWrapper.OPShutdown();
            }
            // Wait until fully stopped
            yield return(new WaitUntil(() => { return OPWrapper.state == OPState.Ready; }));

            // Configure and start
            UserConfigureOpenPose();
            OPWrapper.OPRun();
        }
コード例 #2
0
        void Start()
        {
            // Register callbacks
            OPWrapper.OPRegisterCallbacks();
            // Enable OpenPose log to unity (default true)
            OPWrapper.OPEnableDebug(true);
            // Enable OpenPose output to unity (default true)
            OPWrapper.OPEnableOutput(true);
            // Enable receiving image (default false)
            OPWrapper.OPEnableImageOutput(true);

            // Configure OpenPose with default value, or using specific configuration for each
            /* OPWrapper.OPConfigureAllInDefault(); */
            UserConfigureOpenPose();

            // Start OpenPose
            OPWrapper.OPRun();
        }
コード例 #3
0
        private void Start()
        {
            Debug.Log("Start called");
            _output = new List <Frame>();

            // Extract Video name for exporting
            string[] splitResult = videoInputPath.Split('\\');
            splitResult = splitResult[splitResult.Length - 1].Split('.');
            _videoName  = splitResult[0];


            sequences.Sort((sequence, sequence1) => (int)(sequence.StartFrame - sequence1.StartFrame));
            if (sequences.Count > 0)
            {
                _currentSequence = sequences[0];
                sequences.Remove(_currentSequence);
            }

            // Register callbacks
            OPWrapper.OPRegisterCallbacks();
            // Enable OpenPose log to unity (default true)
            OPWrapper.OPEnableDebug(true);
            // Enable OpenPose output to unity (default true)
            OPWrapper.OPEnableOutput(true);
            // Enable receiving image (default false)
            OPWrapper.OPEnableImageOutput(true);

            // Configure OpenPose with default value, or using specific configuration for each
            /* OPWrapper.OPConfigureAllInDefault(); */
            UserConfigureOpenPose();

            // Start OpenPose
            if (OPWrapper.state == OPState.Ready)
            {
                OPWrapper.OPRun();
            }
        }