1.  Field of the Invention
The present invention relates to an image processing apparatus, an image processing method, and a storage medium that perform processing for deforming an input image. 
2.  Description of the Related Art
Conventionally, a fisheye lens has been known as a lens used in a camera or the like.  The fisheye lens comes in various types, and any of them function to cause an image viewed via the fisheye lens to appear enlarged in the vicinity of a reference point such as a center of the image, compared to an image viewed without using the fisheye lens.  Further, there has been known a technique for acquiring an image similar to the image viewed via such a fisheye lens by processing image data (hereinafter referred to as fisheye processing).  More specifically, there has been known a method of setting the reference point in the image data, and performing predetermined deformation processing while using the reference point as a center in the deformation, when performing deformation processing such as the fisheye processing (refer to Japanese Patent Application Laid-Open Nos.  2010-97534 and 2010-217808). 
On the other hand, according to the method discussed in Japanese Patent Application Laid-Open Nos.  2010-97534 and 2010-217808, the reference point is set in image data captured with use of a normal lens.  Then, this method aims to reproduce a result of shooting with use of the fisheye lens by performing deformation processing for enlarging the image data around the reference point and reducing the periphery of the image data.  According to this method, a region to be enlarged is enlarged by interpolation of pixels from surrounding pixels, and this region ends up in incurring a blurred impression because adjacent pixels tend to be similar to each other.  Conversely, in a region to be reduced, pixels are thinned out to decrease the number of pixels, and this region ends up in incurring such an impression that sharpness is excessively enhanced because simply thinning out pixels causes pixels that had been away from each other to be brought close to each other to thereby make a change in the pixels unsmooth. 
In this manner, the conventional technique results in generation of an image locally blurred yet having a portion with sharpness enhanced conversely.  Therefore, the conventional technique has a problem of being unable to actually reproduce the image viewed via the fisheye lens from the image data in an appropriate manner.