1. An image processing method of obtaining a clear image from a blurred image, comprising: converting an array of image data from a two dimension into a one-dimensional vector, the image data storing pixel values of the blurred image; converting all of two-dimensional matrix operations acting on the one-dimensional vector into an image filtering for the image data of the blurred image, and calculating values of statistic parameters necessary for calculation of a cost function estimating the clear image and a first gradient vector of the cost function; updating, by using the first gradient vector being calculated, image data of the clear image by one of a first numerical optimization method and a second numerical optimization method which calculates the image data of the clear image by using only a gradient vector such that a value of the cost function becomes maximum or minimum; calculating a second gradient vector of the cost function obtained from the image data of the clear image being updated; and selecting one of the first numerical optimization method and the second numerical optimization method according to a comparison of a value of a ratio with a predetermined value, the ratio being between a size of the first gradient vector and a size of the second gradient vector.