浏览代码

Improved PalmDetector stability.

Daniel Kauth 11 年之前
父节点
当前提交
0237244bce
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      bbiwarg/Detectors/Palm/PalmDetector.cs

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

@@ -60,9 +60,12 @@ namespace bbiwarg.Detectors.Palm
                 removePointsFromContour(wristLine, 1);
                 removePointsFromContour(wristLine, 1);
                 removePointsFromContour(thumbLine, 1);
                 removePointsFromContour(thumbLine, 1);
 
 
-                findPalmRect();
+                if (palmContour.Count<Point>() != 0)
+                {
+                    findPalmRect();
 
 
-                draw();
+                    draw();
+                }
             }
             }
         }
         }