1. A method comprising: imaging an object; discriminating a position or posture where an image was captured of the imaged object; determining whether discrimination of the position or posture of the imaged object has ended; and setting, when it is determined that the discrimination has not ended, a new imaging condition in accordance with an imaging condition setting rule represented by a direction and a distance, 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, the identity of the position or posture referring to the position or posture where the image was captured, wherein the imaging condition includes one or a combination of a position of an image pickup unit which images the object, a posture of the image pickup unit, a field angle of the image pickup unit, a resolution of an image to be imaged by the image pickup unit, a position of an illumination which radiates light to the object, and a posture of the illumination.