Optical imaging systems create a sharp image of an object only within a certain depth range, called depth of field (DoF). Whereas a narrow DoF is often desired in photography, e.g. for highlighting a foreground object against the background, it is unwanted in cases where the entire scene needs to be controlled, such as in medical, industrial or automotive imaging. In this article, I will explain how the focal length and f-number affect the depth of field and I will introduce two methods for extending the depth of field.