Skip to content
Snippets Groups Projects
Commit eabb94eb authored by Laurent Knoll's avatar Laurent Knoll
Browse files

Correction de la métrique "Round". Closes #6

parent 08f9feb6
No related branches found
No related tags found
No related merge requests found
......@@ -129,11 +129,14 @@ export class DataExporter {
let line = 1;
let label = labData.filename;
let area = path.area / areaScale;
let convexArea = convexHull.toRemovedPath().area / areaScale;
let perimeter = path.length / linearScale;
let major = fittingEllipse.getMajorAxis() / linearScale;
let minor = fittingEllipse.getMinorAxis() / linearScale;
let circularity = 4 * Math.PI * area / Math.pow(perimeter, 2);
let ar = fittingEllipse.getMajorAxis() / fittingEllipse.getMinorAxis();
let round = 4 * area / (Math.PI * fittingEllipse.getMajorAxis());
let solid = area / (convexHull.toRemovedPath().area / areaScale);
let ar = major / minor;
let round = (4 * area) / (Math.PI * major * major);
let solid = area / convexArea;
let headers : string[] = [ " ", "Label", "Area", "Perim.", "Circ.","AR","Round","Solidity"];
let data = [ line,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment