Related Experiment Video
Updated: Sep 11, 2025

Pupillometry to Assess Auditory Sensation in Guinea Pigs
Published on: January 6, 2023
Digital measurement of pupil size, corneal size, and eccentricity in Guinea pigs using python compared with
Hao Wu1, Zhongbao Qiao1, Chi Cheng1
1School of Medicine, Department of Ophthalmology, Shanghai Children' s Hospital, Shanghai Jiao Tong University city, Shanghai, 200062, China.
None:
To develop a Python-based digital technique for accurate measurement of pupil size, corneal size, and eccentricity in guinea pigs, and to validate its efficiency and accuracy against traditional OCT methods in ophthalmology research.
Methods:
Fourteen healthy guinea pigs were selected, and the eye images were captured using a camera, and the image analysis program was written by Python 3.9. The program integrated edge detection (Canny algorithm), curve fitting (conic curve equation) and pixel-actual distance conversion modules, and designed a graphical user interface (GUI) to visualize the operation. Measured parameters included pupil size, corneal size and eccentricity to compare the difference between in vivo and ex vivo measurements and to verify the accuracy of the method.
Results:
The Python program clearly identified the guinea pig pupil and corneal limbus, and the fitted curves were in high agreement with the actual contours. Pupil and corneal size measured with an accuracy of 0.01 mm. In vivo and in vitro measurements showed that pupil size increased significantly after ex vivo (p < 0.001), whereas there was no significant difference in eccentricity (p = 0.38). Compared to optical coherence tomography (OCT), the method did not differ significantly in accuracy (p > 0.05), but significantly improved efficiency and reduced reliance on specialized equipment.
Conclusion:
The Python-based digital measurement technique can effectively and accurately quantify the morphological parameters of the guinea pig eye, providing reliable technical support for non-contact measurements in experimental animals.

