A fast and reliable planar registration method with applications to document stitching