Start() public méthode

Start video source.
Starts video source and returns execution to caller. Video camera will be started and will provide new video frames through the NewFrame event.
The specified resolution is not supported for the selected /// mode of the Kinect video camera. Could not connect to Kinect's video camera. Another connection to the specified video camera is already running.
public Start ( ) : void
Résultat void
Exemple #1
0
        private void btnSelectCamera_Click(object sender, EventArgs e)
        {
            VideoCaptureDeviceForm form = new VideoCaptureDeviceForm();

            if (form.ShowDialog() == DialogResult.OK)
            {
                int deviceId = form.DeviceId;

                kinectDevice = Kinect.GetDevice(deviceId);

                if (videoCamera == null)
                {
                    videoCamera = kinectDevice.GetVideoCamera();
                    videoCamera.CameraMode = VideoCameraMode.Color;
                    videoCamera.NewFrame += new AForge.Video.NewFrameEventHandler(videoCamera_NewFrame);
                    videoCamera.Start();
                }

                if (depthCamera == null)
                {
                    depthCamera = new KinectDepthCamera(deviceId, CameraResolution.Medium,
                        provideOriginalDepthImage: true);

                    videoSourcePlayer1.VideoSource = depthCamera;
                    videoSourcePlayer1.Start();
                }

                toolStripStatusLabel1.Text = "Initializing...";
            }
        }