Potemkin V.V.1, 2, Prokopchuk V.S.3, Astakhov S.Yu.1, Andreev D.A.4
1 Federal State Budgetary Educational Institution of Higher Education “Academician I.P. Pavlov First St. Petersburg State Medical University” of the Ministry of Health of the Russian Federation, 6-8 Lva Tolstogo St., St. Petersburg, 197022, Russia
2 St. Petersburg State Budgetary Healthcare Institution “City Multidisciplinary Hospital No. 2”, 5 Uchebny Pereulok, St. Petersburg, 194354, Russia
3 Federal State Budgetary Educational Institution of Higher Education “Saint Petersburg State University”, N.I. Pirogov Clinic of High Medical Technologies, 154 Fontanka River Embankment, St. Petersburg, 190103, Russia
4 Hamburg University of Technology, Am Schwarzenberg-Campus 1, 21073 Hamburg, Germany
Brief summary
Accurate assessment of corneal defect area is important for selecting treatment strategy and objectively monitoring epithelial healing. Measurement of longitudinal and transverse dimensions during slit-lamp examination is insufficiently accurate for irregularly shaped defects, whereas existing computer-assisted methods require third-party software skills and additional calculations.
Aim. To develop specialized software for automated calculation of the relative area of corneal defects.
Materials and Methods. The software was developed in Python 3.10. Tkinter was used for the graphical interface, and OpenCV and NumPy were used for image processing and mathematical calculations. The user marks the corneal and defect boundaries on a digital photograph; the program then calculates polygon areas using the shoelace formula and determines the defect-to-cornea area ratio as a percentage.
Results. The software was demonstrated in a clinical case of a patient with a persistent corneal ulcer associated with neurotrophic keratopathy. Before surgery, the relative defect area was 28.04%; after one week it decreased to 5.84%, and after two weeks, with complete epithelialization, it was 0%. The calculations were performed automatically from sequential photographs.
Conclusion. The application provides automated determination of the relative corneal defect area and requires no manual calculations after contour marking. Its use requires digital anterior segment photography and a computer. The software may be used for objective monitoring of defect dynamics and assessment of treatment outcomes.
1. Kasparova E.A., Kasparov A.A., Amir M.P., i dr. Recidiviryushaya eroziya rogovici. Kataraktalnaya i refrakcionnaya hiryrgiya. 2010;(1):51-53.
2. Sevostyanov A.E., Sokolov V.A., Mnihovich M.V., i dr. Sravnenie effektivnosti epiteliziryushih veshestv pri eksperimentalnom ojoge rogovici. Rossiiskii mediko-biologicheskii vestnik imeni akademika I.P. Pavlova. 2011;19(3):110-113. doi:10.17816/PAVLOVJ20113110-113.
3. Bojenko D.A., Chencova E.V. Predvaritelnoe klinicheskoe issledovanie novogo metoda lecheniya ojogovih defektov rogovici. Sovremennie tehnologii v oftalmologii. 2022;(3(43)):62-65. doi:10.25276/2312-4911-2022-3-62-65.
4. Maichyk D.U., Loshkareva A.O. Osobennosti terapii pacientov s sindromom syhogo glaza, v tom chisle s narysheniem epitelizacii rogovici. Oftalmologiya. 2019;16(4):529-536. doi:10.18008/1816-5095-2019-4-529-536.
5. Gololobov V.G., Gaivoronskii I.V., Deev R.V., i dr. Reparativnaya regeneraciya mnogosloinogo epiteliya rogovici: biotehnologicheskii potencial. Geni i kletki. 2008;3(4):55-59.
6. Toutain-Kidd CM, Porco TC, Kidd EM, et al. Evaluation of fungal keratitis using a newly developed computer program, Optscore, for grading digital corneal photographs. Ophthalmic Epidemiology. 2014;21(1):24-32. doi:10.3109/09286586.2013.868003.
10. Stephenson P. The shoelace formula & Pick’s theorem. Mathematics in School. 2018;47(4):35-38.
11. Lee Y, Lim W. Shoelace formula: connecting the area of a polygon and vector cross product. The Mathematics Teacher. 2017;110(8):631-636. doi:10.5951/mathteacher.110.8.0631.