File Exchange

image thumbnail


version (4.34 KB) by Germano Gomes
Weighted PCA on 3D triangle meshes

1 Download

Updated 02 Jun 2014

View Version History

View License

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.

Cite As

Germano Gomes (2020). PCA_Weighted.m (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (3)

pandong pan

pandong pan

Thank you for the awesome package. but i cannot run the functions because the lack of the data.

Glen Lichtwark

MATLAB Release Compatibility
Created with R2014a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!