Example #1
0
 public IList<FingerPoint> FindFingerPoints(Contour contour, ConvexHull convexHull)
 {
     this.contourPoints = contour.Points;
     var thinnedHullPoints = this.lineThinner.Filter(convexHull.Points);
     var verifiedHullPoints = this.VerifyPointsByContour(thinnedHullPoints);
     return verifiedHullPoints.Select(r => new FingerPoint(r)).ToList();
 }
Example #2
0
 public Shape(Point center, Volume volume, Contour contour, ConvexHull convexHull, IList<Point> points)
 {
     this.center = center;
     this.volume = volume;
     this.contour = contour;
     this.convexHull = convexHull;
     this.points = points;
 }
Example #3
0
 public Palm FindCenter(ConvexHull hull, Contour contour, IList<Point> candidates)
 {
     this.result = null;
     candidates = ReduceCandidatePoints(hull, candidates);
     if (candidates.Count > 0) {
         var minimizedContour = new LineThinner(contourReduction, false).Filter(contour.Points);
         this.FindCenterFromCandidates(minimizedContour, candidates);
         if (this.result != null) {
             this.IncreaseAccuracy(this.result.Location, minimizedContour);
         }
     }
     return result;
 }
Example #4
0
 private IList<FingerPoint> DetectFingerPoints(ConvexHull convexHull, Contour contour)
 {
     if (!this.settings.DetectFingers) {
         return new List<FingerPoint>();
     }
     return this.fingerPointDetector.FindFingerPoints(contour, convexHull);
 }
Example #5
0
 private IList<Point> ReduceCandidatePoints(ConvexHull hull, IList<Point> candidates)
 {
     var center = Point.Center(hull.Points);
     var maxDistance = this.searchRadius * 3;
     return candidates.Where(p => Point.Distance2D(center, p) <= maxDistance).ToList();
 }