An endoscope for determining the depth of a partial area of a cavity by a triangulation analysis may include a projection channel for projecting a pattern onto a surface of the cavity and an imaging channel provided for imaging an image of the projected pattern reflected by the surface of the cavity. The projection channel may have at least one diffractive optical element for producing the pattern, a collimator, and a focusing lens. The focusing lens may be arranged between the collimator and the diffractive optical element.