PCA-Pyramids: Theory and Applications