C# 클래스 Accord.Video.Kinect.KinectDepthCamera

Video source for Microsoft Kinect's depth sensor.

The video source captures depth data from Microsoft Kinect depth sensor, which is aimed originally as a gaming device for XBox 360 platform.

Prior to using the class, make sure you've installed Kinect's drivers as described on Open Kinect project's page.

In order to run correctly the class requires freenect.dll library to be put into solution's output folder. This can be found within the AForge.NET framework's distribution in Externals folder.

Sample usage:

// create video source KinectDepthCamera videoSource = new KinectDepthCamera( 0 ); // set NewFrame event handler videoSource.NewFrame += new NewFrameEventHandler( video_NewFrame ); // start the video source videoSource.Start( ); // ... private void video_NewFrame( object sender, NewFrameEventArgs eventArgs ) { // get new frame Bitmap bitmap = eventArgs.Frame; // process the frame }
상속: IVideoSource
파일 보기 프로젝트 열기: accord-net/framework 1 사용 예제들

Private Properties

프로퍼티 타입 설명
HandleDataReceived void

공개 메소드들

메소드 설명
KinectDepthCamera ( int deviceID ) : System

Initializes a new instance of the KinectDepthCamera class.

KinectDepthCamera ( int deviceID, CameraResolution resolution ) : System

Initializes a new instance of the KinectDepthCamera class.

KinectDepthCamera ( int deviceID, CameraResolution resolution, bool provideOriginalDepthImage ) : System

Initializes a new instance of the KinectDepthCamera class.

SignalToStop ( ) : void

Signal video source to stop its work.

Calling this method is equivalent to calling Stop for Kinect video camera.

Start ( ) : void

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.

Stop ( ) : void

Stop video source.

The method stop the video source, so it no longer provides new video frames and does not consume any resources.

WaitForStop ( ) : void

Wait for video source has stopped.

Calling this method is equivalent to calling Stop for Kinect video camera.

비공개 메소드들

메소드 설명
HandleDataReceived ( IntPtr device, IntPtr depthData, UInt32 timestamp ) : void

메소드 상세

KinectDepthCamera() 공개 메소드

Initializes a new instance of the KinectDepthCamera class.
public KinectDepthCamera ( int deviceID ) : System
deviceID int Kinect's device ID (index) to connect to.
리턴 System

KinectDepthCamera() 공개 메소드

Initializes a new instance of the KinectDepthCamera class.
public KinectDepthCamera ( int deviceID, CameraResolution resolution ) : System
deviceID int Kinect's device ID (index) to connect to.
resolution CameraResolution Resolution of depth sensor to set.
리턴 System

KinectDepthCamera() 공개 메소드

Initializes a new instance of the KinectDepthCamera class.
public KinectDepthCamera ( int deviceID, CameraResolution resolution, bool provideOriginalDepthImage ) : System
deviceID int Kinect's device ID (index) to connect to.
resolution CameraResolution Resolution of depth sensor to set.
provideOriginalDepthImage bool Provide original depth image or colored depth map /// (see property).
리턴 System

SignalToStop() 공개 메소드

Signal video source to stop its work.

Calling this method is equivalent to calling Stop for Kinect video camera.

public SignalToStop ( ) : void
리턴 void

Start() 공개 메소드

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 depth sensor. Could not connect to Kinect's depth sensor. Another connection to the specified depth sensor is already running.
public Start ( ) : void
리턴 void

Stop() 공개 메소드

Stop video source.

The method stop the video source, so it no longer provides new video frames and does not consume any resources.

public Stop ( ) : void
리턴 void

WaitForStop() 공개 메소드

Wait for video source has stopped.

Calling this method is equivalent to calling Stop for Kinect video camera.

public WaitForStop ( ) : void
리턴 void