Skip to main content

Python Library for Pupil Detector of Eye Health Diagnostic Group

Project description

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:

  1. config
    Default = None
    If it is None then it will use following config parameters:
    1. min_circular_ratio = 0.9
    2. max_circular_ratio = 1.9
    3. ksize_height = 13
    4. ksize_width = 13
    5. min_binary_threshold = 20
    6. max_binary_threshold = 255
    7. reflection_fill_dilation_index = 25
    8. reflection_fill_square_dimension = 200
  2. 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.
  3. gaussian_blur
    Default = True
    It will use gaussian blur filter.
  4. 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ehdg_pupil_detector-3.4.1.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

ehdg_pupil_detector-3.4.1-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file ehdg_pupil_detector-3.4.1.tar.gz.

File metadata

  • Download URL: ehdg_pupil_detector-3.4.1.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.7

File hashes

Hashes for ehdg_pupil_detector-3.4.1.tar.gz
Algorithm Hash digest
SHA256 0b3450660b402baf8adbada3df296b25b2ea710298a155bceab3f5887068ff32
MD5 e979d6bfb8c51524afea2f32310257c1
BLAKE2b-256 952374b6a05ad01cbf3deaf9b1fe960ea9a93de88e5f563a2c3c9aca6c69a2ea

See more details on using hashes here.

File details

Details for the file ehdg_pupil_detector-3.4.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ehdg_pupil_detector-3.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 007538b269b85c94908a4b584ae173edd7b4df248d629af1749f089997def5d3
MD5 d10eace3dc3b3bcf0edd4fdc2009e4ec
BLAKE2b-256 04db8e6252a3bbf779b634bd1e66300455e1e0cb9d6d03b99a2bc25fe3a68cf1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page