An infrared camera, in accordance with one embodiment, includes a housing having disposed therein one or more heating elements; a vent; a sensor for detecting a humidity level and providing a sensor signal indicating the humidity level within the housing; and a logic circuit configured to receive the sensor signal and determine if the humidity level within the housing should be reduced, wherein the logic circuit provides a control signal to switch on at least one of the heating elements if the humidity level should be reduced via the vent.