|
@@ -27,8 +27,8 @@ namespace bbiwarg.Recognition.HandRecognition
|
|
public Image<Gray, byte> Mask { get; private set; }
|
|
public Image<Gray, byte> Mask { get; private set; }
|
|
public List<Finger> Fingers { get; private set; }
|
|
public List<Finger> Fingers { get; private set; }
|
|
public ConvexityDefect ThumbDefect { get; private set; }
|
|
public ConvexityDefect ThumbDefect { get; private set; }
|
|
- public Palm Palm { get; private set; }
|
|
|
|
public HandSide Side { get; private set; }
|
|
public HandSide Side { get; private set; }
|
|
|
|
+ public Palm Palm { get; set; }
|
|
|
|
|
|
public Hand(Image<Gray, byte> mask, Finger finger)
|
|
public Hand(Image<Gray, byte> mask, Finger finger)
|
|
{
|
|
{
|
|
@@ -47,16 +47,16 @@ namespace bbiwarg.Recognition.HandRecognition
|
|
public void addFinger(Finger finger)
|
|
public void addFinger(Finger finger)
|
|
{
|
|
{
|
|
Fingers.Add(finger);
|
|
Fingers.Add(finger);
|
|
|
|
+ finger.Hand = this;
|
|
}
|
|
}
|
|
|
|
|
|
public void mergeWith(Hand mergeHand)
|
|
public void mergeWith(Hand mergeHand)
|
|
{
|
|
{
|
|
extendMask(mergeHand.Mask);
|
|
extendMask(mergeHand.Mask);
|
|
Fingers.AddRange(mergeHand.Fingers);
|
|
Fingers.AddRange(mergeHand.Fingers);
|
|
- foreach (Finger finger in Fingers)
|
|
|
|
- {
|
|
|
|
- finger.setHand(this);
|
|
|
|
- }
|
|
|
|
|
|
+ foreach (Finger finger in mergeHand.Fingers)
|
|
|
|
+ finger.Hand = this;
|
|
|
|
+
|
|
findCentroids();
|
|
findCentroids();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -101,11 +101,6 @@ namespace bbiwarg.Recognition.HandRecognition
|
|
determineHandSide();
|
|
determineHandSide();
|
|
}
|
|
}
|
|
|
|
|
|
- public void setPalm(Palm palm)
|
|
|
|
- {
|
|
|
|
- Palm = palm;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
private bool isThumbOnly()
|
|
private bool isThumbOnly()
|
|
{
|
|
{
|
|
return (Fingers.Count == 1);
|
|
return (Fingers.Count == 1);
|