pyvista / pyvista-support

[moved] Please head over to the Discussions tab of the PyVista repository
https://github.com/pyvista/pyvista/discussions
60 stars 4 forks source link

Quantifying Contours on a 3D mesh (Shape Index) #416

Open birddropping opened 3 years ago

birddropping commented 3 years ago

Description

Hello,

I'm a new user of the PyVista package (and to Python in general). I have been working on extracting discriminatory features from 3D facial data captured as .obj files, as well as their landmarks captured as XYZ coordinates. I have used PyVista as a means to extract euclidean distances, geodesic distances as well as angles from the various landmarks. However, I am looking for a solution to be able to quantify contours (to determine the 'sharpness' of areas such as the nose, cheekbones, or chin).

I was considering the use of shape_index (https://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/WORTHINGTON/node6.html#fig:sindex) which quantifies a contour on a scale of -1 to 1 based on the slope of the points surrounding a particular landmark, but I have no real idea of how to code this into my feature extraction process using PyVista. I was wondering if PyVista has an in-built function that will be able to calculate this shape index at a particular point, or if not, would anyone have any clue as to how to approach this problem.

Would appreciate any help with this! Thank you so much!

akaszynski commented 3 years ago

I was wondering if PyVista has an in-built function that will be able to calculate this shape index at a particular point, or if not, would anyone have any clue as to how to approach this problem.

One approach would be to use gaussian curvature and potentially smoothing the mesh to reduce the impact of noise.

birddropping commented 3 years ago

Thank you so much for the advice Alex! I'll look into that and give it a go.