Optical systems for flexible and rigid endoscopes that have a low diffraction limit and small geometrical optical aberrations, the systems including an aperture stop where the diameter can be adjusted to select either higher resolution or higher depth of field. The optical systems can include a lens group either to focus on different object distances or on a fixed average object distance. The aperture stop can be adjusted to increase either depth of field or resolution dependent on the endoscopic and surgical situation. Simple symbols help the surgeon to adjust the aperture stop to these situations. The surgeon can either look around the body cavity with large depth of field but moderate overall resolution or focus on a small area with less depth of field but greater resolution. The balance between resolution and depth of field can be adjusted by an automatic image control. Fields in the image field are defined and software used in the camera controller analyzes the sharpness of the different fields. The center field is used to hold or define the sharpness of the image in the center field. Measurements of the sharpness in the peripheral fields define if more depth of field is needed or the resolution can be increased.Sistemas ópticos para endoscopios flexibles y rígidos que tienen un bajo nivel de difracción y pequeñas aberraciones ópticas geométricas, los sistemas que incluyen una abertura de diafragma donde el diámetro se puede ajustar para seleccionar ya sea mayor resolución o mayor profundidad de campo. Los sistemas ópticos pueden incluir un grupo de lentes ya sea para enfocarse en diferentes distancias objeto o en una distancia objeto promedio fija. La abertura de diafragma se puede ajustar para incrementar ya sea la profundidad de campo o la resolución dependiendo de la situación endoscópica y quirúrgica. Símbolos simples ayudan al cirujano a ajustar la abertura de diafragma a estas situaciones. El cirujano ya sea puede mirar alrededor de la cavidad corporal c