-
Notifications
You must be signed in to change notification settings - Fork 12
3. Hardware, Image Parameters and Common Issues
As a general principle, any USB camera can be used for pupillometry with MEYE. However, not all cameras can capture images of the eye with the appropriate resolution and distance, as this depends on the objective attached to the camera. We prefer M12 USB cameras because they are cost-effective and can be used on different setups by simply changing the objective. Alternatively, a varifocal lens can be used to adjust focus, zoom, and aperture as needed. For mice, we use a 22 mm lens, while for humans, we use a varifocal lens. Higher resolution cameras have less strict lens requirements since the eye is composed of a greater number of pixels than lower resolution cameras. We recommend zooming in until the eye occupies at least a 128x128 pixel square. We mount cameras on manual micrometric manipulators to allow for accurate adjustments between subjects. There are also numerous other suitable solutions available.
The most crucial factor for achieving optimal performance is using appropriate illumination. There are numerous methods for illuminating the eye effectively with infrared light. Currently, we use only IR-LEDs because they provide stable, powerful, and invisible light.
Infrared light illuminators typically use two different kinds of LED:
- 850nm This is the most commonly used wavelength in CCTV applications, and the majority of cameras perform well with this kind of illuminator. However, these LEDs produce a faint red glow in the visible spectrum, which can interfere with certain experiments. Even non-night vision cameras have some degree of sensitivity to this wavelength, particularly after the removal of IR-cut filters. We use these LEDs in almost all of our experiments.
- 940nm These LEDs emit no detectable visible light, but not all cameras can detect this wavelength. Therefore, before purchasing a 940nm illuminator, make sure that your camera is suitable for these wavelengths. We use these LEDs only in experiments where subjects wear VR headsets.
Regardless of the wavelength used, sufficient light is critical to obtaining stable and reliable performance. This can be achieved by tuning both the exposure time and LED power. In general, we prefer to adjust image exposure instead of modulating light power.
Another factor that can lead to better results is using LED matrices. This is because small light sources tend to produce a powerful corneal glint on the eye, which can sometimes interfere with pupil detection. While we have trained our CNN to ignore glints, artifacts can still occur due to reflections. Therefore, we recommend keeping the glint away from the pupil whenever possible.
When conducting pupillometry on humans, we recommend using chinrests to stabilize the head. While it is possible to perform pupillometry on non-head-fixed subjects in principle, it is generally best practice to use chinrests for greater accuracy and consistency. Fortunately, there are many affordable solutions available, such as this open-source chinrest or this headspot from the University of Houston.
We tested USB M12 lens near-infrared (850nm and 940nm) webcams. These webcams are really cheap and can be found easily online. The setup used in humans is composed of:
- USB Camera (Remove or cover the light sensor on this camera to keep active the IR LEDs)
- Varifocal Objective
- IR Light Source
- (OPTIONAL) Power Supply for IR Light
- (OPTIONAL) camera tripod.
For stable recordings use a head fixation system like one of these:
- Chin rest on humans
- Head fixation system on mouse
This issue is given most probably by the non-sufficient illumination of the eye. One possible solution is to adjust the illumination of the eye or the exposure of the camera. If this is not possible we suggest using the image enhancement tools, modulating luminance, contrast, and gamma. In 2-photon experiments try to invert the image colours. If this is not possible or does not resolve the problem, you can try to change the prediction threshold. This tool can be found on the left side of the GUI, under the PREDICTION menu (see below).
This is a common issue that we resolved using mathematical morphology. If you experience this issue, try enabling the checkbox "morphology" and/or adjusting the threshold. These tools can be found on the left side of the GUI, under the PREDICTION menu.
For now, there is no way to perform offline pupillometry on .avi files using the web app. This is due to HTML5 programming policies and does not depends on us. There are two possible workarounds for this problem:
- Using the Python 3 Jupyter Notebook for offline pupillometry: pupillometryOfflineVideos.ipynb.
- Converting the .avi file to another HTML5 supported format.
It is necessary to ensure enough amount of RAM dedicated to MEYE (at least 8GB). The first piece of advice is to close all other tabs and applications before running any experiment. You have to be careful with the use of background processes such as antivirus etc, etc
Real-time Plots heavily influence frame rate and frame stability. The number of points in the plot will increase over time heavily affecting computer RAM & performances. This means a continuous frame drop over time. To overcome this issue you should enable the Show only option, which allows plotting only a stable number of points per frame. This mode will affect the maximum framerate, but the frame rate will be stable.
DeFocusing pupillometry.it page will stop MEYE for security reasons. The advice is to keep MEYE focused and run experiments on another computer. In case you need to sync stimulation with pupillometry, you can use Triggers.
If you experience other issues, please feel free to contact us. We would be happy to help you.