AFM-SPM / TopoStats

An AFM image analysis program to batch process data and obtain statistics from images
https://afm-spm.github.io/TopoStats/
GNU Lesser General Public License v3.0
55 stars 10 forks source link

[feature] : Circularity Metric #860

Open MaxGamill-Sheffield opened 2 weeks ago

MaxGamill-Sheffield commented 2 weeks ago

Is your feature request related to a problem?

Aim is to have a measure of circular-ness or roundness output in the grainstats.

Describe the solution you would like.

Can be done by measuring the grains outer hull and using a ratio of its area to its perimeter (or circumference):

Roundness = 4π × Area / Perimeter^2

Will give a normalised value of 0 for non-circles and 1 for a perfect circle.

Describe the alternatives you have considered.

No response

Additional context

No response

SylviaWhittle commented 2 weeks ago

Note: A couple other similar metrics that have been used in the past are:

ratio of feret diameters - since a circle has a feret ratio of 1 and a line has a feret ratio of big. But this metric can be gamed.

Variance in distances of edge points from centroid

Though the geometrically derived metric above is likely the best in most cases