1. A method comprising: imaging an object; discriminating a position or posture of the imaged object; determining whether discrimination of the position or posture of the imaged object has ended; and setting, in a case where it is determined that the discrimination has not ended, a new imaging condition in accordance with an imaging condition setting rule, wherein the imaging condition setting rule is generated based on a discriminable range and an identification determination result range, wherein the discriminable range is a range of an imaging condition in which the position or posture of the object is discriminable, that has been determined by use of a plurality of images obtained by imaging the object under a plurality of imaging conditions in advance, and wherein the identification determination result range is a range of an imaging condition in which an identity of the position or posture of the object is discriminable, that has been determined by use of a plurality of images obtained by imaging the object under a plurality of imaging conditions in advance.