1. An image processing apparatus comprising: an image acquisition unit configured to acquire, as an image, a result of imaging, on an image sensor unit, light traveling from an object via an opening of a stop; a control unit configured to control a shape of the opening based on a function which defines a temporal change of the shape of the opening when said image acquisition unit acquires the image; and a detection unit configured to detect a blur state in the image based on the function.