An anti-fogging device according to the present invention includes an imaging optical system (201) having at least one optical member including at least an objective lens, a hollow objective lens frame (212) for storing the imaging optical system (201), and supply The heater (207) that heats the hollow space of the objective lens frame (212) and the temperature detectors (206, 442) that detect the temperature of the hollow space of the objective lens frame (212) by generating heat according to the generated electric power. ), A temperature difference estimation unit (445) that estimates a temperature difference between the temperature detected by the temperature detection unit (206, 442) and the temperature of the optical member based on the electric power value, and a temperature difference estimation unit An overall control unit (46) that controls the heater (207) based on the temperature difference estimated by (445).本発明にかかる曇り防止装置は、少なくとも対物レンズを含む一または複数の光学部材を有する撮像光学系(201)と、撮像光学系(201)を格納する中空の対物レンズ枠(212)と、供給される電力に応じて発熱することで、対物レンズ枠(212)の中空空間を加熱するヒータ(207)と、対物レンズ枠(212)の中空空間の温度を検出する温度検出部(206,442)と、温度検出部(206,442)が検出した温度と、光学部材の温度との温度差を、電力の電力値をもとに推定する温度差推定部(445)と、温度差推定部(445)が推定した温度差に基づいてヒータ(207)を制御する統括制御部(46)と、を備えた。