-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathOpenPalm.cs
More file actions
50 lines (40 loc) · 1.6 KB
/
OpenPalm.cs
File metadata and controls
50 lines (40 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using System;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Text;
using System.Drawing;
namespace NITEProvider
{
class OpenPalm
{
/// <summary>
/// class constructor
/// </summary>
/// <param name="key"> string (key) that will be used to identify the gesture </param>
int openpalmcounter = 0;
int closepalmcounter = 0;
bool prev_status1 = true;
public OpenPalm()
{
}
/// <summary>
/// this routine checks if the hand is open or not. Openness of the palm is currently indicated
/// by at least 3 visible fingers sticking out of the profile of the hand.
/// </summary>
/// <param name="clipping"></param>
/// <param name="handPoint"></param>
/// <returns></returns>
public int isDetected( byte[,] clipping, OpenNI.Point3D handPoint)
{
/*Since this class is a child of the HandFeature class, we can directly invoke the hand feature extraction routines from
the parent class. The result of the parent class is stored in its data structures viz. fingerTips. This list of points is
accessible using a getter.
if the number of fingers clearly detected is greater that 3, indicate that the palm has been opened
*/
HandFeature featuer = new HandFeature();
int status = featuer.isDetected(ref clipping, handPoint);
return status;
}
}
}