PROBLEM TO BE SOLVED: To provide an endoscope apparatus capable of suppressing the effect caused on the visual recognition of an observer by an edge which occurs in a frame image, and also to provide a method for operating such an endoscope.SOLUTION: The endoscope apparatus comprises: an imaging unit 54 including a plurality of two-dimensionally arranged pixels, which are sequentially exposed for each scan line; a nozzle for selectively injecting a gas or a liquid such that the fluid flows on an observation window of the imaging unit 54 in a direction in which the fluid crosses the observation window; an edge detection unit 85 for detecting an edge extending along a scan line at least in a periphery region of a frame image output by the imaging unit 54 on the basis of image data of the frame image; a mask processing unit 86 for applying an electronic mask having a variable opening area to the frame image; and a display unit 27 for displaying the image with the electronic mask applied thereto. The mask processing unit 86, if an edge is detected in the periphery region of a frame image captured on injection of the gas from the nozzle, masks the periphery region of the frame image with the electronic mask.SELECTED DRAWING: Figure 3【課題】フレーム画像に発生するエッジが観察者の視認に与える影響を抑制可能な内視鏡装置及びその動作方法を提供する。【解決手段】内視鏡装置は、二次元状に配列された複数の画素を有し、これらの複数の画素が走査ライン毎に順次露光される撮像部54と、気体又は液体を選択的に噴射して撮像部54の観察窓上でこの観察窓を横断する方向に流体を流すノズルと、撮像部54から出力されるフレーム画像の画像データに基づき、フレーム画像の少なくとも縁部領域において走査ラインに沿って延びるエッジを検出するエッジ検出部85と、開口領域可変な電子マスクをフレーム画像に施すマスク処理部86と、電子マスクが施された画像を表示する表示部27とを備える。マスク処理部86は、ノズルから気体が噴射された際に取得されたフレーム画像の縁部領域にエッジが検出された場合、電子マスクでこのフレーム画像の縁部領域をマスクするマスク処理を行う。【選択図】図3