Pupil Labs 2D Pupil Detector
Project description
pupil-detectors
This Python package contains the standalone 2D pupil detectors for the [Pupil-Labs](https://pupil-labs.com/) software stack.
Install via PyPI
pip install pupil-detectors
Usage
Here’s a quick example on how to detect and draw an ellipse.
import cv2
from pupil_detectors import Detector2D
detector = Detector2D()
# read image as numpy array from somewhere, e.g. here from a file
img = cv2.imread("pupil.png")
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
result = detector.detect(gray)
ellipse = result["ellipse"]
# draw the ellipse outline onto the input image
# note that cv2.ellipse() cannot deal with float values
# also it expects the axes to be semi-axes (half the size)
cv2.ellipse(
img,
tuple(int(v) for v in ellipse["center"]),
tuple(int(v / 2) for v in ellipse["axes"]),
ellipse["angle"],
0, 360, # start/end angle for drawing
(0, 0, 255) # color (BGR): red
)
cv2.imshow("Image", img)
cv2.waitKey(0)
Developers
Building from Source
Installing the dependencies
macOS: brew install eigen opencv
Windows: choco install eigen opencv
Ubuntu: apt-get install libeigen3-dev libeigen3-dev
Building the Python package
# Clone repository
git clone git@github.com:pupil-labs/pupil-detectors.git
cd pupil-detectors
# Install from source with development extras
pip install .
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pupil_detectors-2.0.2rc2.tar.gz
(69.8 kB
view hashes)
Built Distributions
Close
Hashes for pupil_detectors-2.0.2rc2-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3aebdabea50dc63e110d298a2791030c9af28a82f81ff8151479208608a9e99a |
|
MD5 | 49059c552ed48fe135b0d21a42b8d663 |
|
BLAKE2b-256 | 775e6b801d017606fa4b26ad84ff3bc9a54a893c87da77b394f379300cd690ca |
Close
Hashes for pupil_detectors-2.0.2rc2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7156b70615b49412f0556e412644d61ac2892bea7bb90c5b0a188f978b32b5af |
|
MD5 | fd78e75df43423a03d181b90853031cb |
|
BLAKE2b-256 | 33ed07b7d221fde9901cbc29d30f17b611d86e13d75cf52f63e86c2d1080bfbf |
Close
Hashes for pupil_detectors-2.0.2rc2-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5cf501d652ba30d741d5fdcd024764b2e7dbc279d6cbf5bfab3fdcd5f365216e |
|
MD5 | 4ed1d8a7a826b7812ecc09347dc4a070 |
|
BLAKE2b-256 | f35a67bb3e82b5a7c753a92edc1d6c14ca0331f335672bfd09e3e25122d52544 |
Close
Hashes for pupil_detectors-2.0.2rc2-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc867699637c06a24f17d0a78784a723a0d8fffd6d5bd4a37034fcec5e4a923f |
|
MD5 | f2789a2ce1e67402d26c99d9abdc99b3 |
|
BLAKE2b-256 | 559ff7c96ce0ea5269afc79fbad7ec78887a7c93520590595afdd128af8d636b |
Close
Hashes for pupil_detectors-2.0.2rc2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d91820bf3f0c471a0d959074f8dd2b8ba85f7122f90ee886185c954720dd4347 |
|
MD5 | 54f5549e97886dbe4139da954169630c |
|
BLAKE2b-256 | 86000c66c883df51733c3f254e414dab24266686edbb22b04f507239ad2e7e03 |
Close
Hashes for pupil_detectors-2.0.2rc2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e61d3f0db823358a5efe4f52af374836caaedc034d1721ed4c864a5fce1fe165 |
|
MD5 | 357f0f053a92eddb8f28591c567be4e8 |
|
BLAKE2b-256 | e6cb77f2bf36151789c03a454459d41c7ac6c1406834759e5c158c9a0433a6c1 |
Close
Hashes for pupil_detectors-2.0.2rc2-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | adbe42b779ba66770a0c9ac5342ee030f5e5c888462a40adbd85d68838d473ec |
|
MD5 | 2f2d40bb38133a5a21c0631bbddb4b44 |
|
BLAKE2b-256 | 96279ae87e174ecc67c910b594bcb830aed7ee7957cc153f6cf407cbe782b7f5 |
Close
Hashes for pupil_detectors-2.0.2rc2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25e4ca84b0d932749dc40cda23869c7f22ceaa96a73b2b863922bf3183e8b279 |
|
MD5 | 8288c9c8b47ce049ced16e638ac6f97d |
|
BLAKE2b-256 | fa60a04213feb8c612e4a0d521ac6dc483c7046564649ad60e68d34e77bc8217 |
Close
Hashes for pupil_detectors-2.0.2rc2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2906e17939bec893227e5e145f1b86003709ea0de96f4a0c26847d814656de5f |
|
MD5 | ddc1c02edd11abb2c508b6398785e9e8 |
|
BLAKE2b-256 | 6e5af4befe67f035f835332519c27147b5eeea0dfb7e040ceb517b2e37742e73 |
Close
Hashes for pupil_detectors-2.0.2rc2-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0716cb6467d3b62bd0b18332dc2fb28e8cf0bbaccc6eb9503e5deb67dc2d898e |
|
MD5 | 778b1732db0f6de4943df96f39f4ea7c |
|
BLAKE2b-256 | 1071a1f96e80e8b6ffea2f5fd8f55b6d5c93b22e207281c5baa9f57334788402 |
Close
Hashes for pupil_detectors-2.0.2rc2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95e0087487f4e8ccd3bf00a9718d498772985e3c153882e9626badc3eae5e713 |
|
MD5 | e30ba87074474bf58e20aa492087f558 |
|
BLAKE2b-256 | f9ae9f419a6a73d65c3da0ca00ec662478cb173c340fa022e91e612bf84bcb36 |
Close
Hashes for pupil_detectors-2.0.2rc2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | da4ebf919b284a00647f1fcdb3f0a055c6c3350ee5ee08d77f1bce9ce58df932 |
|
MD5 | 75ef49ee40b63eec5b98845e3f011e8f |
|
BLAKE2b-256 | 99e87b7aea79ac8e175e6286f58f299eb4fecbcbe0056ac5e0376757a096f29c |
Close
Hashes for pupil_detectors-2.0.2rc2-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3fd136861582eca523cb9f54e6f06b919805ffb2ac24fa7460e2a8ddb5da78d0 |
|
MD5 | fb5251fc7bb9c60f6ed48b1d7d0ef572 |
|
BLAKE2b-256 | 9c913081e8ced0d62f38f291db434295876c82622e8fb670c93ca1aaf2e61989 |
Close
Hashes for pupil_detectors-2.0.2rc2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9bebc727d6887255e1ce7c8235d9125be26a82d0ed2a6f5ad1ee68333aa1114 |
|
MD5 | 05769792b4540c4245177d7e77261201 |
|
BLAKE2b-256 | d21fc5b99e16e7318d763f59f01530c3b78c0481803c6e2062c23c31c6e4ce05 |
Close
Hashes for pupil_detectors-2.0.2rc2-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 795e3047bd794362a8046994c1b26a582e3f25d7e61a482bfeb941d18f3b4f02 |
|
MD5 | 311d5ccc6eafdbf2c5130bb77a12b281 |
|
BLAKE2b-256 | 7dc02d8ba52159934e05ae769853ce95123683f4f6859b65b80bcbf922316368 |
Close
Hashes for pupil_detectors-2.0.2rc2-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50ede7fb8bca6ed363ec14355f2c237e5456755c5ff2579c9ec1d2461b45cd09 |
|
MD5 | 5e509a874014bff8b80e0e96893cd38c |
|
BLAKE2b-256 | f73360d99a6dd01571a2c7640f9edd24d16f8609601a32a93c08c07d08d9000d |
Close
Hashes for pupil_detectors-2.0.2rc2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7157b50aee975341a6b452aee3a34e97ba3bdc174f08e45f8a8807fd59fcb20d |
|
MD5 | 5e650f2d9550851d294a27f6806bde7a |
|
BLAKE2b-256 | 7515622202de6b8dc983daadc5f77e4006fdd4f5cbcca5824c9e58967ca0a7cc |
Close
Hashes for pupil_detectors-2.0.2rc2-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 701a067afb03e55994ae26e47e5f5f39a42014d8582a0ee4de394a80be427599 |
|
MD5 | 3a7d7b6d811a7f535e9626b0d3457a27 |
|
BLAKE2b-256 | 0ca3ae4941cb1dbc59bde67b85d4aa4a677e27c511404e4b675418183bfb6bc2 |