A patient positioning system for use with a patient comprises an optical image sensor. The optical image sensor measures an optical image of a tissue structure of an eye of the patient. An image sensor support supports the image sensor. A patient support supports the patient. A linkage is coupled to the image sensor support with the patient support. A processor is coupled to the optical image sensor to determine a gradient of an illumination level of the optical tissue structure image. The processor is coupled to the linkage and configured to articulate the linkage so as to adjust a separation distance from the tissue structure to the image sensor in response to the gradient of the optical tissue structure image.