PROBLEM TO BE SOLVED: To provide an endoscopic diagnostic apparatus, image processing method, program, and recording medium capable of eliminating fogging of the light-transmissive protection substrate mounted on the light-receiving surface of the CMOS image sensor, without upsizing the apparatus.SOLUTION: A fogging detection unit analyzes an endoscope image captured by a CMOS image sensor mounted in the distal end of an endoscope to detect whether or not fogging is present on a light-transmissive protection substrate which protects the light-receiving surface of the CMOS image sensor. When fogging on the light-transmissive protection substrate is detected, an operation mode setting unit enables a heat generation mode. In the heat generation mode, a control unit allows an input voltage higher than the input voltage in a normal mode to be input to a regulator which is disposed indirectly contacting the light-transmissive protection substrate and which generates a power source voltage to be supplied to the CMOS image sensor after lowering the input voltage.SELECTED DRAWING: Figure 2COPYRIGHT: (C)2017,JPO&INPIT