Ethical approvalĀ 

All experiments in this study were conducted in full compliance with ARRIVE guidelines. Ethical approval was granted by the Laboratory Animal Management and Ethics Committee of the Shanghai Clinical Centre for Public Health (No. 2022-A009-01). All experiments in this study were conducted in full compliance with the relevant provisions of the Institutional Animal Care and Use Committee (IACUC) guidelines.

Experimental animals

Fourteen healthy male and female guinea pigs from Danyang City Yichang Laboratory Animal Co. Ltd (SCXK 2021-0002) were housed in a 12Ā h light/12Ā h dark cycle. All animals underwent slit-lamp (YZ3, 66 Vision-Tech, China) examinations, and no clinically observable ocular surface diseases were detected. All guinea pigs were euthanized by intraperitoneal injection of an overdose of sodium pentobarbital.

Experimental procedure

Every two weeks, pupil size, corneal size, and eccentricity were measured in all guinea pigs until they reached 12 weeks of age. In addition, the left eyes of guinea pigs were exposed to light intensities of 100Ā lx, 250Ā lx, and 500Ā lx, and the pupillary responses of 2-week-old and 12-week-old guinea pigs to different light intensities were observed. All measurements were performed between 9:00 and 11:00 AM. For each guinea pig, only the left eye was measured. During each measurement, ensure that the guinea pig’s pupil and corneal limbus are fully exposed. All measurements were made under a 50Ā lx lighting condition to minimize the effect of light on pupil size, with a light meter (DLY-1801Ā C, DELIXI, China) used to measure the illumination level at the guinea pig’s eye level. After completing the in vivo measurements of the guinea pig eyeballs, the guinea pigs were euthanized with sodium pentobarbital, and the eyeballs were carefully removed and the surrounding fascial and muscular tissues were cleared to ensure that the eyeballs were not punctured in a way that would alter their morphology. The eyeballs were then placed at the center of the platform, and a top-down camera (T201, NETUM, China) was used to capture images of the coronal eye contour to measure the biological parameters of the guinea pig eyes in vitro.

Data measurement

In previous studies, we developed a method for biometric measurement of experimental animal eyes in vitro, utilizing Python 3.9 programming software27 and a camera. We wrote the code in PyCharm Community Edition 2021.1.3 × 64 (Fig.Ā 2A), and imported the Tkinter module to create a graphical user interface (GUI) window (Fig.Ā 2B). The program was packaged into an executable external file along with an installation module to enable visual human-computer interaction. This program was specifically designed for small animal eye measurements and includes features such as image import, line color and thickness customization, conversion coefficient calculation, temporary recording modules, manual point selection for edge coordinates, and curve fitting modules. Finally, the operator can export the generated images’ scale using a designated button to facilitate the calculation of large datasets.

The guinea pig was placed on a specially designed fixture, and gentle handling was applied to keep the animal calm. High-definition cameras (13Pro Max, iPhone, US) were used to capture clear and steady images of the guinea pig’s eyes (Fig.Ā 5B). Colorful objects and sounds were used to direct the guinea pig’s gaze to the left or right, and images were taken when the eye movement was most pronounced, ensuring that both the pupil and corneal edges were subjectively identified. A scale with actual distance reference was fixed in the same plane, and both the left and right eyes were photographed. The images were then input into the compiled program, and the matrix plot module was used to open the image (code: image = Image.open(path + pic, ā€˜r’)). This process ensured that each point in the image corresponds to a two-dimensional coordinate (x, y).

Fig. 5figure 5

Measurement of guinea pig eye parameters using edge detection, curve fitting and pixel-to-actual distance conversion. (A) Photographs of guinea pigs at specific thresholds by edge detection technique. (B) Non-contact measurement of pupil size and corneal size in guinea pigs using a curve-fitting technique. Yellow circles are fitted guinea pig pupil and corneal contours. (C) Conic curve fitting to measure guinea pig pupil and corneal eccentricity. The yellow ellipse is the fitted pupil and cornea, and the red lines are the long and short axes of the fitted ellipse. (D) By taking repeated segments on the scale and calculating the average, an accurate conversion factor can be obtained. For example, the conversion factor was calculated to be 0.0193 for the red line, 0.0191 for the green line, 0.0192 for the yellow line, and the final conversion factor was taken as the average of the three, 0.0192.

Pixel-actual distance conversion method

The captured image was imported into Python programming software. The imported image corresponds to a 2D coordinate system with horizontal and vertical coordinates of the pixel length and width values of the image, with each point having a corresponding pixel-valued coordinate. The coordinates in the two-dimensional image are obtained using the ā€œginputā€ function. Using geometric principles (Formula: Lmn=\(\:\sqrt{{(\text{m}1-\text{m}2)}^{2}+{(\text{n}1-\text{n}2)}^{2}}\)), the distance between any two points in the coordinate system, (m1, n1) and (m2, n2), can be calculated. After obtaining the corresponding pixel values for the actual distance in the central region, the actual distance between any two points in the image can be derived through conversion. By repeatedly selecting points on the scale and calculating the average, an accurate conversion factor can be obtained (Fig.Ā 5D).

Eyeballs edge data acquisition

The Canny edge detection algorithm was used to obtain a double thresholded image (Fig.Ā 5A). Points with sharp changes in image brightness were organized into a set of curved segments called edges. The non-target edges are removed and only the eye edges are retained. The image is saved. Use the find Contours function to get information about the coordinates of this edge. When edge detection is not effective, coordinates can also be obtained by manually taking points on the target contour. The data is then saved in a.txt file.

Circle fitting to calculate pupil and corneal size

Assuming that the center of the pupil or cornea forms a circle, circle fitting is applied (Fig.Ā 5B). By using the conversion factor, the actual diameter of the circle can be obtained, which further allows for the calculation of the pupil and corneal area, as reported in previous studies12.

Ellipse fitting fit calculates eccentricity

The pupil and corneal contour resembled an inclined elliptical shape (Fig.Ā 5C). This shape fits well to the conic equation (Ax² + Bxy + Cy² + Dx + Ey + F = 0). Based on the geometry and the least squares principle, the eccentricity of the cornea can then be calculated.

Measurement of guinea pig pupil and corneal size using the Auto Refractometer

The guinea pig was tranquilized, kept quiet and fixed in the detection position of the Auto Refractometer (KR-800, Topcon, Japan). Another operator operates the Auto Refractometer and switches the instrument mode to pupil mode. The parameters and position of the instrument were adjusted so that the image of the guinea pig’s eye was centered in the viewfinder frame, and then photographed after the image had reached its clearest state. After taking the picture, the measuring scale in the image is carefully aligned with the edge of the guinea pig’s pupil or cornea, and then the Auto Refractometer will automatically measure the size of the guinea pig’s pupil or cornea.

Measurement of guinea pig pupil and corneal size using OCT

The guinea pigs were tranquilized by an operator, kept quiet, and immobilized in the detection position of the OCT device (YG-20Ā W MAX, TowardPi, China). Ensure that it does not move during the inspection process to maintain the stability of the inspection environment. The other operator operates the OCT device, sets the detection mode to anterior segment mode, and installs the anterior segment adapter. The parameters of the device are adjusted so that the guinea pig eye image is centered and in high definition. Images in which the guinea pig pupil and corneal structures were fully exposed were defined as standard images. After image acquisition, the corneal limbus (corneo-scleral transition zone), the pupil margin, and the geometric center were marked manually using the accompanying analysis software, and the values of each parameter were calculated. To ensure the reliability of the data, each measurement was repeated three times by two independent operators, and the mean values were taken for subsequent analysis.

Statistical analysis

The data were imported into Python 3.9 for statistical analysis and graphing. All data in this study, unless otherwise stated, are mean ± standard deviation. ANOVA was used to compare pupil size at different light intensities, and paired-samples t-tests were used to compare differences between Python and OCT measurements. Differences between any two parameters were defined as significant at p < 0.05 and highly significant at p < 0.001.