1. An image processing apparatus which corrects depth values indicating depths of pixels included in an input image, the apparatus comprising: a feature calculation unit configured to calculate feature quantities of the pixels; a reliability level obtaining unit configured to obtain reliability levels of the depth values; and a depth correction unit configured to correct the depth values using the reliability levels and the feature quantities, and output corrected depth values for an output image, wherein the correction of the depth values includes correcting a depth value of a target pixel to be processed, by preferentially using a depth value whose reliability level is high and a depth value whose feature quantity is close to a feature quantity of the depth value of the target pixel, among depth values of reference pixels included in the pixels.