|
@@ -259,13 +259,15 @@ namespace bbiwarg.Recognition.PalmRecognition
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ Quadrangle quad;
|
|
|
if (palmHand.Side == Hand.HandSide.Left)
|
|
|
{
|
|
|
- handWidth = 0.85f * new Vector2D(-handLength.Y, handLength.X);
|
|
|
+ handWidth = 0.85f * new Vector2D(-handLength.Y, handLength.X);
|
|
|
topLeft = longestLineEndpoint + 0.15f * handLength;
|
|
|
bottomLeft = ThumbDefectDepth - 0.4f * handLength;
|
|
|
bottomRight = bottomLeft + handWidth;
|
|
|
topRight = bottomRight + 1.2f * handLength - 0.3f * handWidth;
|
|
|
+ quad = new Quadrangle(bottomLeft, topLeft, topRight, bottomRight, foregroundMask.Width, foregroundMask.Height);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -274,11 +276,9 @@ namespace bbiwarg.Recognition.PalmRecognition
|
|
|
bottomRight = ThumbDefectDepth - 0.4f * handLength;
|
|
|
bottomLeft = bottomRight + handWidth;
|
|
|
topLeft = bottomLeft + 1.2f * handLength - 0.3f * handWidth;
|
|
|
+ quad = new Quadrangle(topRight, bottomRight, bottomLeft, topLeft, foregroundMask.Width, foregroundMask.Height);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- Quadrangle quad = new Quadrangle(bottomLeft, topLeft, topRight, bottomRight, foregroundMask.Width, foregroundMask.Height);
|
|
|
-
|
|
|
if ((lastPalmQuad == null ||
|
|
|
(quad.Area / lastPalmQuad.Area >= Constants.PalmMinAreaQuotient && quad.Area / lastPalmQuad.Area <= Constants.PalmMaxAreaQuotient)) &&
|
|
|
getForegroundPixelPercentage(quad, foregroundMask) >= Constants.PalmMinPrecentageQuadForeground)
|