Patent ID: 8433134

Claim:
An image processing device comprising: a memory; a processor connected to the memory, wherein the processor is configured to control: an acquiring unit configured to acquire first image data of a first photographed image photographed under a first light source and second image data of a second photographed image photographed under a second light source; an extraction-position determining unit configured to determine a position of a pixel serving as an extraction subject by using the first image data; an extraction-range determining unit configured to determine an extraction range corresponding to the determined position, by using a color value of the pixel at the determined position and a color value of a pixel at a peripheral position around the determined position in the first image data; a calculating unit configured to calculate a first representative color value from the first image data and a second representative color value from the second image data, on the basis of the position of the pixel serving as the extraction subject and the extraction range; a generating unit configured to generate a color correction condition for converting a color value depending on the first light source into a color value depending on the second light source, by using the first representative color value and the second representative color value; and a color correction unit configured to perform color correction for the first image data by using the color correction condition.