@Override public void computeAcircularity(ConvexHull convexHull) { double perimeter = convexHull.getPerimeter(); double area = convexHull.getArea(); double acircularity = Math.pow(perimeter, 2) / (4 * Math.PI * area); convexHull.setAcircularity(acircularity); }
@Override public void computeDirectionality(ConvexHull convexHull) { double directionality = convexHull.getMostDistantPointsPair().getMaxSpan() / convexHull.getArea(); convexHull.setDirectionality(directionality); }