1. An image processing apparatus for correcting image quality degradation, comprising: a generating unit that generates a parameter defining a deformation process for correcting the image quality degradation; a determining unit that determines whether a reference area, which is an image area required by the deformation process, fits within a captured area that contains the image and is larger than the image; an adjusting unit that adjusts the parameter such that the reference area fits within the captured area, in a case where it is determined by the determining unit that the reference area does not fit within the captured area; and a deforming unit that applies the deformation process to the image in accordance with the parameter.