Anti-fogging system for an endoscope including an endoscope having an outer housing, an imaging arrangement, and a distal window. A filter lens is located at the distal window, with the filter lens allowing a first portion of electromagnetic light to pass therethrough while absorbing a second portion of electromagnetic light in order to heat the filter lens.