1. An image processing apparatus for correcting a depth map corresponding to an image, the image processing apparatus comprising: a detection unit configured to detect an object included in the image; a determination unit configured to determine whether the object detected by the detection unit is smaller than a predetermined size or larger than the predetermined size; and a correction unit configured to correct distance information in a target area, the target area corresponding to an area of the object in the depth map, when the detected object is smaller than the predetermined size, and to not correct the distance information in the target area when the detected object is larger than the predetermined size, wherein the correction unit is further configured to acquire a confidence coefficient of the distance information, which indicates an estimated accuracy of the distance information, at each position of the depth map, and to correct the distance information in the target area using only the distance information of which the confidence coefficient is equal to or greater than a predetermined value, wherein the detection unit is further configured to determine a type of the detected object, and wherein the determination unit is further configured to change the predetermined size depending on the type of the detected object.