Enabling automatic switching of imaging modes according to the type of a subject. An endoscope image is obtained by imaging a subject with a scope (20). Then, an edge portion (EP) of the endoscope image (P) is extracted and a complexity degree (CD) of the edge portion (EP) is detected. Thereafter, a determination is made as to whether the endoscope image is an image obtained through near view imaging or distant view imaging according to the complexity degree (CD) and an imaging condition is changed according to the determined near view imaging or distant view imaging.