Accurate measurement of three-dimensional deformations in deformable and rigid bodies using computer vision