An endoscope apparatus includes: an imaging device detachably connected to an eye contact portion of an endoscope adapted to be inserted in a subject, the imaging device including an imaging unit configured to image a subject image captured by the endoscope a control device configured to process an image captured by the imaging unit and generate a video signal for display an operation receiving unit configured to receive a user operation for calculating a gain in white balance a gain calculating unit configured to calculate the gain in white balance based on the captured image in response to the user operation and an edge detecting unit configured to perform mask edge detecting processing for detecting a boundary point between the subject image and a mask area other than the subject image included in the captured image in response to the user operation.