1. An image processing apparatus comprising a computer, which functions as: a detection unit that detects a subject region based on image data; an obtaining unit that obtains a value indicating a difference in luminance between light areas of the subject region detected by the obtaining unit and dark areas of the subject region detected by the obtaining unit; a generation unit that generates a non-linear conversion characteristic by interpolating a plurality of non-linear conversion characteristics using the value indicating the difference in luminance between the light areas and the dark areas; and a correction unit that applies the non-linear conversion characteristic that was generated by the generation unit to the image data.