1. A method comprising: obtaining an input image; selecting, using an edge direction of each of multiple pixels identified in the input image, one or more of the multiple pixels; and generating, using the selected one or more pixels, a blur kernel based on which a de-blurred version of the input image is generated.