C# 클래스 KinectMenu.KinectPage

A generalized Page that is meant to make use of the Kinect's sensors (motion control, speech recognition,...) Extend this page to enable kinect controls on your Page.
상속: System.Windows.Controls.Page
파일 보기 프로젝트 열기: NUIC/2-Kinects-1-Machine

보호된 프로퍼티들

프로퍼티 타입 설명
_handLeft double
_handTop double
_selectedButton System.Windows.Controls.Button
buttons List
inAction System.Boolean
kinectLeft Coding4Fun.Kinect.Wpf.Controls.HoverButton
kinectLeft1 Coding4Fun.Kinect.Wpf.Controls.HoverButton
kinectRight Coding4Fun.Kinect.Wpf.Controls.HoverButton
kinectRight1 Coding4Fun.Kinect.Wpf.Controls.HoverButton
liveVideo Image

공개 메소드들

메소드 설명
IsCursorOverObject ( FrameworkElement hand, List

Checks to see if the kinect cursor is over an object.

IsHandsTogetherOnAButton ( FrameworkElement hand, FrameworkElement otherHand, List

Checks to see if both hands are together in a clapping motion over a button.

KinectPage ( ) : System
OnButtonLocationChanged ( Hands movingHand, int x, int y ) : void

The main method for handling motion. Checks for clapping or hover events.

SpeechRecognized ( object sender, SpeechRecognizedEventArgs args ) : void

The main method for speech recognition. If an utterance is recognised by the SpeechEngine, this handler is called with the command. The handler checks the button names for the matching button and calls its Click event.

SpeechRejected ( object sender, SpeechRecognitionRejectedEventArgs args ) : void

The main method for speech rejection. Used to notify the user of a rejected speech utterance.

보호된 메소드들

메소드 설명
InitializeButtons ( ) : void

Override this method. Allows the kinect page to "know" about any selectable buttons on the Page.

InitializeKinectHandIcons ( ) : void

Override this method. Attaches the kinect hand icons to the user's hands.

InitializeVideoImage ( ) : void

Override this method. Allows the kinect page to update the video image of the person moving.

비공개 메소드들

메소드 설명
MainWindow_Loaded ( object sender, RoutedEventArgs e ) : void

A callback method for when the page is loaded. Set's up the buttons and live image for the current page. Initializes the motion and speech controls as well.

MainWindow_Unloaded ( object sender, RoutedEventArgs e ) : void

A callback method for when the page is unloaded. Remove's event handlers from the speech and motion modules. Reset's all of the referrences.

runtime_VideoFrameReady ( object sender, ColorImageFrameReadyEventArgs e ) : void

메소드 상세

InitializeButtons() 보호된 메소드

Override this method. Allows the kinect page to "know" about any selectable buttons on the Page.
protected InitializeButtons ( ) : void
리턴 void

InitializeKinectHandIcons() 보호된 메소드

Override this method. Attaches the kinect hand icons to the user's hands.
protected InitializeKinectHandIcons ( ) : void
리턴 void

InitializeVideoImage() 보호된 메소드

Override this method. Allows the kinect page to update the video image of the person moving.
protected InitializeVideoImage ( ) : void
리턴 void

IsCursorOverObject() 공개 정적인 메소드

Checks to see if the kinect cursor is over an object.
public static IsCursorOverObject ( FrameworkElement hand, List
hand System.Windows.FrameworkElement The Kinect cursor
buttons List The list of buttons to check against
리턴 bool

IsHandsTogetherOnAButton() 공개 정적인 메소드

Checks to see if both hands are together in a clapping motion over a button.
public static IsHandsTogetherOnAButton ( FrameworkElement hand, FrameworkElement otherHand, List
hand System.Windows.FrameworkElement The first hand
otherHand System.Windows.FrameworkElement The second hand
buttons List The list of buttons to check against
리턴 bool

KinectPage() 공개 메소드

public KinectPage ( ) : System
리턴 System

OnButtonLocationChanged() 공개 정적인 메소드

The main method for handling motion. Checks for clapping or hover events.
public static OnButtonLocationChanged ( Hands movingHand, int x, int y ) : void
movingHand Hands The hand that is currently moving
x int The moving hand's current x position
y int The moving hand's current y position
리턴 void

SpeechRecognized() 공개 메소드

The main method for speech recognition. If an utterance is recognised by the SpeechEngine, this handler is called with the command. The handler checks the button names for the matching button and calls its Click event.
public SpeechRecognized ( object sender, SpeechRecognizedEventArgs args ) : void
sender object
args SpeechRecognizedEventArgs
리턴 void

SpeechRejected() 공개 메소드

The main method for speech rejection. Used to notify the user of a rejected speech utterance.
public SpeechRejected ( object sender, SpeechRecognitionRejectedEventArgs args ) : void
sender object
args SpeechRecognitionRejectedEventArgs
리턴 void

프로퍼티 상세

_handLeft 보호되어 있는 정적으로 프로퍼티

protected static double _handLeft
리턴 double

_handTop 보호되어 있는 정적으로 프로퍼티

protected static double _handTop
리턴 double

_selectedButton 보호되어 있는 정적으로 프로퍼티

protected static Button,System.Windows.Controls _selectedButton
리턴 System.Windows.Controls.Button

buttons 보호되어 있는 프로퍼티

protected List
리턴 List

inAction 보호되어 있는 프로퍼티

protected Boolean,System inAction
리턴 System.Boolean

kinectLeft 보호되어 있는 정적으로 프로퍼티

protected static HoverButton,Coding4Fun.Kinect.Wpf.Controls kinectLeft
리턴 Coding4Fun.Kinect.Wpf.Controls.HoverButton

kinectLeft1 보호되어 있는 정적으로 프로퍼티

protected static HoverButton,Coding4Fun.Kinect.Wpf.Controls kinectLeft1
리턴 Coding4Fun.Kinect.Wpf.Controls.HoverButton

kinectRight 보호되어 있는 정적으로 프로퍼티

protected static HoverButton,Coding4Fun.Kinect.Wpf.Controls kinectRight
리턴 Coding4Fun.Kinect.Wpf.Controls.HoverButton

kinectRight1 보호되어 있는 정적으로 프로퍼티

protected static HoverButton,Coding4Fun.Kinect.Wpf.Controls kinectRight1
리턴 Coding4Fun.Kinect.Wpf.Controls.HoverButton

liveVideo 보호되어 있는 프로퍼티

protected Image liveVideo
리턴 Image