deformation correction for optical imaging: WIP