A robust method for image stitching