EYE HEALTH DIAGNOSTIC GROUP'S PUPIL DETECTOR (ehdg_pupil_detector)
This is the python package libray pupil detector created by eye health diagnostic group.
Installtion
pip install ehdg_pupil_detector
Updating
pip install ehdg_pupil_detector -U
Class Initialization and Attributes
Class Initialization with defaults
from ehdg_pupil_detector import ehdg_pupil_detector
detector = ehdg_pupil_detector.Detector()
If you do not specify any argument, it will use default vales are as follows:
- config
Default = None
If it is None then it will use following config parameters:- min_circular_ratio = 0.9
- max_circular_ratio = 1.9
- ksize_height = 13
- ksize_width = 13
- min_binary_threshold = 20
- max_binary_threshold = 255
- reflection_fill_dilation_index = 25
- reflection_fill_square_dimension = 200
- reflection_fill_color_index
Default = 0 (black)
0 means black and 255 means white in the gray scale.
It will cover the reflection on the pupil with black before using any other filters. - gaussian_blur
Default = True
It will use gaussian blur filter. - binary_fill_hole
Default = True
It will use binary fill hole function filter.
Class Initialization with custom values
from ehdg_pupil_detector import ehdg_pupil_detector
custom_config = {
"min_circular_ratio": 0.9,
"max_circular_ratio": 1.9,
"ksize_height": 13,
"ksize_width": 13,
"min_binary_threshold": 20,
"max_binary_threshold": 255,
"reflection_fill_dilation_index": 25,
"reflection_fill_square_dimension": 200
}
detector = ehdg_pupil_detector.Detector(config=custom_config, reflection_fill_color_index=0, gaussian_blur=True,
binary_fill_hole=True)
The reflection_fill_color_index must be between 0 and 255.
It is indexing how black or white gonna cover on the reflection of the pupil.
0 index is blackest and 255 index is whitest.
If you wanna turn off reflection fill function, add
reflection_fill_color_index=False
instead of
reflection_fill_color_index=0
Class Function
get_config_info()
It is to check the current config information.
from src.ehdg_pupil_detector import ehdg_pupil_detector
custom_config = {
"min_circular_ratio": 0.9,
"max_circular_ratio": 1.9,
"ksize_height": 13,
"ksize_width": 13,
"min_binary_threshold": 20,
"max_binary_threshold": 255,
"reflection_fill_dilation_index": 25,
"reflection_fill_square_dimension": 200
}
detector = ehdg_pupil_detector.Detector(config=custom_config, reflection_fill_color_index=0, gaussian_blur=True,
binary_fill_hole=True)
for info in detector.get_config_info():
print(f"{info}: {detector.get_config_info()[info]}")
Output will be:
min_circular_ratio: 0.9
max_circular_ratio: 1.9
ksize_height: 13
ksize_width: 13
min_binary_threshold: 20
max_binary_threshold: 255
reflection_fill_dilation_index: 25
reflection_fill_square_dimension: 200
Metadata
Release files for ehdg-pupil-detector 4.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ehdg_pupil_detector-4.0.4.tar.gz | 173.6 kB | Without provenance | Details for ehdg_pupil_detector-4.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ehdg_pupil_detector-4.0.4-py3-none-any.whl | Python 3 | none | any | Details for ehdg_pupil_detector-4.0.4-py3-none-any.whl |
Total release size: 349.6 kB
Release files / ehdg_pupil_detector-4.0.4.tar.gz
| Download URL | ehdg_pupil_detector-4.0.4.tar.gz |
|---|---|
| Size | 173.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
97f15f47dbb6f51597c9f19be51db59530ab35bdca765877d74f8cda866d6a72
|
|
BLAKE2b-256 checksum How to use checksums |
3e4a9c05a0992c2720bdc01bafc5861b093a120683024fe3beef214ddbef9f0d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.7
|
Release files / ehdg_pupil_detector-4.0.4-py3-none-any.whl
| Download URL | ehdg_pupil_detector-4.0.4-py3-none-any.whl |
|---|---|
| Size | 176.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3ccceeb0e19e492e176067fdec9832cd9cfc81e668ae41d798831e0ebffaa653
|
|
BLAKE2b-256 checksum How to use checksums |
607fcd81a95f32c666b9d3db7d33221bfecd96fa3396bdd69bfe7c34ea0828e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.7
|
Security for ehdg-pupil-detector 4.0.4
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.