Contrast-based sensorless adaptive optics for retinal imaging

: Conventional adaptive optics ophthalmoscopes use wavefront sensing methods to characterize ocular aberrations for real-time correction. However, there are important situations in which the wavefront sensing step is susceptible to difficulties that affect the accuracy of the correction. To circumvent these, wavefront sensorless adaptive optics (or non-wavefront sensing AO; NS-AO) imaging has recently been developed and has been applied to point-scanning based retinal imaging modalities. In this study we show, for the first time, contrast-based NS-AO ophthalmoscopy for full-frame in vivo imaging of human and animal eyes. We suggest a robust image quality metric that could be used for any imaging modality, and test its performance against other metrics using (physical) model eyes.


Introduction
Adaptive optics (AO) retinal imaging has been extensively used to study live human and animal eyes at the cellular level since its inception [1]. Derived from the technology used in ground-based telescopes in astronomy [2,3], AO retinal imaging as it is now generally applied relies upon a Shack-Hartman-based wavefront sensor (SHWS) to determine aberrations of the eye (WFS-AO). However, the accuracy of the wavefront sensing step depends greatly on the quality of the SHWS spot pattern, which can be adversely affected in situations such as the presence of corneal disease or cataract, or when imaging non-uniform features such as the optic nerve head, or imaging dioptrically thick retinas such as rodent eyes [4]. In addition, system factors such as non-common path error, back-reflection from lenses and low signal-to-noise ratio can degrade wavefront data and place a fundamental limit on image quality [5,6].
As a countermeasure, wavefront sensorless adaptive optics (NS-AO) has been trialled for in vivo retinal imaging in both human and rodents [6][7][8][9]. This technique makes direct use of an intrinsic metric of retinal image quality to provide feedback to the imaging system for aberration correction, resulting in image quality similar or better [6,10] than WFS-AO after convergence of the NS-AO algorithm. NS-AO effectively bypasses the wavefront sensing step, and whilst there are some drawbacks, the approach can reduce the cost and complexity of AO systems. The principal drawback is the extended time required for correction, since results of small exploratory AO corrector adjustments must be assayed by systematic trial and error, leaving the system vulnerable to temporal variations in the wavefront during the correction loop.
Recent studies have used NS-AO along with ex vivo and in vivo imaging modalities, including two-photon excited fluorescence (2PEF) scanning microscopy [11], Scanning Laser Ophthalmoscopy (SLO) [6,10] and Optical Coherence Tomography (OCT) [7][8][9]. The NS-AO optimization algorithms used in these studies were guided by either random perturbations introduced to the deformable mirror (DM) actuators [6], or by sequential iterations of a modal representation of the aberrations [7-9, 11, 12]. To our knowledge, NS-AO has yet to be incorporated into a flood-illumination adaptive optics (flood AO) ophthalmoscope.
In this study, we developed an NS-AO algorithm for our existing flood AO ophthalmoscopes using a modal sequential search algorithm that corrects individual Zernike terms up to the 6th order. This approach is similar to that from a previous study [8], with some modifications to increase the convergence speed.
A key step to the success of NS-AO algorithms is an appropriate choice of image quality metric. For NS-AO imaging with scanning-based modalities such as 2PEF microscopy, SLO and OCT [6-8, 11, 13], the simplest choice is to use the average or total frame intensity as the metric, since maximizing light through the confocal aperture requires minimizing the pointspread-function of the eye. However, extrapolating this simple statistic to a flood AO ophthalmoscope does not give robust convergence or good images from our experience, since changes in the aberrations, including defocus, ought not to alter average image brightness in a non-confocal system [10]. Using a 60 D model eye we compared the performance of several alternative image metrics, which are potentially suitable for flood NS-AO, based on image contrast and spatial frequency detail. The metric that gave the best end image quality consistently was used for all NS-AO experiments, where images were obtained in 60 D and 220 D model eyes, and compared with images obtained with WFS-AO, with both normal and degraded SHWS spots.
In addition to model eyes, in vivo NS-AO imaging was also undertaken in human and rat eyes to show the robustness of the algorithm. Previously we suggested NS-AO as a potential method that could improve image quality in in vivo AO imaging of rodent eyes in flood AO ophthalmoscopes [14,15], since it bypasses the challenging wavefront sensing step in rodent eyes. Another challenge of imaging rodent eyes using a flood AO ophthalmoscope is unwanted light scatter from out-of-focus retinal layers due to their dioptrically thick retina. As a comparison, a change in optical power of ~11.5 D is required to shift the focal plane from the anterior to posterior retina in the rat eye, compared to only ~0.7 D in the human eye [16].
To overcome out-of-focus scatter in flood AO imaging, we adopted a structured illumination microscopy technique dubbed "HiLo" imaging [15], as has been described in detail elsewhere [17][18][19][20]. In brief, two images of the same feature are acquired either in parallel or in rapid succession, one with uniform illumination which mainly contributes high-frequency information to the final image (hence the "Hi" in HiLo), the other with structured illumination (e.g. random laser speckle) which mainly contributes low-frequency information to the final image (hence the "Lo" in HiLo). These images are then post-processed to obtain a HiLo image, which is a pseudo-confocal image with potentially significantly improved quality compared to the image obtained with flood AO imaging.
NS-AO combined with HiLo imaging was attempted only for the rat eye in this experiment, since light scatter does not affect image quality of the human eye due to its retina's relatively small optical thickness.

Flood adaptive optics ophthalmoscopes
The principle of flood AO ophthalmoscopes has been described previously [1]. Two AO ophthalmoscopes were used in this study. The main one used for the majority of the study was designed specifically for the rat with a pupil size of 3.75 mm [14]. A charge-coupled device (CCD) camera (Megaplus 4020C, Princeton Instruments, Trenton,NJ) was used for imaging. The NS-AO algorithm was also implemented on a flood AO ophthalmoscope optimized for human imaging (7.6 mm pupil) as described previously [21], with the exception that the sCMOS camera was substituted for a relatively slow CCD camera (Allied Vision Technologies, Stadtroda, Germany). This change was made to facilitate ease of importing each frame into Matlab (Mathworks, Natick, MA) in order to calculate the image quality metric and update the correction in real-time (achieving this with the much faster sCMOS camera would dramatically improve convergence speed). The implementation of NS-AO on the human AO ophthalmoscope did not require any adjustment of the algorithm nor further hardware modifications, demonstrating the ease of portability to existing systems.
The imaging light sources for model and rat eyes were a laser diode (Model: RS670-350; MeshTel, Genoa, NV, U.S.A.) and a diode-pumped solid-state (DPSS) laser (Altechna, Vilnius, Lithuania) with nominal centre wavelengths of 670 and 532 nm, respectively. We used a laser diode for the model eye to take advantage of reduced speckle, and a 532 nm laser for the rat since this is strongly absorbed by haemoglobin, providing good contrast when imaging blood vessels [22]. The wavefront sensing light sources used to obtain comparative WFS-AO images were DPSS lasers, with wavelengths matched to the respective imaging light sources. Since DPSS lasers are moderately coherent for our purposes, they were used in conjunction with spatial phase randomizers (SPRs) (Md Lasers & Instruments, Inc, Pleasanton, CA) to modulate the time average coherence, and hence reduce speckle, in our images [14].
The imaging light source for the human eye was a 6W supercontinuum laser filtered through a monochromator (Fianium Ltd., Southampton, UK). We used only 750 ± 25 nm for human imaging as it provides good contrast for cones and safety for longer imaging, which allows enough time for convergence of the NS-AO algorithm. For both AO ophthalmoscopes, imaging lasers were synchronised to the retinal imaging camera and pulsed at the respective acquisition rates and exposure time of 3 ms.
The power of the 532 nm (rat) and 750 nm (human) lasers at the corneas of the rat and human eyes was 320 µW and 650 µW, respectively. The field-of-view (FOV) of the rat and human AO ophthalmoscopes were 2.4° and 1.25°, respectively. At these levels, the exposures are safe by 0.25 log unit of the maximum permissible exposure (MPE) for 60 seconds of repetitive pulse exposure for the rat eye at 15 Hz, and 1.13 log unit for the human eye, at 25 Hz [23], which exceeded the maximum convergence time for NS-AO.

Potential image quality metrics
Choosing an appropriate image quality metric is critical to the success of the NS-AO optimization process. Using our AO ophthalmoscope designed for the 3.75 mm rat pupil [14], together with a 60 D model eye at different eccentricities, we investigated three alternative image quality metrics. A simple artificial retina was made by printing ink patterns onto paper, which effectively limited target features to a single plane. Model eyes were used instead of real eyes to exploit their ease of manipulation -an immobile target and fine adjustment of refractive error and eccentricity make them ideal for exploring NS-AO approaches that require many repeated exposures. A small region of interest (ROI) within the 2.4° frame field, generally < 1° in size, was chosen for the NS-AO optimization process.
The first metric we investigated was the coefficient of variation of all pixels ( All CV ) in the ROI, divided by that of the reference ROI, given by where all σ is the standard deviation of the values of all pixels in the ROI, and all µ is the mean value of all pixels in the same ROI. Dividing the standard deviation by the mean intensity makes the algorithm less susceptible to intensity variations across different frames in the optimization process, which may occur for example with eye movements. This metric was chosen since it represents overall spatial contrast, which we reasoned should increase as the image gets sharper with NS-AO.
The second metric was defined as the average value of the coefficients of variation of the rows and of the columns ( where the main feature of interest has a distinctive orientation within the ROI, such as a blood vessel, which can lead to perverse convergence behaviours using the All CV metric especially off-axis unless orthogonal contrasts are given due weight. The third metric was obtained by performing two-dimensional discrete Fourier transform on the ROI with a fast Fourier transform algorithm ( FFT ) to extract contrast energy within a specified spatial frequency band. This method is similar to a previous study which used low spatial frequencies as the image metric [12]. In this study, we used the average radial energy over 4 -270 cycles/mm for the 60 D model eye, and 4 -800 cycles/mm for the 220 D model eye in this metric, in order to account for all frequencies within the ROI. To avoid edge artefacts in the FFT , a cosine filter with value 1 in the centre and declining to 0 at the edge of the array was applied to the ROI. In addition, the ROI was padded with pixels of zero value to a size of 512x512, since the FFT can be sped up considerably using a square array with size to the power of 2.
We compared the performance of the three image metrics by calculating the average radial energy from the Fourier transform of their respective final images, using the model eyes. These average radial energy plots were normalized against that of the uncorrected image for better comparison, such that the energy value of the uncorrected image equaled 1.0 for all spatial frequencies. It should be noted that the DC component of the Fourier transform, which represents the average intensity of the images at 0 cyc/mm, was excluded from the plots in all instances where the average radial energy plots are shown. The corresponding ROIs used for the analysis will also be shown in the Results section. As detailed in the Results section (3.2) below, we found that consistently gave the best image quality, and this was therefore our metric of choice for all subsequent experiments.

Image-based sequential modal NS-AO algorithm
Wavefront aberrations can be represented by the linear combination of independent, orthogonal Zernike terms in the pupil plane, which can be modelled sequentially by the DM in NS-AO optimization. Other methods of modal NS-AO have been described previously [7,8,13], which employed trials of typically 5-9 evenly spaced values for each Zernike term, with some form of curve fit to determine parameter values maximizing the image quality metric. In this study, we adopted a more dynamic approach using a two-phase procedure detailed below, using custom software in Matlab that operates in conjunction with our existing wavefront-based AO software.
Our algorithm was developed to optimize (i.e. maximize a chosen image quality metric) individual Zernike terms with the exception of piston ( 0 Z ), tip ( 1 Z ) and tilt ( 2 Z ), since these do not influence the final image quality. A total of 25 Zernike terms (up to and including the 6th order) were used in each iteration of the algorithm.
In terms of the order of correction, defocus ( 4 Z ) was optimized first, followed by astigmatism ( 3 Z and 5 Z ), since these generally account for the largest portion of aberrations in human and rodent eyes [4,24]. These lower order aberrations ( 4 Z , 3 Z and 5 Z ) were repeated twice to ensure optimum correction and image quality before higher order terms ( 6 Z to 27 Z ) were engaged. Therefore the order of modal correction for each iteration was: 4 Z , Z . An outline of the sequential algorithm steps is described below: 1. Deformable Mirror (DM) begins in flat state.
3. The relationship between image quality and Zernike value is assumed to be an inverted U-shaped function with a defined peak. To find this peak for the th i Zernike term in the th n iteration: a. Apply changes in Zernike value ( C ) from the current value (initially 0 in the first iteration), in the direction that increases the IQ .
b. Apply DM command corresponding to the resultant Zernike value ( r C ).
c. Trigger the retinal camera, and calculate the image quality ( r IQ ) from the resultant frame. d. Repeat 3a to 3c until a reversal of direction of r IQ is encountered.
e. Fit smoothing spline using the Matlab function "csaps" to the r IQr C pairs to provide a best estimate for the current location of the peak image quality value ( ( ) i max IQ ) and the corresponding Zernike value ( ( ) f. Apply DM command corresponding to ( ) i max C , maintain for the next Zernike term in the sequence. Then repeat 3a to 3f for the next Zernike term.
4. After optimizing each Zernike in the sequence, one iteration has occurred. The DM command corresponding to the best image quality value in the entire iteration ( ) is maintained for the next iteration. The above procedure is then re-iterated until changes in image quality reach a defined threshold (e.g. inter-iteration improvement of ( ) n max IQ < 0.5%), a maximum number of iterations is reached, or manual halting of the algorithm is initiated. In step 3a above, the initial change in Zernike value C is dampened for each iteration n in order to improve the robustness of the optimization process, according to where I is an initial arbitrary value and k is a "constraint factor" that can be varied empirically to control the magnitude of the decrease of C over iterations. In our experiments, we used k = 0.65, and I = 0.1 µm (rat ophthalmoscope) or 0.15 µm (human ophthalmoscope) for terms 4 Z , 3 Z and 5 Z , and I = 0.05 µm (rat ophthalmoscope) or 0.075 µm (human ophthalmoscope) for higher order terms.
In order to control the DM at steps 3b and 3f above, the desired wavefront to apply was converted into a theoretical wavefront slope at each DM actuator position. These slopes were multiplied by the reconstructor matrix previously determined using WFS-AO [5], to determine the change in command voltages required (i.e. linearity of the mirror was assumed). These signals were then added to the current DM command. It should be noted that after each DM command is sent, enough time should be allowed for the DM to settle to the new shape. We used different settling times for the DMs due to their response speed difference. For the rat AO ophthalmoscope which has a Mirao-52d DM (Imagine Eyes, Orsay, France), a settling time of 70 ms was used for stable performance. For the human AO ophthalmoscope which has a HiSpeed DM97-15 (Alpao, Montbonnot St. Martin, France), a settling time of 10 ms was used.
The frame rate of NS-AO depends on the size of the ROI used and the DM settling time. For the rat AO ophthalmoscope, the frame rate achieved was ~10 Hz, which was largely limited by longer DM settling time for the Mirao mirror. For the human AO ophthalmoscope which featured the Alpao mirror, the frame rate of ~25 Hz was limited mainly by the camera readout time. Overall, 4 to 6 complete iterations (30 to 45 seconds) were needed for convergence.

NS-AO imaging on model, human and rat eyes
Using the NS-AO algorithm, we obtained NS-AO images from the 60 D and 220 D model eyes using as the image metric. In order to verify the correction quality of NS-AO, we compared it with conventional WFS-AO images, which served as a 'gold standard' since WFS-AO is expected to produce diffraction-limited imagery for such eyes. Comparison of image quality was achieved by calculating the average radial energy from the Fourier transform of the respective final images from NS-AO and WFS-AO. The ROI used for this comparison was centred on the WFS beacon on the retina to ensure the best WFS-AO image was used.
In addition, we also compared images from NS-AO to WFS-AO when the SHWS spot quality was artificially degraded by rotating the model eye 10° off-axis. At this eccentricity, the spots in the SHWS appeared elongated and degraded due to a moderate amount of astigmatism present (SHWS spots shown in Fig. 7). It should be noted that correction of the SHWS spots is possible with correction of the input or output beam with AO provided the spot quality is good. However, for the purpose of this experiment, the degraded SHWS spots were used to simulate situations where the spot quality cannot be improved. In such cases, we expect NS-AO to offer advantages since its does not require wavefront sensing.
Apart from model eyes, human and rat eyes were also imaged to test the algorithm's robustness for in vivo imaging. For human imaging, the left eye of a healthy adult subject at 31 years of age was imaged. Informed consent was obtained and imaging was performed according to protocols approved by the University of Melbourne Human Ethics Committee. Before the imaging session, a mydriatic (0.5% tropicamide, Mydriacyl, 5mg/mL; Alcon Laboratories) was instilled in the subject's left eye to dilate the pupil. Eccentricities from ~1° to 2° and an area of 1.25° diameter were imaged (although the ROI chosen for optimization was ~0.5°). Human eye imaging with the NS-AO algorithm requires allowance for blinks to prevent evaporation of the tear film and subsequent degradation of image quality. We therefore introduced a one-second pause and concurrent beep sound every 8 seconds during the optimization process to cue the subject to blink without disrupting the NS-AO acquisition.
For rat imaging, the left eye of a 7-month-old female rat was imaged using NS-AO and HiLo imaging. All animal experimental procedures were in compliance with the National Health and Medical Research Council Australian Code of Practice for the care and use of animals for scientific purposes. Prior to commencement, animal ethics approval was obtained from the Howard Florey Institute Animal Experimentation Ethics Committee. Adult Long-Evans rats were anaesthetized via intramuscular injection of ketamine:xylazine anaesthesia (60:5 mg/kg; Troy Laboratory, Glendenning, NSW, Australia). Topical administration of anaesthetic (0.5% proxymetacaine hydrochloride, Alcaine, 5 mg/mL; Alcon Laboratories, Frenchs Forest, New South Wales, Australia) and mydriatic (0.5% tropicamide, Mydriacyl, 5mg/mL; Alcon Laboratories) eliminated the blink reflex and dilated the pupils, respectively. To provide a clear optical surface custom-made rigid contact lenses (base curve 3.0 -3.2, power ~ + 10 D, Gelflex, Perth, Australia) were carefully placed on the eye undergoing imaging. The contralateral eye was lubricated with an ophthalmic gel to prevent desiccation of the cornea. The animal was then placed on a custom-made small animal stage and aligned using the pupil camera. Once the desired retinal location was identified, NS-AO imaging was performed. Since animal imaging was conducted under general anaesthesia, allowance for blinking was not required in the algorithm. versus frame number in blue in a 20 D model eye at 10° off-axis, using the NS-AO algorithm in the human AO ophthalmoscope.

A representative example of NS-AO optimization
The total duration of this particular example is ~27 seconds at 25 Hz frame-acquisition speed. A total of 580 frames corresponding to 4 iterations are shown. Both image quality (blue line plot) and the corresponding Zernike terms (black staircase plot) are plotted against frame number for better comparison. The value of the image quality metric was normalized against the initial value, which equals 1.0 in the blue line plot. The best image quality values from each iteration are joined by red dashed lines, indicating the improvement of image quality over time. (It should be noted that ideally, the best image quality in an iteration would be the starting point of the next iteration. However, this is not necessarily the case in the above graph, possibly due to hysteresis in the deformable mirror.) In general, optimization of a Zernike term was reached within ~6 trials on average. This can be calculated by dividing the number of frames (e.g. 580 in this case) by the product of Zernike terms (25) in each iteration and the number of iterations (4) -580/(25*4) ≈6. For subjective comparison of image quality, the corresponding initial and final images (single frame) are also shown below the graph. Single frames are shown due to substantially higher light levels returned and accordingly higher signal-to-noise ratio in the model eye. In addition, since there was no eye movement, no movement-based averaging of laser speckle could occur. For these reasons, averaging multiple frames resulted in similar image quality. Figures 2 and 3 show the average radial energy from the Fourier transform of the ROI (taken from the centre of the full field) in a 60 D model eye at 10° off-axis, with the 3 image metrics defined above. The values are normalized to the uncorrected image at each spatial frequency for better comparison. Spatial frequency in cycles/mm is shown on the horizontal axis. A frequency cut-off of 270 cycles/mm was applied for display, which corresponds to the diffraction-limit of the 60 D model eye when imaged over a 3.75 mm pupil with 670 nm light.

Comparison of image quality metrics for NS-AO
In Fig. 2, the ROI was centred on an ink stripe. As a result of the sharpening of the image from NS-AO, the lower spatial frequency information (< 25 cycles/mm) from all metrics contributed proportionally less to the overall energy (amount of information at a given frequency), while the remaining spatial frequency information contributed proportionally more. give the similar image quality, whereas the highest spatial frequency details (bright spots) seems best resolved by & R C CV . In Fig. 3, the ROI was centred on a cross, which contained spatial information in both horizontal and vertical directions. In contrast to Fig. 2, the graph for metric FFT actually contains the least energy across almost all spatial frequencies, indicating the inconsistency of this metric. On the other hand, although the graphs of resulted in the sharpest image, while FFT resulted in the worst image. It should be noted that the FFT metric sought to optimize the average energy across the stated frequency range. So there is no hard requirement that it optimize the energy at the high or low frequency end of the spectrum. In the case of Fig. 2 at least this approach appears to have been successful, in that the energy is higher when considered as an average across the spectrum. We also experimented with a similar approach in which we considered only the higher frequency portion of the spectrum (not plotted/discussed), which we found generally to be less robust and did not explore further. Although not shown above, we also compared the performance of the three metrics onaxis with the 60 D model eye. The results suggested similar performance with all three metrics in the low and mid spatial frequencies (< 180 cycles/mm). At high spatial frequencies (> 180 cycles/mm), metric FFT resulted in the worst image quality, whereas metric & R C CV resulted in slightly better quality than All CV . In addition, image quality improvements afforded by metric & R C CV over All CV was more apparent when imaging the model eye offaxis (not shown) with our human flood AO ophthalmoscope, which has a 7.6 mm pupil and therefore increased amount of aberration at the same eccentricity compared to the rat flood AO ophthalmoscope.
Due to its consistency and better resultant image quality at high spatial frequencies, was chosen as our image quality metric for subsequent NS-AO experiments shown below.

Comparison between WFS-AO and NS-AO in model eyes
as an image quality metric for flood NS-AO imaging, we compared the image quality of NS-AO with WFS-AO in both the 60 D and 220 D model eyes, shown in Figs. 4 and 5. The wavefront sensing beacon for the WFS-AO image was positioned in the middle of the ROI shown.
Similar to Figs. 2 and 3, the average radial energy from the Fourier transform of images is plotted against the spatial frequency in cycles/mm. The values are normalized to the uncorrected image for better comparison. A higher cut-off of 1000 cycles/mm was applied for the graph of the 220 D model eye, since it corresponds its diffraction-limit when imaged over a 3.75 mm pupil with 670 nm light. As seen from the graph in Fig. 4, the WFS-AO (blue line) and NS-AO (red line) traces are similar across most of the spatial frequency range shown. However, in the higher-powered model eye in Fig. 5, NS-AO returns higher relative contribution at mid spatial frequencies (~250 -680 cycles/mm). This is confirmed by subjective inspection of the finest features in the corresponding images (Fig. 5), which showed that the WFS-AO image is sharper at the centre, but more blurry at the edges, whereas the NS-AO image is sharper at the edges. One explanation for the above is the potential non-correction of residual non-common path errors in the wavefront sensing arm of the system [10], affecting WFS-AO but not NS-AO which bypasses the SHWS. However, this is more likely to be due to a more sharply limited isoplanatic patch in WFS-AO in the higher-powered eye, since we placed the beacon at the centre of the ROI (white arrows), whereas in NS-AO our selected ROI was substantially wider which would be expected to result in flatter isoplanatism extending out from the ROI [26].
We next compared the Zernike solution of the NS-AO correction to the initial, precorrection wavefront error measured with the SHWS and expressed in Zernike modal form. The Zernike coefficients corresponding to the NS-AO and Uncorrected images in Figs. 4 and 5 are shown in Fig. 6 for both the 60 D and 220 D model eyes, on-axis. As Fig. 6 shows, the magnitude of most Zernike coefficients is similar between the NS-AO and uncorrected cases for the 60 D eye, with increasing divergence between the two apparent for higher order terms in the 220 D eye (e.g. term 12, or spherical aberration, in the 220 D eye).
Note that a pupil size of 3.5 mm (instead of 3.75 mm) was used for fitting the Zernike terms, to minimize edge effects from fitting Zernike terms close to the edge of the pupil. In addition, defocus (Zernike term 4) was excluded from the graphs since we do not necessarily expect them to match as a result of the non-common path between the retinal camera and the SHWS.  Although WFS-AO images were used as the gold standard of image quality in our study, the fidelity of WFS-AO imaging can be affected when the SHWS spots are distorted or generally of poor quality. This is illustrated in Fig. 7, where the 60 D model eye is rotated 10° off-axis. The WFS-AO image quality in Fig. 7(b) appears poorer as a result of the degraded spot quality. However, the reported residual RMS remained apparently good at ~0.06 µm, which could be misleading when deformed spot positions are modelled using simple centroids. The undistorted SHWS spots from a 60 D model eye on-axis are also shown in Fig.  7(c) for comparison. On the other hand, NS-AO imaging requires no SHWS input and is therefore immune to factors that degrade SHWS spot quality. This can be seen in the Fourier analysis and the corresponding images in Fig. 7, where the NS-AO image appears sharper than its WFS-AO counterpart.

NS-AO human and rat eye imaging
The above results demonstrate the ability of our NS-AO algorithm to image model eyes at various eccentricities. This approach seems to have advantages for high-powered eyes. Here we present results from in vivo NS-AO imaging of human and rat eyes obtained using our human and rat flood AO ophthalmoscopes, respectively. Figure 8 shows the ROI used for NS-AO optimization at two different eccentricities from the left eye of a healthy human subject, averaged from 100 frames. At 0.75° inferior to the fovea, the larger cones are well defined in the bottom half of the ROI, while the smaller cones close to the foveal centre at the top of the ROI are less well resolved. At 2° temporal to the fovea, almost all cones are well defined within the ROI.
Apart from cones, we also attempted to direct the NS-AO algorithm to image blood vessels at the 2° temporal location by initially offsetting the defocus to the blood vessel layer, achieved by moving the retinal camera axially. However, the implemented NS-AO algorithm tended to automatically "lock on" to cones during the optimization process, probably due to the fact that cones have much better contrast than blood vessels at the 750 nm imaging wavelength.   9. A blood vessel ~10 µm in diameter in the rat eye before AO correction (LEFT) and after optimization by NS-AO with HiLo imaging (RIGHT), averaged from 25 frames. Images were stretched to fill their colour map for display purposes. Imaging λ: 532 nm, pupil size: 3.75 mm. ROI size: ~2° x 2°. Scale bar: 20 µm.
In addition to human eye imaging, we also attempted NS-AO on the rat eye using the rat flood AO ophthalmoscope. No contrast-enhancing agent was used and we aimed to image blood vessels by way of the intrinsic absorption of haemoglobin, using 532 nm light. An example combined NS-AO/HiLo image of a 10 µm wide rat blood vessel for is shown in Fig.  9 (average of 25 frames). NS-AO/HiLo imaging provides a significant improvement over the uncorrected image. The blood vessel can be better delineated.

Discussion
We have demonstrated a wavefront sensorless adaptive optics (NS-AO) correction algorithm that works in conjunction with flood AO ophthalmoscopy. NS-AO image quality was comparable to, or even exceeded that from WFS-AO in the model eye. Even though NS-AO has been adopted in other in vivo AO imaging modalities such as OCT and SLO [6,7,27], to our knowledge this is the first time that NS-AO has been shown in in vivo retinal imaging using a contrast metric with a flood AO ophthalmoscope. As suggested by others, the use of more principled image quality metrics has potential benefits for non-flood AO ophthalmoscopes [10], and so this work may also prove useful outside the realm of flood AO imaging.
Our NS-AO imaging experiments were generally successful since we were able to obtain in vivo images of cones in the human eye consistently, even though WFS-AO image quality of human cones from the same subject and same flood AO ophthalmoscope is still superior [21,28]. As for the rodent eye, we were able to obtain good image quality of small blood vessels with the aid of the HiLo technique [14]. Image quality was comparable to our previous attempts to image larger blood vessels using WFS-AO [14]. However, due to the high power of the rat eye (~300 D), wider blood vessels have a relatively large dioptric thickness. For example, a blood vessel ~20 µm in width has a dioptric thickness of ~1.4 D. As a consequence, the NS-AO algorithm could struggle to find the best focus during optimisation of larger blood vessels in the rat eye. It is also possible that the NS-AO algorithm could "lock onto" information residing slightly outside the plane of interest, which could be compensated for by manual adjustment of defocus after completion of the NS-AO algorithm, although we did not attempt this during the experiment.
The main advantage of NS-AO over WFS-AO imaging is the removal of the wavefront sensing step, the accuracy of which is susceptible to the quality of SHWS spots. Although we have demonstrated that the SHWS spot quality can be adversely affected by imaging at a large eccentricity, other factors such as ocular media scatter (such as in rodent eyes [4]), multiple reflections from different layers of a thick retina [14], small pupils [6] and non-uniformity of the sample (such as imaging the optic nerve) can also lead to degraded or distorted SHWS spots.
Another advantage of an NS-AO approach is that the size and location of the optimized ROI can be chosen as desired. Choosing a smaller ROI allows us to centre the isoplanatic zone to an area of interest within a larger field without moving the eye, as shown from the increased isoplanatic patch size of NS-AO compared to WFS-AO in Fig. 5. In addition, it is also possible to choose multiple ROIs that can be stitched together to promote isoplanatism over the entire FOV. Although a scanning spot could be used in flood AO ophthalmoscope [29], and potential wide-field isoplanatism is an inherent feature in SLO systems since SHWS spots are time-averages of the scan spot having been swept over the entire field [30], the same sort of central versus wide-field isoplanatism trade-off has not previously been possible with flood AO imaging [25,26].
In addition to the above, NS-AO has the inherent advantage of bypassing non-common path errors between the SHWS and imaging arms, since it does not require wavefront sensing. This feature has been use to correct non-common path errors when building WFS-AO systems [10]. In our rat AO ophthalmoscope, the non-common path defocus offset between the SHWS and the camera is ~0.25 D for the 60 D eye and ~0.7 D for the 220 D eye. The defocus term was therefore excluded in Fig. 6 since we did not expect it to be similar between NS-AO and the uncorrected cases. The non-common path difference for the higher order Zernike terms, particularly spherical aberration since imaging was performed on-axis, between the NS-AO and uncorrected cases in Fig. 6 is also more pronounced in the 220 D eye. This observation is in-line with our previous optical modeling results [15], which showed that defocus offset alone was sufficient to compensate for the separation between the wavefront sensing and imaging planes in the human model eye, but not in the highly powered rat model eye.
The main disadvantage of NS-AO is its longer convergence time compared to WFS-AO. It can be seen from Fig. 1 that although image quality generally improves over iterations, fluctuations were present such that the best image quality did not necessarily occur at the end of each iteration. Such fluctuations are expected since we have plotted the outcome of each arbitrary Zernike perturbation, as opposed to only plotting the improvements. Additional fluctuations may occur because although the Zernike functions are orthogonal in the pupil plane, they interact in the image plane such that changes in one Zernike term will necessitate changes in some of the other terms. A potential method to reduce the number of iterations could therefore be to employ corrector modes based on orthogonal representations of the PSF in the image plane, which to our knowledge has not attempted previously.
The specific convergence time also depends on the type and magnitude of aberrations, the size of the ROI chosen and, for in vivo imaging, temporal variation of aberrations arising from eye movements, tear film stability, accommodation, breathing artefact and camera frame rate. Due to the iterative nature of the algorithm and sequential correction of the Zernike terms using arbitrary initial values, our algorithm generally takes 30 to 45 seconds to converge with all computation performed on the CPU. The average number of trials for the optimization of each Zernike term in our algorithm is around 6, which is comparable to previous studies [7][8][9] using modal sequential search algorithms, which have ranged from 6 -17 trials per Zernike term. However, much shorter convergence time can likely be achieved with sCMOS cameras, which can run at much higher frame rates [31]; taking advantage of GPU image processing [8]; and using a DM with a shorter equilibrium settling time after each command is updated. The number of iterations required can also be reduced by pre-correcting large defocus in the eye with trial lenses or by moving the imaging camera axially.
Slow convergence can be particularly problematic for in vivo imaging applications, where the dynamic nature of aberration caused by accommodation, eye movement, breathing and tear film change can affect the final image quality. In our human experiment, we controlled accommodation by using a mydriatic agent, eye movement and breathing by using a fixation target and an experienced subject, and tear film stability by having the subject blink on a regulated schedule. However, fixational eye movements were unavoidable and likely hampered convergence. Real-time registration of eye movements is a potential avenue to overcome this [32,33]. In our rodent experiment, some of these issues were ameliorated using general anaesthetic and a rigid contact lens [34], but breathing artefacts remained a significant confound.
The final image quality from NS-AO depends largely on the chosen image quality metric, as shown in Figs. 2 and 3. When the average image intensity was used as the NS-AO image metric, we found not only that convergence could not be reached, but that spurious aberration could be introduced by the DM to create a brighter image (with no particularly distinct contrast features) within the ROI, by misdirecting light from outside the ROI. We also observed spurious DM behaviour when using All CV as the image metric at off-axis locations, when the image ROI contained dominantly oriented structure such as an ink stripe (e.g. the in vivo equivalent of a single blood vessel) instead of more complex ink patterns (e.g. the in vivo equivalent of vessel bifurcations or photoreceptors). We observed that excessive astigmatism would be induced along the axis of the stripe, distorting the image so that it appeared to be black on one-half, and white on the other half to create a high contrast image. Using & R C CV as the image metric provides a simple check on this type of unbalanced DM behaviour, and we were able to obtain consistent image quality in all eyes across all eccentricities. We found that the time to compute any of our ROI-based metrics of image quality did not significantly add computational overhead, and was not the rate-limiting factor of NS-AO performance.
According to Fienup and Miller [35], the effect that different metrics have on the final image quality can be understood by examining the second derivative of the point transformation of the intensity. If the second derivative is a function that increases with higher values of intensity, it tends to give more weight to making the bright areas brighter than making the dark areas darker. On the other hand, if the second derivative of a metric is a function that increases with lower values of intensity, it tends to emphasize darker areas.
A special case arises when the second derivative of a metric is a constant. In this case, the metric gives equal weight to both bright and dark areas in the image. An example of this is Muller and Buffington's metric 2 1 ( , ) S I x y dxdy =  [36], which is also used in a recent study to compensate for non-common path errors in an AOSLO [10]. The nonlinear point transformation is 2 ( , ) I x y in this case, where I is the intensity of pixels and x and y are coordinates within the image. According to Fienup and Miller [35], our metric All CV should perform similarly to Muller and Buffington's 1 S , since it involves initially squaring the difference between intensity of each pixel and the average intensity when calculating the standard deviation, and its second derivative is a constant. However, we found & R C CV better suited for NS-AO imaging since it promotes due weight to be given to contrast oriented in all directions, as is generally the case for retinal features.
Focusing on blood vessels is somewhat challenging in our NS-AO experiments, since the NS-AO algorithm tends to optimize high contrast features, such as cones in the human eye. It is possible to obtain NS-AO images of blood vessels in the human eye by altering defocus alone after optimization of cones, as is routinely done with WFS-AO. However, such a method may not be viable for the rat eye, since the rat eye is dominated by rods [37, 38] which cannot be routinely imaged even with AO. Alternatively, an image metric could be devised whose second derivative increases with decreasing intensity values, such as using the reciprocal or log value of the intensity [35]. By doing so, the metric could be used to optimize blood vessels since it gives more weight to making the dark areas darker [35].
Proven methods to enhance resolution in rodent eyes have required the use of contrastenhancing agents [39,40], using imaging modalities with sectioning capabilities [39-41] or otherwise rejecting scattered light from outside the plane of interest using HiLo imaging [14], as done in this experiment. Coupled with NS-AO, such methods may produce more robust image quality for in vivo imaging of small animal eyes than is achieved with current approaches, through bypassing the troublesome wavefront sensing step.

Conclusion
In conclusion, we have successfully incorporated a contrast-based wavefront sensorless adaptive optics algorithm into existing flood AO ophthalmoscopes. We devised a robust and simple image quality metric to suit flood NS-AO ophthalmoscopes, which would likely be of use to scanning systems as well. Practical use of the algorithm has been demonstrated for model and in vivo human eye imaging, showing similar or in some cases superior performance to conventional WFS-AO. Significant improvement of the speed of this algorithm, and consequently the robustness for in vivo imaging, should be possible by utilising higher frame rate cameras. This approach may further improve the quality and/or robustness of current best efforts to image small animal eyes with the use of contrastenhancing agents and/or imaging modalities with sectioning capabilities.