/** * 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()); }
/** * Calculate the ratio of the area of the given polygon to the area of this * connected component. This does not consider whether the areas overlap. * * @param ch * The polygon to test again. * @return The area ratio of the given polygon to this connected component. */ public double calculateAreaRatio(Polygon ch) { return calculateAreaRatio(new ConnectedComponent(ch)); }
/** * Calculate the ratio of the area of the given polygon to the area of this * connected component. This does not consider whether the areas overlap. * * @param ch * The polygon to test again. * @return The area ratio of the given polygon to this connected component. */ public double calculateAreaRatio(Polygon ch) { return calculateAreaRatio(new ConnectedComponent(ch)); }