Browse Source

Merge branch 'master' of https://git.tk.informatik.tu-darmstadt.de/etri-smartspaces

Daniel Kauth 10 years ago
parent
commit
45881e48ce
1 changed files with 7 additions and 2 deletions
  1. 7 2
      bbiwarg/DataSource/ForeFingerDetection.cs

+ 7 - 2
bbiwarg/DataSource/ForeFingerDetection.cs

@@ -71,6 +71,10 @@ namespace bbiwarg.DataSource
                 Console.WriteLine(palmPosition[2]);
             }
 
+            if (seenPoints.Count() <= 100)
+            {
+
+            }
             return videoHandle.pixel2VertexPosition(foreFingerPosition);
         }
 
@@ -101,11 +105,12 @@ namespace bbiwarg.DataSource
                     currentPoint[0] = point[0] + x;
                     currentPoint[1] = point[1] + y;
                     currentPoint[2] = videoHandle.getDepth((int)currentPoint[0], (int)currentPoint[1]);
-                    if (point == palmPosition || (Math.Abs(currentPoint[2] - point[2]) <= TOLERANCE_Z && point[1] <= palmPosition[1] && !seenPoints.Contains(currentPoint)))
+                    if ((!seenPoints.Contains(currentPoint) && point[1] <= palmPosition[1] && Math.Abs(currentPoint[2] - point[2]) <= TOLERANCE_Z)
+                        || point == palmPosition)
                     {
                         points.Add(currentPoint);
-                        seenPoints.Add(currentPoint);
                     }
+                    seenPoints.Add(currentPoint);
                 }
             }
         }