C# 클래스 AForge.Video.Kinect.KinectVideoCamera

Video source for Microsoft Kinect's video camera.

The video source captures video data from Microsoft Kinect video camera, 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 libfreenect.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 KinectVideoCamera videoSource = new KinectVideoCamera( 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
파일 보기 프로젝트 열기: holisticware-admin/MonoVersal.AForgeNET 1 사용 예제들

공개 메소드들

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

Initializes a new instance of the KinectVideoCamera class.

KinectVideoCamera ( int deviceID, CameraResolution resolution ) : System

Initializes a new instance of the KinectVideoCamera class.

KinectVideoCamera ( int deviceID, CameraResolution resolution, VideoCameraMode cameraMode ) : System

Initializes a new instance of the KinectVideoCamera 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 stops 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 imageData, UInt32 timeStamp ) : void

메소드 상세

KinectVideoCamera() 공개 메소드

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

KinectVideoCamera() 공개 메소드

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

KinectVideoCamera() 공개 메소드

Initializes a new instance of the KinectVideoCamera class.
public KinectVideoCamera ( int deviceID, CameraResolution resolution, VideoCameraMode cameraMode ) : System
deviceID int Kinect's device ID (index) to connect to.
resolution CameraResolution Resolution of video camera to set.
cameraMode VideoCameraMode Sets video camera mode.
리턴 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 video camera. Could not connect to Kinect's video camera. Another connection to the specified video camera is already running.
public Start ( ) : void
리턴 void

Stop() 공개 메소드

Stop video source.

The method stops 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