1. A computer-implemented method for generating an image, the method comprising: capturing a sequence of images that includes a first image and a second image; generating a first image segment within the first image that represents a first group of real-world objects; generating a first motion estimate for the first image segment relative to a region in the second image that corresponds to the first image segment; performing a first deblurring operation based on the first motion estimate to generate a first deblurred image segment; and generating a deblurred version of the first image based on the first deblurred image segment.