本文整理汇总了C#中ICamera.Dispose方法的典型用法代码示例。如果您正苦于以下问题:C# ICamera.Dispose方法的具体用法?C# ICamera.Dispose怎么用?C# ICamera.Dispose使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ICamera
的用法示例。
在下文中一共展示了ICamera.Dispose方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Main
//.........这里部分代码省略.........
//_cam.Speech.Say("Hello world!");
//_cam.Speech.SpeechRecognized += (sender, eventArgs) => {
// Console.WriteLine("-> " + eventArgs.Sentence.ToLower());
//};
//_cam.Face.EyesDirectionChanged += (s, a) => {
// if (a.NewDirection == Direction.None) return;
// Console.WriteLine("-> " + a.NewDirection);
//};
//_cam.Face.LeftEye.Opened += (s, a) => {
// Console.WriteLine("-> LeftEye opened");
//};
//_cam.Face.LeftEye.Closed += (s, a) => {
// Console.WriteLine("-> LeftEye Closed");
//};
//_cam.Face.LeftEye.Blink += (s, a) => {
// Console.WriteLine("-> LeftEye Blink");
//};
//_cam.Face.LeftEye.DoubleBlink += (s, a) => {
// Console.WriteLine("-> LeftEye DoubleBlink");
//};
//_cam.Face.Mouth.Opened += (s, a) => {
// Console.WriteLine("-> month opened");
//};
//_cam.Face.Mouth.Closed += (s, a) => {
// Console.WriteLine("-> month closed");
//};
//_cam.Face.Mouth.Smiled += (s, a) => {
// Console.WriteLine("-> month smiled");
//};
//_cam.Speech.EnableRecognition();
//Console.WriteLine("Speech");
//Console.ReadLine();
//_cam.Start();
//Console.WriteLine("Cam Started");
//Console.ReadLine();
//_cam.LeftHand.Visible += (s,a) => Console.WriteLine("Hi l");
//_cam.LeftHand.NotVisible += (s,a) => Console.WriteLine("Bye l");
//_cam.RightHand.Visible += (s,a) => Console.WriteLine("Hi r");
//_cam.Gestures.SlideRight += (s, a) => Console.WriteLine(a.GestureName);
//_cam.Gestures.SlideLeft += (s, a) => Console.WriteLine(a.GestureName);
//_cam.Gestures.SlideUp += (s, a) => Console.WriteLine(a.GestureName);
//_cam.Gestures.SlideDown += (s, a) => Console.WriteLine(a.GestureName);
//int xmoved = 0;
//_cam.LeftHand.Moved += (s, a) => {
// Console.WriteLine(++xmoved);
//};
//_cam.RightHand.Moved += (s,a) => Console.WriteLine("-> " + a.NewPosition.Image.X);
//_cam.Face.RecognizeFace();
//_cam.Face.FaceRecognized += (s, a) => {
// Console.WriteLine("Hello " + a.UserId);
//};
//_cam.LeftHand.FingerOpened += (sender, eventArgs) => {
// var finger = (Finger) sender;
// Console.WriteLine("Finger Open: " + finger.Kind);
//};
//_cam.Face.FacialExpresssionChanged += (s, e) => Console.WriteLine("FacialExpression: " + e.NewFacialExpression);
Action moved = () => {
Console.Write("\r");
Console.Write("LeftXY: {0}|{1} | Right XY: {2}|{3}",
_cam.LeftHand.Index.Position.Image.X,
_cam.LeftHand.Index.Position.Image.Y,
_cam.RightHand.Index.Position.Image.X,
_cam.RightHand.Index.Position.Image.Y
);
};
//_cam.LeftHand.Index.Moved += (s, a) => moved();
//_cam.RightHand.Index.Moved += (s, a) => moved();
//_cam.Gestures.SlideLeft += (s, a) => Console.WriteLine("Swipe Left");
//_cam.Gestures.SlideRight += (s, a) => Console.WriteLine("Swipe Right");
//_cam.Gestures.SlideUp += (s, a) => Console.WriteLine("Swipe Up");
//_cam.Gestures.SlideDown += (s, a) => Console.WriteLine("Swipe Down");
//_cam.Gestures.MoveForward += (s, a) => Console.WriteLine("Move Forward");
//var pose = PoseBuilder.Create().ShouldBeNear(_cam.LeftHand, _cam.RightHand,100).Build();
//pose.Begin += (s, a) => {
// Console.WriteLine("Super pose!");
//};
Console.ReadLine();
_cam.Dispose();
}