A Framework for Non-rigid Matching and Correspondence