To set the auto focus system of video imaging, using an endoscope system (20), the auto focus is accessed and the screen and the focal length is adjusted at two end settings. A series of images (30) is taken with a video camera (22) of the endoscope (24) at the patient (26) while the screen moves over the range. The images are processed in sequence to establish their focus quality, for analysis to give the best focal length for setting the lens (36) at the image sensor (38).