Skip to main content

PARaxial Optical fundus Scaling (PAROS)

Paros is a method to calculate the magnification of fundus images based on the optical characteristics of the patient's eye. The full method and validation are described in Pors LJ, Haasjes C, van Vught L, et al. Correction Method for Optical Scaling of Fundoscopy Images: Development, Validation, and First Implementation. Invest Ophthalmol Vis Sci. 2024;65(1):43. doi:10.1167/iovs.65.1.43

License

The code is provided as is, without any warranty, under the MIT license. This license requires users to acknowledge the original creator. It permits others to share, modify, adapt, and build upon the material in any medium or format, as long as the copyright notice and license are included in all copies or substantial portions of the software.

If you used this code for your research, please cite the original article mentioned above.

Basic usage

Try it online

A basic version of PAROS can most easily be run online here: basic version

Try PAROS online

Install the library

The full package is also available on PyPI:

pip install PAROS

PAROS has two main functions:

  1. Calibration of fundus cameras using eye phantom measurements. This application is demonstrated in the fundus_camera_calibration.ipynb notebook.
  2. Calculation of ocular magnification of fundus images. This application is demonstrated in the calculate_ocular_magnification.ipynb notebook.

Implementation

The implementation of PAROS in this repository is functional for the camera in our center, and with the specific software used at our center. Both have impact on the calculated magnification. We therefore recommend calibration of the camera and software using the method described in the article mentioned below before implementation for quantitative purposes.

Eye model

PAROS' eye model is based on the Escudero-Sanz and Navarro wide-angle schematic eye1. Since PAROS is a paraxial method, asphericities and retinal shapes are not taken into account.

Camera models

PAROS defines three camera models: a simplified paraxial model, a telecentric model and a focus-dependent model.

Paraxial model

The paraxial model is the model used for the original implementation of PAROS described in the article mentioned above. This model works well for some classical fundus cameras, but appears to be unreliable for some other cameras, especially for cameras with a telecentric design. Since the original publication, PAROS has been extended with a telecentric model as well.

The table below lists known camera calibration constants; this can be added upon by other contributors.

Camera type CCD type Condenser lens power [D] First order calibration term Pixel density [px/mm]
Topcon TRC-50DX 37.6 0.03481 100
Topcon TRC-50IX 37.7 0.03226 100

Telecentric model

The telecentric design of a fundus camera results in a linear relationship between the eccentricity of the incoming ray and the corresponding position on the sensor. A telecentric camera maps the angle $\theta$ of an incoming chief ray linearly to a position on the sensor $x = k \theta$, with a scaling factor $k$ [px/rad] that does not change with focus. The telecentric camera model uses this relation to calculate the magnification from ray angles. The derivation of the magnification for a telecentric camera is described in docs/telecentric-camera.md.

Focus-dependent model

The focus-dependent model is an extension of the telecentric model that takes into account the effect of focus on the magnification. This model maps a chief ray angle $\theta$ to a position on the sensor $x = (k + \alpha SE) \theta$, with $k$ the scaling factor [px/rad] at emmetropia, $SE$ the spherical equivalent of the eye and $\alpha$ the linear dependence of the scaling factor on the spherical equivalent. Since the angular magnification of this camera model depends on the focus, the camera is not telecentric in the strict sense.

Referencing

When publishing results obtained with this package, please cite the paper that describes the full method and validation: Pors LJ, Haasjes C, van Vught L, et al. Correction Method for Optical Scaling of Fundoscopy Images: Development, Validation, and First Implementation. Invest Ophthalmol Vis Sci. 2024;65(1):43. doi:10.1167/iovs.65.1.43

Contributing

Please read our contribution guidelines prior to opening a Pull Request.

Contact

Feel free to contact us for any inquiries:

  • J.W.M. Beenakker (email)

Or visit our website to discover our more of our research.

  1. Escudero-Sanz, I., & Navarro, R. (1999). Off-axis aberrations of a wide-angle schematic eye model. JOSA A, 16(8), 1881–1891. https://doi.org/10.1364/JOSAA.16.001881 ↩

Metadata

Release files for PAROS 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PAROS 2.1.0
File Size Uploaded Provenance Actions
paros-2.1.0.tar.gz 215.5 kB Without provenance Details for paros-2.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for PAROS 2.1.0
File Interpreter ABI Platform Actions
paros-2.1.0-py3-none-any.whl Python 3 none any Details for paros-2.1.0-py3-none-any.whl

Total release size: 233.2 kB

Release files / paros-2.1.0.tar.gz

Download URL paros-2.1.0.tar.gz
Size 215.5 kB
Tags Source
SHA-256 checksum
How to use checksums
3478aa71ffa5c4858344ef920cd0247b1a052e22b273ba591befed0fb135b3a2
BLAKE2b-256 checksum
How to use checksums
cb2a27df3f0f1c94b26507859e7f8c74dbba1bdd1f7e571fdede1a153f1a6fee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / paros-2.1.0-py3-none-any.whl

Download URL paros-2.1.0-py3-none-any.whl
Size 17.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
314ff3a06be0f38ffb3f868a8229cad3a71634feaa416b0037b3db139b94a2ef
BLAKE2b-256 checksum
How to use checksums
8d9edb0c9e3f91e2a1e23e31059e966d6f0ab09a01e44bfd2405bf3f5f8dfc36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for PAROS 2.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page