Summary
Noninvasive imaging of endogenous retinal fluorophores, including vitamin A derivatives, is vital to developing new treatments for retinal diseases. Here, we present a protocol for obtaining in vivo two-photon excited fluorescence images of the fundus in the human eye. We describe steps for laser characterization, system alignment, positioning human subjects, and data registration. We detail data processing and demonstrate analysis with example datasets. This technique allays safety concerns by allowing for the acquisition of informative images at low laser exposure.
For complete details on the use and execution of this protocol, please refer to Bogusławski et al. (2022).1
Subject areas: Bioinformatics, Health Sciences, Clinical Protocol, Neuroscience, Molecular/Chemical Probes, Biotechnology and Bioengineering, Physics
Graphical abstract

Highlights
-
•
Protocol for in vivo imaging of the human retina with two-photon excited fluorescence
-
•
Noninvasively shows the fluorophores’ distribution in the human retina
-
•
The protocol is supplemented with data processing software and an exemplary dataset
-
•
Potential for monitoring eye diseases in the earliest stages before structural damage
Publisher’s note: Undertaking any experimental protocol requires adherence to local institutional guidelines for laboratory safety and ethics.
Noninvasive imaging of endogenous retinal fluorophores, including vitamin A derivatives, is vital to developing new treatments for retinal diseases. Here, we present a protocol for obtaining in vivo two-photon excited fluorescence images of the fundus in the human eye. We describe steps for laser characterization, system alignment, positioning human subjects and data registration. We detail data processing and demonstrate analysis with example datasets. This technique allays safety concerns by allowing for the acquisition of informative images at low laser exposure.
Before you begin
The protocol describes a method to obtain two-photon excited-autofluorescence images of the fundus. It refers to a newly developed method that visualizes the distribution of retinal fluorophores via two-photon excitation,1 and it has been used with healthy human subjects. The protocol requires a two-photon excited-fluorescence scanning laser ophthalmoscope (TPEF-SLO) shown in Figure 1 (described in detail in Bogusławski et al.1), along with a femtosecond laser for the excitation.2 Figure 1 shows the key components of the setup needed for this protocol. The setup allows simultaneous registration of images in two channels, reflectance and two-photon excited fluorescence. Since the fluorescence signal originating from the eye is relatively low (usually <5,000 photon counts/sec, corresponding to an average of approx. 0.08 photon counts/(pixel⋅sec) in our system), it is necessary to average multiple frames. Therefore, reflectance frames are used to correct eye-motion artifacts prior to averaging of fluorescence images. The reflectance frames also serve to monitor the position of the eye during subject positioning and data acquisition. For this reason, both channels need to be co-aligned.
Figure 1.
Schematic diagram of the TPEF-SLO
λ/2 – half-wave plate, M - mirrors, L - lenses, GF – gradient index filter, S - mechanical shutter, NDF - neutral density filter (optical density (OD) = 0.8), BS – beam splitter, GS - galvanometer-based xy scanners, DM - dichroic mirror, BP - set of bandpass filters, PMT - photomultiplier tube, MMF - multimode fiber, APD – avalanche photodiode, LED - light-emitting diode, PH – pinhole. Pink lines schematically show the beam path for extreme scanning angles. The eye pupil should be positioned in a plane conjugate with the scanners.
To register informative images with reduced average laser power, we have taken advantage of the fact that reduced pulse repetition frequency (PRF) translates to increased peak power. Using lower laser power poses a substantially lower risk for melanin-mediated tissue alterations.3 Here, we used a PRF of 5.94 MHz. Additional parameters of the laser source include: a central wavelength in the near-infrared fitting to the two-photon absorption spectra of retinal fluorophores (we used 782 nm); a short pulse duration (approx. 70–80 fs at the pupil plane); and an average power sufficient to deliver 300 μW to the pupil plane. Such average power is below the safety limit for a static beam pointing toward the eye for 40-s; i.e., 398 μW1. The laser parameters must be carefully examined before imaging the human subjects.
The TPEF-SLO must be equipped with several additional safety features controlled by the software. We used custom software, developed using NI LabView and based on work by Ferrand.4 First, it should not be possible to direct the static beam toward the subject’s eye; when scanning is deactivated, the beam should be directed away from the pupil plane of the eye. The additional shutter is activated also in the case of failure of the galvanometer scanners. The shutter is activated also after a set number of frames is recorded (30–40 frames in our case).
We set the scanning parameters to the following values: galvo-scanners voltage -3 to +3 V (vertical and horizontal axes); image size of 256 × 256 pixels; and a pixel dwell time of 20 μs. These parameters result in a relatively large, circular field of view (FOV) of 17.8°, and a frame rate of 0.78 Hz. In total, collecting the desired 30 frames takes approx. 40 s. Detailed safety considerations are included in the supplemental data of Bogusławski et al.1 We intentionally set the scanning angles slightly larger than the clear aperture of lens L3, so that the laser beam would not be directed to the eye during scanner return. This large FOV additionally contributes to the safety of the imaging, as it reduces retinal exposure.1
Additionally, the software should feature a line scan mode, with a horizontal line projected on the retina. Such a mode facilitates faster head positioning in the chin-rest and easier initial correction of refraction error of the imaged subject. During this step, average power below 60 μW is used.
The experimental setup needs to be darkened carefully to reduce background noise. The noise counts in the fluorescence channel should be checked before imaging.
Institutional permissions
All procedures involving human subjects must comply with the Declaration of Helsinki and be approved by the appropriate Ethics Committee. Signed informed consent should be obtained before starting the procedures. Our protocol was approved by the Ethics Committee of the Collegium Medicum, Nicolaus Copernicus University in Toruń (KB 313/2018).
The rationale for the subject screening
For this study, we chose healthy subjects, with good fixation and no ocular opacities. All the measurements require the absence of glasses or contact lenses. However, the system has a built-in mechanism for myopia- and hyperopia-compensation, up to ±4 D.
Guiding the beam: Co-alignment of reflectance and fluorescence channels
Timing: 1 day
The following calibration steps should be performed prior to the first imaging, or after the setup has been unused for an extended period.
-
1.Guide the femtosecond laser beam through the TPEF-SLO.
-
a.Set the scanners’ voltage to 0 V on both axes, which corresponds to the central point of the image.
-
b.Using a set of two mirrors placed at the system’s entrance (e.g., in a periscope, if the laser source and the TPEF-SLO are not on the same levels), guide the beam so that it goes along the optical axis of the imaging setup.Note: The beam should go axially through the optical elements before the scanners, hit the center of the scanning mirrors, and go axially through the L3 and L4 lenses.
-
c.Ensure that the beam coming out of the setup is collimated. Adjust the axial position of lens L4, if needed.
-
a.
-
2.Observe a reflectance and a two-photon excited fluorescence image of the test target sample.Note: During this step, we use a fluorescent alignment disk (Thorlabs ADF4) for the fluorescence channel and a scattering sample (a piece of paper mounted on a blank cage plate) for the reflectance channel.
-
a.Mount an additional imaging lens (L5, focal length 19 mm, to mimic the human eye lens) in the scanner’s conjugate plane (see inset of Figure 1). Such lens positioning resembles the eye’s position during the imaging.
-
b.Place the fluorescent test target in the focal plane of the lens and observe the reflectance image (while scanning the galvos).
-
c.Turn off all the lights in the room and turn on the PMT.
-
d.Adjust the axial position of the sample by maximizing the signal in the fluorescence channel.Note: The maximum fluorescence intensity can be determined by axially scanning the positions of the sample around the focal point. Next, the sample can be positioned in a location corresponding to the maximum fluorescence intensity.
-
e.Observe the image; the aperture should be circular and in the center of the image. The image should be illuminated uniformly.
-
f.If necessary, adjust the angle of the input beam by using a set of two mirrors at the entrance of the TPEF-SLO setup.
-
a.
-
3.Observe a reflectance image of the scattering test-target sample.Note: This step aims to adjust a confocal pinhole of the reflectance channel to the parameters of the laser beam set for the fluorescence channel.
-
a.Switch the test-target sample to the scattering sample.
-
b.Place it in the ‘fluorescence’ focal plane by obtaining a sharp image and maximizing a signal in the fluorescence channel.
-
c.Observe the reflectance image and integrated signal per frame, and adjust the confocal pinhole position to obtain a uniform FOV and maximum signal level.Optional: The recorded images of test target samples can be saved and used as a benchmark for future alignment of the system.Optional: Instead of the Thorlabs ADF4 fluorescent target and a scattering test target, one can use a scattering target that has the fluorophore layer on the imaged surface (e.g., a paper tissue soaked with a fluorophore; an example is shown in Figure 2). We used rhodamine B, which gave good results. In this way, one can achieve results similar to those when using two separate test targets, but faster. It is also possible to use the autofluorescence of the paper, but adding the fluorophore improves the signal intensity and contrast of images and makes sample positioning faster, easier, and more reliable.Note: Steps 2 and 3 should be repeated several times until the maximal signals are detected from both reflectance and two-photon channels for the same test-target position.
-
a.
Figure 2.
Imaging the test target sample
(A and B) Examples of images obtained in co-aligned fluorescence (A) and reflectance (B) channels. Images show a paper tissue soaked with a fluorophore to provide contrast for fluorescence and back-scattering of light.
Scale bars: 1 mm.
Verifying laser parameters
Timing: 1 day
The following steps should be done once to verify the output parameters of the laser. There is no need to repeat these steps before every imaging session unless the laser settings have been modified or the system has not been used for an extended period of time. However, the pulse duration needs to be verified after introducing, removing, or exchanging an optical element in the beam path, as this may influence the net chromatic dispersion of the system.
-
4.Measure the optical spectrum of the excitation pulses in the pupil plane (key resources table).
-
a.Set the scanners’ voltage to 0 V to guide the beam along the optical axis of the setup and keep this setting during points 4–6.
-
b.Using an additional set of silver mirrors at the system’s output (i.e., after lens L4), guide the beam to a spectrometer or optical spectrum analyzer.Note: We have used a pulse with a 782 nm central wavelength.
-
c.Record the spectrum (exemplary spectrum is shown in Figure 3A). Make sure there are no additional spectral components outside the main pulse spectrum.Optional: If possible and necessary, tune the laser to a desired central wavelength.Note: The recorded spectrum may strongly depend on the spectrometer positioning when working with a multimode fiber to collect the spectrum. The presence of the fiber may alter the relative intensities of different spectral peaks due to intermodal interference inside the fiber.
-
a.
-
5.Measure the autocorrelation function of the excitation pulse in the pupil plane (key resources table).
-
a.Using an additional set of silver mirrors at the system’s output, guide the beam to an optical autocorrelator.
-
b.Insert a 23 mm-long cuvette filled with water to mimic the chromatic dispersion of the human eye.Note: Assuming that the human eye mainly consists of water, the estimated group delay dispersion is approx. 620 fs2 at 782 nm. For ultrashort pulses (<100 fs), such a dispersion will cause a change in pulse duration. For example, a 76 fs transform-limited pulse will be stretched to 79 fs.
-
c.Register the autocorrelation function and retrieve a full width at half maximum (FWHM) value (Figure 3B shows an exemplary autocorrelation function).
-
d.If necessary, tune the dispersion pre-compensation unit to obtain a ca. 70–80 fs pulse.Note: We used squared hyperbolic secant-shaped (sech2) pulses with 76 fs FWHM duration.
-
a.
-
6.Measure the average laser power in the pupil plane.
-
a.Ensure that NDF (see Figure 1) on the flip mount is not in the beam path.
-
b.Mount the power meter sensor in the pupil plane of the setup and measure the average laser power.
-
c.Adjust the position of the variable density filter GF to set the average power to the desired level.
-
a.
Note: We used 300 μW average power and a 5.94 MHz PRF.
CRITICAL: It is necessary to observe safety standards defined by the American National Standard for Safe Use of Lasers (ANSI Z136.1-2014). The thermal effects are the primary source of safety hazard upon irradiation of the retina by a pulsed laser beam of near-infrared wavelength. The amount of data available on other factors; i.e., photochemical effects, is limited. One of the few sources is a discussion of possible pathways of laser-induced photodamage provided in Palczewska et al.3
Figure 3.
Characterization of an ultrashort excitation pulse in the pupil plane
(A) Optical spectrum of the laser pulse.
(B) Intensity autocorrelation function of the pulse.
Key resources table
| REAGENT or RESOURCE | SOURCE | IDENTIFIER |
|---|---|---|
| Software and algorithms | ||
| Software for data acquisition written in NI LabView | Ferrand et al.4; Bogusławski et al.1 | https://doi.org/10.17632/8hdyt2rfht.1 |
| Software for data processing written in MATLAB | This work | https://doi.org/10.17632/nhpnt78ssy.2 |
| Fast and Adaptive Bi-Empirical Mode Decomposition script | Wielgus et al.5 | https://doi.org/10.17632/nhpnt78ssy.2 |
| Testing dataset for eye movement correction and frame averaging | This work | https://doi.org/10.17632/nhpnt78ssy.2 |
| Experimental models: Organisms/strains | ||
| Human subjects (adults, any gender) | N/A | N/A |
| Other | ||
| ∗∗Femtosecond laser with adjustable PRF | Stachowiak et al.2 | N/A |
| Dispersion pre-compensation unit (e.g., prism-pair pulse compressor) | Bogusławski et al.1 | N/A |
| Two-photon excited fluorescence scanning laser ophthalmoscope | Bogusławski et al.1 | N/A |
| Photomultiplier tube | Hamamatsu | HP7422P-40 |
| Optical power meter | Thorlabs | PM100D or alternative |
| Semiconductor sensor for power meter | Thorlabs | S120VC or alternative |
| Spectrometer | Broadcom | AFBR-S20M2VN or alternative |
| Optical autocorrelator | APE | PulseCheck equipped with PMT detector or alternative |
| ∗Lens with 19 mm focal length | Thorlabs | AC127-019-B-ML or alternative |
| ∗Z-Axis translation mount for precise lens positioning | Thorlabs | SM1ZA or alternative |
| ∗Fluorescent alignment disk | Thorlabs | ADF4 or alternative |
| ∗Cage plate for mounting fluorescence alignment disc | Thorlabs | CP35 or alternative |
| ∗Blank cage plate for mounting scattering test target | Thorlabs | CP31/M or alternative |
| Cuvette | Aireka Scientific Co., Ltd | IL2NR20 or alterative |
∗Model eye.
∗∗Alternatives: An alternative femtosecond laser with adjustable PRF can be used (Mode-Locked Technology, ModeSHG).
Step-by-step method details
This section provides detailed instructions for data acquisition (Part 1) and subsequent data processing (Part 2). The protocol results in obtaining a two-photon-excited fundus image by averaging a total of approx. 80–120 frames (we perform 4 measurement series, recording up to 30 frames during each one) and it can be extended to obtain more frames. The procedure starts with the initial alignment of the imaged subject. Next, it utilizes a femtosecond laser to acquire two-photon-excited fluorescence and reflectance images of the fundus simultaneously, which is necessary for further data processing. Before starting the process, signed informed consent must be obtained.
Part 1a. Positioning the subject
Timing: up to 30 min
This step results in the initial positioning of the subject and obtaining a reflectance image. The timing is related to the total time the subject spends with the imaging instrument during initial positioning. The subject has to fix the eye position for a much shorter time, usually less than 40 s at a time.
-
1.Check and adjust the laser power in the pupil plane.
-
a.Set the scanners’ voltage to 0 V to guide the beam along the optical axis of the setup.
-
b.Remove the NDF (OD = 0.8) from the beam path.
-
c.Set the power to the desired level by adjusting the position of GF.
-
d.Return to the frame scanning mode, where the beam is not allowed to go along the optical axis.
-
a.
-
2.
Ensure that the subject is seated comfortably and can place their head on a chin rest.
-
3.
Adjust the chin-rest to position the imaged eye in the center of the lens L4 in both horizontal and vertical axes.
-
4.
The axial position of the chin-rest should be adjusted to place the pupil in the scanner’s conjugate plane.
Note: The FOV should be the largest in this case (a FOV marker can be placed in the control software as a reference). The scanning lines should be relatively sharp for the subject.
-
5.
Adjust the fixation position so the eye can perceive it; it should appear on the scanning line.
-
6.
Adjust the fixation sharpness by adjusting the position of lens L7; it should appear as a sharp point.
Note: Both the chin-rest and the fixation point can be mounted on motorized stages to facilitate subject positioning.
-
7.
Start the frame scanning mode and observe reflectance frames.
Note: Ask the subject if they can see the scanning red line. Ask the subject whether the line is cut on the edges. If yes, correct the eye position.
Note: The use of a pupil camera would ease the initial positioning of the subject.
-
8.Start a line scan mode, correct the refraction error, and adjust the eye position.
CRITICAL: The average power for this step should be as low as possible. We use the average power within the 50–60 μW range.Note: This step allows for the initial correction of the refraction error.-
a.Ask the subject if the line is positioned vertically in the center of the FOV. Move the chin-rest up and down; the line is centrally positioned when it is the widest (Figure 4, lateral alignment).
-
b.Ask the subject if the line is positioned horizontally in the center of the FOV. Move the chin-rest left and right; the line should not be cut on the edges and should appear the widest (Figure 4, lateral alignment).
-
c.Adjust the axial position of lens L4. Ask the subject to report at which position of the lens the line is the sharpest. In addition, while the beam is correctly focused, it changes its color – instead of dark red, it appears pink-white (Figure 4, axial alignment).Note: We did not test the system on color-blinded or color-weakness subjects so far. Nevertheless, this step is not critical. We observed that the position of the lens L4, at which the color changes, corresponds to the point at which the maximum fluorescence intensity is obtained, and this criterion is sufficient to position the subject.
-
a.
-
9.
Start the frame scan mode; a reflectance image of the fundus should appear at this point. Adjust the position of fixation to display a particular fundus location.
-
10.
For the final correction of refraction, adjust the axial position of lens L4 by looking at the integrated pixel intensity value in the reflectance channel and observing the obtained images. Find the axial position of the lens where the highest intensity and the sharpest reflectance images can be obtained.
Note: The average laser power should be as low as possible. A maximum of 50 μW for a FOV of 17.8° should allow a sufficient quality of reflectance images to be obtained.
-
11.
Now, the fixation position could be corrected finally to display the chosen FOV at the eye fundus.
Optional: The obtained images can be saved as a reference. Examples of such images are shown in Figure 5.
Figure 4.
Subject’s view during eye positioning in the line scan mode
The sketch shows correct and incorrect views during the alignment in axial and lateral directions.
Figure 5.
Representative reflectance images
(A) Single-frame reflectance image was obtained with 50 μW excitation power.
(B) Single-frame reflectance image obtained with 300 μW excitation power.
Scale bars: 1 mm.
Part 1b. Obtain two-photon excited fluorescence image series
Timing: up to 20 min
This step aims at acquiring data used for the reconstruction of fluorescence images.
-
12.
Turn off the light in the room. Cover the subject’s head and the imaging instrument with a black, nontransparent enclosure.
Note: The measurement has to be taken in a dark room (<0.01 lux). We advise removing all unnecessary sources of light from the room (e.g., LEDs of various devices) and decreasing the brightness of the computer screen as much as possible (or additionally covering it with a red filter).
CRITICAL: Do not remove the subject’s head from the chin-rest at this stage, if possible (otherwise re-calibration may be necessary).
-
13.
Adjust the gain of the PMT (key resources table), based on the device manual and calibration curve, to a value with the highest ratio of signal to background noise.
CRITICAL: When turning on the PMT, there must be no light in the room.
Note: An appropriate gain for a given PMT should be used; the procedure to obtain this value should be described in the PMT manual. In our case, it was 860 mV.
-
14.
Record several frames in the fluorescence channel with a blocked laser beam and observe the level of the signal.
Note: The average signal level should be < 0.005 photon counts per pixel. Ideally, it could be reduced to a value close to the number of dark counts of the PMT (in our case, 0.0007 photon counts per pixel). The example of image in the fluorescence channel with laser beam blocked is shown in Figure 6A.
Figure 6.
Representative results of two-photon imaging
(A) Background noise observed in the fluorescence channel with the laser beam blocked.
(B) Single-frame two-photon fluorescence image obtained with 300 μW excitation power.
(C) Single-frame reflectance image obtained with 300 μW excitation power.
Scale bars: 1 mm.
Note: With these adjustments, only stray photons and dark counts are acquired. If the obtained value exceeds the above-specified number, improve light proofing of the setup or check the level of dark counts of the PMT.
Optional: These frames can be recorded to compare the subsequently captured two-photon fluorescence signal to the background noise.
-
15.
Start the frame scanning mode with an NDF in the beam path (50 μW in the pupil plane). Observe the eye position in the reflectance channel and adjust the position if needed.
Note: We have found that even if the eye position is acceptable, it is usually beneficial to wait several seconds to allow a proper fixation before moving to the next step.
-
16.
If the eye position is satisfactory, start recording fluorescence frames: remove the NDF (300 μW in the pupil plane) and start saving both fluorescence and reflectance frames with consecutive numbering; record 30 frames (this step takes about 40 s with a 20-μs pixel dwell time).
Note: The examples of single frames recorded in fluorescence and reflectance channels are shown in in Figures 6B and 6C.
-
17.
Take a 60 s break. The galvo scanner is positioned to direct the laser beam outside the imaging setup aperture in the pupil plane.
Note: Advise the subject to close their eyes or blink and rest.
Note: We found out that during the 60-s break, the eye's position is usually well maintained. Even if a longer break is required and the subject removes their head from the chinrest, usually, a small alignment is sufficient to restore the previous imaging position. The realignment usually takes less than 30 s and can be done using low average power (within the 50–60 μW range).
-
18.
Repeat steps (15)–(17) three additional times.
Note: This procedure will capture 120 frames in each channel; several frames will need to be discarded due to substantial eye movements or unexpected blinks. A total of 120 frames should result in 80–100 usable frame pairs for subsequent data processing. Such a number of fluorescence frames is sufficient to obtain a satisfactory image quality after registration and averaging.
-
19.
Decrease the gain of the PMT to 0 V and uncover the subject.
Note: A dim light can be turned on at this point.
-
20.
Ask the subject to close their imaged eye and record 20–30 frames in the reflectance channel under such conditions (the exact number of frames is not critical for this stage). These data will be used for background subtraction in the final averaged reflectance image.
Note: According to this procedure, only background noise and parasitic reflections (e.g., from the L3 lens) will be captured in the reflectance channel.
Optional: Step 20 can be performed during the 60-s break when the subject’s eyes are closed (point 16) to shorten the overall measurement time.
Part 2. Data processing
Timing: 1 h
Eye movement causes a significant problem in obtaining high-contrast fluorescence images through averaging. It occurs not only between the acquisitions of each frame but also within the collection of single-frame data. The following steps are performed to correct for eye movement before frame averaging. The averaging procedure with all related steps is done by a prepared MATLAB script. The scripts use the following toolboxes: Image Processing Toolbox, Parallel Computing Toolbox, Statistics, and Machine Learning Toolbox, and were tested on MATLAB versions released in 2021 and 2022.
Note: The processing time will differ depending on the computer’s specifications. For example, processing 130 frames take about 21 min on a personal computer with AMD Ryzen 9 3900×, 12-core processor, and 64GB of RAM.
-
21.Manually select the reference reflectance frame.
-
a.Inspect the recorded images.
-
b.Select one sufficient-quality frame from the inspected reflectance images.
-
a.
Note: A “sufficient-quality” frame contains an image with high-contrast blood vessels and no significant visible artifacts of vertical movement or eyelid presence that would cause missing data or repeated parts (due to vertical eye movement during the scan). Figure 7 shows such examples.
Figure 7.
Examples of reflectance frames with different qualities
(A and B) Reflectance frames that are not suitable for use as reference frames.
(C) Sufficient-quality reflectance frame.
Scale bars: 1 mm.
Note: In future versions of the method, it might be desirable to replace the manual selection of the reference frame with an automatic approach based on image metrics or neural networks. Such an automatization would make data processing more convenient and faster.
-
22.Calculate the background reflectance frame.
-
a.Load a set of reflectance background frames.
-
b.Compute the averaged background image using the MATLAB mean() function (Figure 8).
-
a.
-
23.Prepare the reflectance data.
-
a.Subtract the reflectance background image computed in 22(b) from all reflectance frames obtained during subject measurement.
-
b.Create a circular mask of radius R.Note: The mask radius and center are manually selected to cover approximately the full aperture. These values remain unchanged if there are no substantial changes in the imaging path, like changing the lenses; i.e., changing the FOV. During the processing of the presented images, the mask radius was set to R = 110 pixels.
-
c.For each reflectance image, normalize the intensity of the signal.
-
i.Compute the mean intensity inside the mask of radius R.
-
ii.Divide each pixel value by the computed mean.
-
i.
-
a.
-
24.
Apply Bi-Empirical Mode Decomposition (BEMD) to a normalized reference frame (selected in step 21(b)).
Note: BEMD is the extension of the 1D Empirical Mode Decomposition into a two-dimensional signal. These methods decompose the input signal into a few Intrinsic Mode Functions (IMFs) and a residue.6 To speed up the calculations, we used the FABEMD algorithm (Fast and Adaptive BEMD).5
-
25.
Extract the second IMF from the decomposed reference frame (Figure 9).
Note: For our reflectance images, the second IMF was used as it gave the best results. However, the other IMFs may be a better choice for different system configurations. The selection of the proper IMF allows for a decrease in the influence of elements that do not follow eye movement – aperture and the remaining part of the background. In addition, the high-frequency noise is also removed.
Figure 8.
Example of averaged reflectance background frame
Scale bars: 1 mm.
Figure 9.
Processing of reflectance frames
(A) Three different examples of normalized reflectance frames from an examined subject.
(B) Corresponding second IMFs computed using the FABEMD algorithm.
Scale bars: 1 mm.
From here, the procedure of frame alignment starts. All frames are aligned to the reference frame by comparing frame IMFs to the IMF of the reference frame. This procedure uses a three-stage alignment to obtain a set of image correction transforms that are later applied to both reflectance and fluorescence frames.
Note: In each step, the complexity of the applied correction is increased; hence, the computation time is increased. Moreover, one can decide to initially follow the algorithm with just a first step for a faster but less accurate initial view, and then perform the complete analysis to enhance the quality.
-
26.In the first alignment stage, perform the following operations for each acquired reflectance frame (excluding the reference frame):
-
a.Compute the BEMD of the processed reflectance frame and extract the second IMF.
-
b.Compute the 2D fast Fourier Transform (FFT) of the IMFs of both the reference and processed frames.Note: Do not shift the zero-frequency component to the center of the spectrum (do not apply the fftshift operation).
-
c.Calculate x and y shifts between the reference IMF and processed reflectance frame IMF using the dftregistration() function.
-
d.Apply computed shift corrections to all reflectance and corresponding fluorescence frames, using MATLAB’s built-in function imtranslate().
-
a.
-
27.In the second alignment step for each corrected reflectance frame, perform the following steps:
-
a.Create a frame copy and trim the image.Note: All image sides are trimmed to avoid image wrapping or spaces filled with zeros. For the data presented here, the trimming was set to 10 pixels on each side. The image trimming value was set based on observation of how the investigated subject’s eye position shifted in x-y directions during the measurements. For less stable subjects, an increase in trimming value might be required.
-
b.Compute the BEMD of the trimmed reflectance frame and extract the second IMF.Note: Instead of computing the BEMD for the translated reflectance frame, translation of the previously calculated IMF can be performed.
-
c.Use MATLAB’s built-in function imregtform() to compute the image affine transform between the trimmed reference IMF and the processed reflectance frame IMF.Note: The following parameters were used when employing the imregtform() function during the processing of images presented herein:[optimizer, metric] = imregconfig('multimodal');optimizer.InitialRadius = 0.0005;optimizer.Epsilon = 0.5e-4;optimizer.GrowthFactor = 1.01;optimizer.MaximumIterations = 10000;Method='affine';
-
d.Transform not-trimmed copies of the reflectance images and corresponding fluorescence frames using MATLAB’s built-in function imwarp().Note: For each frame set (reflectance and fluorescence), use the corresponding image transform and the following parameters:
-
a.
'OutputView' is set to imref2d(size(referenceFrame))
‘interp’ is set to ‘nearest’
We use the ‘nearest’ interpolation in this alignment stage and no upsampling in the previous step. We noticed that operations of subpixel alignment applied before the third stage led to some image artifacts (speckle-like patterns) in the final results.
-
28.In the third alignment step for each reflectance frame (other than a reference), perform the following steps:
-
a.Trim previously shifted and transformed reflectance and fluorescence frames.
-
b.Compute the BEMD of the trimmed reflectance frame and extract the second IMF.
-
c.Use MATLAB’s built-in function imregdemons() to compute the image transform maps containing each pixel shift in x and y directions between the trimmed reference IMF and the processed reflectance frame IMF.Note: The following parameters were used during the processing of the presented images:Number of iterations=5000;AccumulatedFieldSmoothing=3;PyramidLevels=5;
-
d.Finally, transform fluorescence and reflectance images trimmed in 28(a), using MATLAB’s function imwarp().After performing these steps, a set of aligned images is obtained. In the following steps, the alignment is verified, and frame averaging is performed.
-
a.
-
29.
Compute the BEMD of the reference reflectance frame and all aligned reflectance frames, extracting the second IMF.
-
30.
Compute the mean-squared error between the reference IMF and each warped IMF, using MATLAB’s function immse().
Note: For this calculation, we use only pixels inside the circular mask created in 23(b).
-
31.
For a set of threshold values, Th, compute a set of average reflectance frames and a set of average fluorescence frames. The output fluorescence frames for different threshold values (and different numbers of used frames Uf) are presented in Figure 10.
Note: For averaging, we select frames fulfilling the following condition:
immse(k)< trimmean([immse(1) ... immse(N)], 20)∗Th,
Figure 10.
Final fluorescence images were obtained for different threshold levels (Th) from Uf frames
(A–H) The Th values range from (A) 0.5 to (H) 1.9.
Scale bars: 1 mm.
where immse(k) represents the mean-squared error computed for frame k, and trimmean() computes the mean value of mean-squared errors for all processed frames after excluding 20% of outliners. The 20% value was selected manually. The following Th values were used during data processing: 0.5, 0.7, 0.9, 1.1, 1.3, 1.5, 1.7, and 1.9.
Note: The purpose of this step is to help with the manual selection of good-quality results. The threshold values can be modified freely as long as the output images are created from different sets of frames (from more similar images at low Th values to less similar ones at high Th values). In the future, a more advanced approach based on image metrics or neural networks might be used to automatically compute the best-quality output image.
Note: The 20% value was set manually to avoid using worst-quality frames (e.g., frames containing the closed eyelid) in the computation of average mean-squared error. The “<” means that the considered frame is used for averaging if its mean-squared error is smaller than the average mean-squared error (after the removal of outliners) multiplied by the Th value.
Note: The increase in intensity and contrast in Figure 10 comes from the increase in the number of used frames, which comes from the increase in threshold value. In datasets containing many low-quality frames, the contrast might decrease for high Th values as such low-quality frames might be used in the averaging process.
Expected outcomes
An expected outcome of this protocol is obtaining an informative two-photon autofluorescence image of the fundus of a healthy subject, and a corresponding reflectance image (Figure 11). During the execution of the above MATLAB script, the summary files containing the average intensities, mean-squared errors, and number (as well as indices) of used frames were saved into separate files. Also, separate files containing processed images in different formats (MATLAB files, MS Excel spreadsheets, and raster graphic files) were created.
Figure 11.
Representative outcome after image processing
(A) Two-photon fluorescence image obtained with 300 μW excitation power after averaging 118 frames.
(B) Reflectance image obtained with 300 μW excitation power after averaging 118 frames.
Scale bars: 1 mm.
Quantification and statistical analysis
The data from at least three independent experiments are presented as mean ± standard deviation (SD).
Figure 12 demonstrates typical signal levels recorded in two-photon excited fluorescence images (TPEF, after frame alignment), and noise (recorded after blocking the laser beam). The data were obtained from ten independent experiments with a healthy 45-year-old subject. Two 400–700 nm bandpass filters were placed in front of the PMT detector (we found that one filter is insufficient to completely block the backscattered excitation radiation). With 300 μW, 782-nm femtosecond laser light impinging on the eye cornea, we obtained a mean photon count per pixel of 89.9 × 10-3 (SD = 5.8 × 10-3) for fundus images. We compare this result with the instrument’s noise floor registered with a blocked laser beam; i.e., stray light and dark counts. The mean noise was equal to 4.4 × 10-3 pc/px (SD = 1.6 × 10-3).
Figure 12.

Mean photon count per pixel in two-photon fluorescence images of the fundus, and noise floor
Points show data from 10 independent experiments; the gray line and bracket depict the mean value ± 1 SD.
Limitations
This protocol might produce lower-quality results for subjects without a stable visual fixation. In such a case, significant shifts between the subsequent images would be introduced, making it more challenging to align the recorded images.
The protocol has not been tested yet on diseased subjects.
The lateral and axial resolution of TPEF-SLO is limited to 21-μm and 130-μm (FWHM), respectively,1 resulting from the optical performance of the human eye9 and a beam diameter of 3.0 mm (1/e2).
The TPEF images shown here were recorded using a spectral filter with a broad transmission band (400–700 nm, Thorlabs FESH0700) placed in front of the PMT detector. Using a narrower spectral filter is possible1; however, it would result in lower photon counts due to the narrower spectral band.
Troubleshooting
Problem 1
The obtained fluorescence image might be blurred without clearly visible, sharp outlines of the veins. This outcome results from different focusing conditions, presumably deeper in the RPE/choroid. Figure 13 shows how the obtained images look in such a case.
Figure 13.
Examples of images obtained in a case of suboptimal focusing of the laser beam on the retina
(A and B) (A) Fluorescence and (B) reflectance images were obtained after averaging 40 frames.
Scale bars: 1 mm.
Potential solution
Repeat step 10 by adjusting the position of lens L4 for correction of refraction error.
Note: Tunable lens could be helpful. However, commercially available tunable lenses currently have a clear aperture of <16 mm, and this parameter limits the achievable field of view in scanning systems. Here, we use a 1″ lens with a clear aperture of 22.9 mm. Using a tunable lens with smaller diameters would substantially limit the FOV of our system.
Problem 2
The obtained images might be cut on the edges and not positioned centrally within the FOV. This outcome results from suboptimal positioning of the subject’s eye with respect to the laser beam, including axial positioning (i.e., the pupil is not in the scanners’ conjugate plane). Figure 14 shows how the obtained images look in such a case.
Figure 14.
Examples of images obtained in a case of suboptimal eye positioning
(A and B) (A) Fluorescence and (B) reflectance images were obtained after averaging 82 frames.
Scale bars: 1 mm.
Potential solution
Part 1a should be repeated to position the imaged subject correctly with respect to the laser beam.
Problem 3
The imaged subject has a small pupil size.
Potential solution
An ophthalmologist could administer Tropicamide ophthalmic drops (before step 2 of subject positioning).
Resource availability
Lead contact
Further information and requests for resources and reagents should be directed to and will be fulfilled by the lead contact, Maciej Wojtkowski (mwojtkowski@ichf.edu.pl).
Materials availability
This study did not generate new unique reagents.
Acknowledgments
The International Centre for Translational Eye Research (MAB/2019/12) project is carried out within the International Research Agendas Programme of the Foundation for Polish Science co-financed by the European Union under the European Regional Development Fund. This work was partially supported by the Foundation for Polish Science within the First TEAM program co-financed by the European Union under the European Regional Development Fund (POIR.04.04.00-00-434D/17-00). This research was supported in part by grants from the NIH to K.P. (EY009339 and EY027283). The authors also acknowledge support from a Research to Prevent Blindness unrestricted grant to the Department of Ophthalmology, University of California, Irvine. K.K. acknowledges National Science Centre grant 2016/23/B/ST2/00752.
Author contributions
J.B., G.P., K.P., and M.W. designed the study. J.B., G.P., K.K., K.P., and M.W. designed experiments. J.B., M.D., S.T., J.M., K.K., G.P., and M.W. designed the protocol. S.T. wrote MATLAB data analysis scripts. J.B., J.M., and M.D. performed experiments on human subjects. J.B., G.P., S.T., M.D., K.K., K.P., and M.W. analyzed the data. K.P. and M.W. supervised the project. J.B., S.T., and M.D. wrote the manuscript, with contributions from all authors.
Declaration of interests
K.P. is the Chief Scientific Officer at Polgenix, Inc. The relationship with Polgenix, Inc. has been reviewed and approved by the University of California, Irvine, in accordance with its conflict of interest policies. K.P. is an inventor of U.S. patents 7,706,863 and 8,346,345, whose values may be affected by this publication. G.P. is an employee of Polgenix, Inc.
Contributor Information
Jakub Bogusławski, Email: jakub.boguslawski@pwr.edu.pl.
Maciej Wojtkowski, Email: mwojtkowski@ichf.edu.pl.
Data and code availability
Original data have been deposited to Mendeley Data: https://doi.org/10.17632/nhpnt78ssy.2. The software generated during this study is available at Mendeley Data: https://doi.org/10.17632/nhpnt78ssy.2.
References
- 1.Boguslawski J., Palczewska G., Tomczewski S., Milkiewicz J., Kasprzycki P., Stachowiak D., Komar K., Marzejon M.J., Sikorski B.L., Hudzikowski A., et al. In vivo imaging of the human eye using a 2-photon-excited fluorescence scanning laser ophthalmoscope. J. Clin. Invest. 2022;132 doi: 10.1172/JCI154218. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 2.Stachowiak D., Bogusławski J., Głuszek A., Łaszczych Z., Wojtkowski M., Soboń G. Frequency-doubled femtosecond Er-doped fiber laser for two-photon excited fluorescence imaging. Biomed. Opt Express. 2020;11:4431–4442. doi: 10.1364/BOE.396878. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 3.Palczewska G., Boguslawski J., Stremplewski P., Kornaszewski L., Zhang J., Dong Z., Liang X.-X., Gratton E., Vogel A., Wojtkowski M., Palczewski K. Noninvasive two-photon optical biopsy of retinal fluorophores. Proc. Natl. Acad. Sci. USA. 2020;117:22532–22543. doi: 10.1073/pnas.2007527117. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 4.Ferrand P. GPScan.VI: a general-purpose LabVIEW program for scanning imaging or any application requiring synchronous analog voltage generation and data acquisition. Comput. Phys. Commun. 2015;192:342–347. doi: 10.1016/j.cpc.2015.03.010. [DOI] [Google Scholar]
- 5.Wielgus M., Antoniewicz A., Bartyś M., Putz B. 2012 15th International Conference on Information Fusion. 2012. Fast and adaptive bidimensional empirical mode decomposition for the real-time video fusion; pp. 649–654. [Google Scholar]
- 6.Huang N.E., Shen Z., Long S.R., Wu M.C., Shih H.H., Zheng Q., Yen N.-C., Tung C.C., Liu H.H. The empirical mode decomposition and the Hilbert spectrum for nonlinear and non-stationary time series analysis. Proc. R. Soc. Lond. A. 1998;454:903–995. doi: 10.1098/rspa.1998.0193. [DOI] [Google Scholar]
- 7.Guizar M. Efficient subpixel image registration by cross-correlation. MATLAB Central File Exchange. 2023. https://www.mathworks.com/matlabcentral/fileexchange/18401-efficient-subpixel-image-registration-by-cross-correlation
- 8.Guizar-Sicairos M., Thurman S.T., Fienup J.R. Efficient subpixel image registration algorithms. Opt. Lett. 2008;33:156–158. doi: 10.1364/OL.33.000156. [DOI] [PubMed] [Google Scholar]
- 9.Donnelly W.J., Roorda A. Optimal pupil size in the human eye for axial resolution. J. Opt. Soc. Am. Opt Image Sci. Vis. 2003;20:2010–2015. doi: 10.1364/JOSAA.20.002010. [DOI] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Data Availability Statement
Original data have been deposited to Mendeley Data: https://doi.org/10.17632/nhpnt78ssy.2. The software generated during this study is available at Mendeley Data: https://doi.org/10.17632/nhpnt78ssy.2.


Timing: 1 day










