The use of PCA to reorient 3D triangle meshes into axis that maximize variance of the data can be used as pre step in feature extraction. That would be fine if all triangles were equal i.e. a perfectly uniform distribution of points over the surface geometry, but that is rarely the case. In fact, with medical data, usually triangle reduction techniques based on curvature are used to reduce file size(e.g. flatter areas have less but bigger triangles). A consequence of this is that both the centroid and principal axis will get skewed in a naive implementation of PCA. To solve this problem, weights can be used(e.g. area of each triangle associated with each triangle centroid). That is what PCA_Weighted does. Given a mesh in any location and orientation, it will center and reorient it in an optimal way (orthogonal least squares sense) irrespective of the triangulation. I use the weighted covariance matrix and the eigenvalue decomposition algorithm.
Germano Gomes (2020). PCA_Weighted.m (https://www.mathworks.com/matlabcentral/fileexchange/46659-pca_weighted-m), MATLAB Central File Exchange. Retrieved .
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!