예제 #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();
 }
예제 #2
0
파일: Shape.cs 프로젝트: gnavvy/ParaIF
 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;
 }
예제 #3
0
파일: PalmFinder.cs 프로젝트: gnavvy/ParaIF
 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;
 }
예제 #4
0
 private IList<FingerPoint> DetectFingerPoints(ConvexHull convexHull, Contour contour)
 {
     if (!this.settings.DetectFingers) {
         return new List<FingerPoint>();
     }
     return this.fingerPointDetector.FindFingerPoints(contour, convexHull);
 }
예제 #5
0
파일: PalmFinder.cs 프로젝트: gnavvy/ParaIF
 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();
 }