Browse Source

Fixed buildPointingHandMask().

Daniel Kauth 11 years ago
parent
commit
ba027fe9b4
1 changed files with 2 additions and 1 deletions
  1. 2 1
      bbiwarg/Detectors/Palm/PalmDetector.cs

+ 2 - 1
bbiwarg/Detectors/Palm/PalmDetector.cs

@@ -137,7 +137,8 @@ namespace bbiwarg.Detectors.Palm
 
             fillFingerSlices(pointingHandMask, 1);
             pointingHandMask = pointingHandMask.Dilate(1);
-            pointingHandMask = pointingHandMask.Or(edgeImage.Image);
+            // dst = (src > 0) ? 1 : 0;
+            pointingHandMask = pointingHandMask.Or(edgeImage.Image.ThresholdBinary(new Gray(0), new Gray(1)));
             pointingHandMask = pointingHandMask.Dilate(1);
             
             MCvConnectedComp tmp = new MCvConnectedComp();