imagej-ops icon indicating copy to clipboard operation
imagej-ops copied to clipboard

Convexity feature values should be between 0 and 1

Open imagejan opened this issue 8 years ago • 4 comments

As discussed on gitter.im, there are cases where measured convexity values are high above 1.0, where the theoretical range should be {0,1} .

Here's a KNIME workflow that illustrates the issue with some segmented 3D objects:

Convexity_Tests.zip

imagejan avatar Feb 06 '17 16:02 imagejan

@imagejan thank you for the test-workflow! I was able to identify the issue. The current implementation is based on surfaceArea(ConvexHull(Sample))/surfArea(Sample). Unfortunately the surface area of the convex hull of an object can be smaller or bigger than the surface area of the sample.

This happens for example if the object is banana-shaped: surfacearea

The correct convexity-measurement for 3D should be volume(sample)/volume(convexHull(sample)). I found this paper about 3D convexity (https://www.researchgate.net/publication/236018239_A_New_Convexity_Measurement_for_3D_Meshes). They developed another 3D convexity measurement, because for certain objects the above measurement creates to high numbers (but still < 1).

For now I will replace the convexity measurement with the volume-based implementation.

tibuch avatar Feb 07 '17 12:02 tibuch

Isn't this the same as Solidity then? See here: https://github.com/imagej/imagej-ops/blob/master/src/main/java/net/imagej/ops/geom/AbstractSolidity.java#L61

In theory, the convex hull surface (or boundary) should always be smaller than the object's surface, so the ratio is correct, but the calculation of the surfaces isn't. Do you agree?

imagejan avatar Feb 07 '17 13:02 imagejan

Right, it is the same as Solidity.

the convex hull surface (or boundary) should always be smaller than the object's surface

This is not true. If we have banana-shape with height 1 and compute the convex hull we get a half-circle with height 1. Now the surface area of a "half-circle" is bigger than the surface area of the banana. banana

tibuch avatar Feb 07 '17 14:02 tibuch

Now the surface area of a "half-circle" is bigger than the surface area of the banana.

I have never thought about that case, thanks for pointing it out @tibuch!

stelfrich avatar Feb 07 '17 14:02 stelfrich