|
@@ -49,8 +49,8 @@ namespace bbiwarg.Detectors.Palm
|
|
|
this.edgeImage = edgeImage;
|
|
|
this.palmImage = palmImage;
|
|
|
|
|
|
- // dst = (src > 254) ? 0 : 1
|
|
|
- handImage = depthImage.Image.ThresholdBinaryInv(new Gray(254), new Gray(1)).Convert<Gray, Byte>();
|
|
|
+ // dst = (src > (MaxDepth - MinDepth)) ? 0 : 1
|
|
|
+ handImage = depthImage.Image.ThresholdBinaryInv(new Gray(depthImage.MaxDepth - depthImage.MinDepth - 1), new Gray(1)).Convert<Gray, Byte>();
|
|
|
|
|
|
fingers = getFingersWithoutThumb(detectedFingers);
|
|
|
buildPointingHandMask();
|