1. A computer-implemented method, comprising: generating a derivative image from an image having a blurred region; autocorrelating the derivative image and the image to obtain an autocorrelation map; determining a size of a blur kernel for the image based on the autocorrelation map; and deblurring the image by deconvolving the blurred region with the blur kernel.