1. An image processing apparatus, comprising: an acquisition unit configured to acquire results of analysis processing for a plurality of images; a designation unit configured to designate a type of a target to be detected from an image; and a determination unit configured to determine, among the plurality of images, an image used for detection processing of the detection target designated by the designation unit based on the type of the detection target designated by the designation unit and the result of the analysis processing.