1. An image processing apparatus comprising: a processor; and memory; wherein the processor is configured to: generate a plurality of images at different resolutions from an input image; sequentially scan an input image and each of the plurality of images at the different resolutions, in descending order of the resolutions using a fixed-sized window to sequentially detect objects of different sizes in the input image in ascending order of the sizes of the objects; store a plurality of detection results of the detection in a predetermined number of storage areas in a storage unit; and write the sequentially detected objects in the predetermined number of storage areas circularly, such that if there is no free space in the predetermined number of storage areas to store a new detection result of a first object, the new detection result is overwritten on an old detection result of a second object which is smaller than the first object corresponding to the new detection result.