/** * Calculate the ratio of the area of this component's convex hull to the * actual area of this connected component. This gives an idea of how well * the calculated convex hull fits the component. The value returned is a * percentage (0-1). * * @return The area ratio of this component's convex hull its area. */ public double calculatePercentageConvexHullFit() { return calculateAreaRatio(calculateConvexHull()); }
/** * Calculate the ratio of the area of this component's convex hull to the * actual area of this connected component. This gives an idea of how well * the calculated convex hull fits the component. The value returned is a * percentage (0-1). * * @return The area ratio of this component's convex hull its area. */ public double calculatePercentageConvexHullFit() { return calculateAreaRatio(calculateConvexHull()); }
@Override public void process(ConnectedComponent cc) { cc = new ConnectedComponent(cc.calculateConvexHull()); //make shape convex
Polygon ch = cc.calculateConvexHull(); ConnectedComponent chcc = new ConnectedComponent(ch);
@Override public void process(ConnectedComponent cc) { cc = new ConnectedComponent(cc.calculateConvexHull()); //make shape convex
Polygon ch = cc.calculateConvexHull(); ConnectedComponent chcc = new ConnectedComponent(ch);
Polygon ch = cc.calculateConvexHull(); ConnectedComponent chcc = new ConnectedComponent(ch);
Polygon ch = cc.calculateConvexHull(); ConnectedComponent chcc = new ConnectedComponent(ch);