An image processing method which generates a second image based on a first image obtained via an image pickup optical system, the image processing method comprising the steps of: obtaining the first image; and generating the second image based on the first image, characterized in that a plurality of pieces of correction information are calculated by obtaining a deterioration function depending on shooting condition information relating to a state of the image pickup optical system when shooting an image, generating a deteriorated image by deteriorating a reference image, which contains various types of frequency components to be restored by the correction, using the deterioration function, extracting a plurality of partial regions from the deteriorated image, grouping, among the plurality of partial regions, partial regions having high similarity to each other into a plurality of groups based on information distribution of the partial region and the deterioration function, and obtaining, as the plurality of pieces of correction information, a plurality of correction coefficients (w 1 -w jmax) for each of the plurality of groups by relating the reference image to the deteriorated image, wherein common values are used as the correction coefficients for the partial regions of the same group; and the generation of the second image comprises to extract a plurality of partial regions from the first image, to search, for each of the plurality of partial regions of the first image, depending on a pixel signal value distribution of the partial region, a corresponding group from the plurality of groups of the deteriorated image, and to use, for each of the plurality of partial regions of the first image, the plurality of correction coefficients from the corresponding group of the deteriorated image, to generate a respective corrected pixel of the second image. obtaining the first image; and generating the second image based on the first image, characterized in that a plurality of pieces of correction information are calculated by obtaining a deterioration function depending on shooting condition information relating to a state of the image pickup optical system when shooting an image, generating a deteriorated image by deteriorating a reference image, which contains various types of frequency components to be restored by the correction, using the deterioration function, extracting a plurality of partial regions from the deteriorated image, grouping, among the plurality of partial regions, partial regions having high similarity to each other into a plurality of groups based on information distribution of the partial region and the deterioration function, and obtaining, as the plurality of pieces of correction information, a plurality of correction coefficients (w 1 -w jmax) for each of the plurality of groups by relating the reference image to the deteriorated image, wherein common values are used as the correction coefficients for the partial regions of the same group; and obtaining a deterioration function depending on shooting condition information relating to a state of the image pickup optical system when shooting an image, generating a deteriorated image by deteriorating a reference image, which contains various types of frequency components to be restored by the correction, using the deterioration function, extracting a plurality of partial regions from the deteriorated image, grouping, among the plurality of partial regions, partial regions having high similarity to each other into a plurality of groups based on information distribution of the partial region and the deterioration function, and obtaining, as the plurality of pieces of correction information, a plurality of correction coefficients (w 1 -w jmax) for each of the plurality of groups by relating the reference image to the deteriorated image, wherein common values are used as the correction coefficients for the partial regions of the same group; and the generation of the second image comprises to extract a plurality of partial regions from the first image, to search, for each of the plurality of partial regions of the first image, depending on a pixel signal value distribution of the partial region, a corresponding group from the plurality of groups of the deteriorated image, and to use, for each of the plurality of partial regions of the first image, the plurality of correction coefficients from the corresponding group of the deteriorated image, to generate a respective corrected pixel of the second image. to extract a plurality of partial regions from the first image, to search, for each of the plurality of partial regions of the first image, depending on a pixel signal value distribution of the partial region, a corresponding group from the plurality of groups of the deteriorated image, and to use, for each of the plurality of partial regions of the first image, the plurality of correction coefficients from the corresponding group of the deteriorated image, to generate a respective corrected pixel of the second image.