Systems, apparatus, and methods for removing blur in an image
Systems, apparatus, and methods are presented for deblurring images. One method includes receiving an image and estimating blur for the image. The method also includes applying a deblurring filter to the image and reducing halo from the image.
1 . A method comprising:
receiving, by a processing device, an image;
computing, by the processing device, gradient features of the image, wherein computing the gradient features comprises computing a directional derivative at each of a plurality of angles;
estimating, by the processing device, blur for the image based on the gradient features, wherein estimating the blur based on the gradient features comprises estimating a plurality of parameters of an anisotropic Gaussian function based on the gradient features;
applying a deblurring filter to the image, wherein the deblurring filter is constructed based on the estimated blur; and
reducing halo from the image.
2 . The method of claim 1 , further comprising removing noise from the image.
3 . The method of claim 1 , wherein estimating the blur based on the gradient features further comprises estimating a blur kernel based on the gradient features.
4 . The method of claim 3 , further comprising estimating an inverse of the blur with a polynomial based on the blur kernel, wherein the deblurring filter is constructed based on the polynomial.
5 . The method of claim 4 , wherein the polynomial is a third order polynomial that includes a plurality of design parameters.
6 . The method of claim 5 , wherein the plurality of design parameters includes a design parameter that controls mid-frequency amplification.
7 . The method of claim 5 , wherein the plurality of design parameters includes a design parameter that controls noise amplification.
8 . The method of claim 3 , wherein the deblurring filter comprises a polynomial filter based on the blur kernel.
9 . The method of claim 8 , wherein the polynomial filter is based on an inverse of the estimated blur.
10 . The method of claim 1 , wherein estimating the plurality of parameters of the anisotropic Gaussian function based on the gradient features comprises estimating three parameters of the anisotropic Gaussian function based on the gradient features.
11 . The method of claim 1 , further comprising normalizing the image.
12 . The method of claim 1 , further comprising computing a maximum magnitude of the directional derivative for each of the plurality of angles.
13 . The method of claim 12 , further comprising selecting a minimum value from the maximum magnitudes of the directional derivatives, wherein the blur is estimated using the minimum value.
14 . The method of claim 1 , further comprising estimating a blur score for the image, the blur score indicative of the extent of blurriness in the image.
15 . The method of claim 14 , further comprising comparing the blur score to a threshold value.
16 . The method of claim 1 , wherein the deblurring filter comprises a linear restoration filter constructed from the estimated blur.
17 . An apparatus comprising:
memory; and
one or more processors configured to:
receive an image;
compute gradient features of the image, wherein computing the gradient features comprises computing a directional derivative at each of a plurality of angles;
estimate a blur for the image based on an anisotropic Gaussian function, wherein the anisotropic Gaussian function includes a plurality of parameters based on the gradient features;
apply a deblurring filter to the image, wherein the deblurring filter is constructed based on the estimated blur; and
reduce halo from the image.
18 . The apparatus of claim 17 , wherein the deblurring filter comprises a polynomial filter.
19 . A non-transitory computer-readable medium storing instructions, the instructions being executable by one or more processors to perform functions comprising:
receiving an image;
computing gradient features of the image, wherein computing the gradient features comprises computing a directional derivative at each of a plurality of angles;
estimating a blur for the image based on the gradient features, wherein estimating the blur based on the gradient features comprises estimating a plurality of parameters of an anisotropic Gaussian function based on the gradient features;
applying a deblurring filter to the image, wherein the deblurring filter is constructed based on the estimated blur; and
reducing halo from the image.
20 . The non-transitory computer-readable medium of claim 19 , wherein the deblurring filter comprises a polynomial filter.