1. An image processing apparatus comprising: an input unit configured to input a moving image; a detection unit configured to detect an object from a moving image input by the input unit; a tracing unit configured to trace an object detected by the detection unit from a moving image input by the input unit and acquire motion of the object and a moving image interval in which the object is present in the moving image based on a tracing result; and a key object determination unit configured to determine, when there is an overlap in moving image intervals acquired by the tracing unit as to a plurality of objects, whether each object is a key object based on motion of each of the plurality of objects.