Patent ID: 8526057

Claim:
An image processing apparatus generating, based on a high-contrast image being a synthetic image whose dynamic range is extended and thus having a wide tonal range achieved by synthesizing a plurality of pieces of input images obtained by shooting a same scene and having different exposure amounts, an output image having a narrower tonal range than the high-contrast image, the image processing apparatus comprising: a selecting unit selecting a reference image from the plurality of pieces of input images based on information of brightness components of the plurality of pieces of input images; a gain calculating unit calculating, for each of one or more remaining input images, which are the plurality of pieces of input images excluding the reference image, a brightness ratio of each of the one or more remaining input images to the reference image as a gain, based on the information of the brightness components of the plurality of pieces of input images; a weight calculating unit calculating one or more first weights to be applied to the one or more remaining input images based on the gain being calculated and information of a brightness component of the reference image, and calculating a second weight based on information of a brightness component of image data as a result of performing weighting synthesis calculation on the plurality of pieces of input images using the one or more first weights; an intermediate image generating unit generating the high-contrast image by performing weighting synthesis on the plurality of pieces of input images using the one or more first weights and the second weight being calculated; a preparing unit preparing, based on information of a shape of a brightness distribution of the high-contrast image being generated and information of a shape of a predetermined brightness distribution as a conversion target, a tone conversion curve indicating a characteristic of tone conversion; and an output image generating unit performing the tone conversion on the high-contrast image based on the tone conversion curve being prepared, and generating the output image having the narrower tonal range than the high-contrast image.