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(); }
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; }
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; }
private IList<FingerPoint> DetectFingerPoints(ConvexHull convexHull, Contour contour) { if (!this.settings.DetectFingers) { return new List<FingerPoint>(); } return this.fingerPointDetector.FindFingerPoints(contour, convexHull); }
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(); }