pupil-detectors
This Python package contains the standalone 2D pupil detectors for the Pupil Core 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
pip install .
Release files for pupil-detectors 2.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pupil_detectors-2.0.2.tar.gz | 69.6 kB | Details |
Built distributions (wheels)
Total release size: 429.0 MB
Release files / pupil_detectors-2.0.2.tar.gz
| Download URL | pupil_detectors-2.0.2.tar.gz |
|---|---|
| Size | 69.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7e920435657e30e52eb136c10e3a116eaabcf7acd4b0a301f9a4ef4105415184
|
|
BLAKE2b-256 checksum How to use checksums |
6a28f6f27580cf7fea0f37b590c41c55090358f175299ba700cccf51d75e2477
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Release files / pupil_detectors-2.0.2-cp311-cp311-win_amd64.whl
| Download URL | pupil_detectors-2.0.2-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 23.6 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
8909459c0bf2f92fa43e2732b5c04304753ab7d758c072d0faedd9bd499ed2f6
|
|
BLAKE2b-256 checksum How to use checksums |
e79afcd1a9673c8e3676d58f672df93235058bedaf005e8b529f0304c904a3ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Release files / pupil_detectors-2.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pupil_detectors-2.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 20.3 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
0e43939210ae3c3f17c2789474188e06ccded707b1ac76bb4e4934ed9622e140
|
|
BLAKE2b-256 checksum How to use checksums |
35bb9c83ccf437b2bcb9b22160aebdfb0a77262023a04e0cb01c3179d6d8173a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Release files / pupil_detectors-2.0.2-cp311-cp311-macosx_10_9_x86_64.whl
| Download URL | pupil_detectors-2.0.2-cp311-cp311-macosx_10_9_x86_64.whl |
|---|---|
| Size | 27.6 MB |
| Tags | CPython 3.11 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
8b9bdc25b57efb9abb739d4890fee162fc83ce3d5a82003ce08fca23ec338cd7
|
|
BLAKE2b-256 checksum How to use checksums |
be5f733e37d01e1b400d079712662daeea93e048fcffccc75974036b25bbfe79
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Release files / pupil_detectors-2.0.2-cp310-cp310-win_amd64.whl
| Download URL | pupil_detectors-2.0.2-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 23.6 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
c9edde7d826f9c1c6ef1f2824fa878a26502f9778db7364c3c6d22296c6c5be2
|
|
BLAKE2b-256 checksum How to use checksums |
a2c10980b2b132df57ed7735ad8c8fcc6bcab4e0c544a8b9b37d223a63776b35
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Release files / pupil_detectors-2.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pupil_detectors-2.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 20.3 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
7022a45f65eca91e78e90c64bd5126c666a4081886aa800a73ef81acddfae1ee
|
|
BLAKE2b-256 checksum How to use checksums |
12fbb1a177bf1bed6108027b364c2507419400c991b056ccbc3010f7bb6f0f5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Release files / pupil_detectors-2.0.2-cp310-cp310-macosx_10_9_x86_64.whl
| Download URL | pupil_detectors-2.0.2-cp310-cp310-macosx_10_9_x86_64.whl |
|---|---|
| Size | 27.6 MB |
| Tags | CPython 3.10 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
7d504a35d1c8b2094a89ff7b12c137e987f81f46c249aec750b03534139a641a
|
|
BLAKE2b-256 checksum How to use checksums |
96271225e6be64d4d004758c8deec94638de218cdc80910ec49d591519a94278
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Release files / pupil_detectors-2.0.2-cp39-cp39-win_amd64.whl
| Download URL | pupil_detectors-2.0.2-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 23.6 MB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
36f6dddbc35017d5a319cac453c0f3af172798abf09ed93a7ffc7be6e0926611
|
|
BLAKE2b-256 checksum How to use checksums |
64b2a337bf1e9b1b468ec7a2cb04a70758ff4d91722fe877e9f927aff9966259
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Release files / pupil_detectors-2.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pupil_detectors-2.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 20.3 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
1da39739e3760624f1b2a7ecee62aa89ecc7e39419117b45ac511722017f6a0d
|
|
BLAKE2b-256 checksum How to use checksums |
7402620bcbf0866bc2949a84000dcb1c6bb6da3c221c051ec7ba4c8b7e017d51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Release files / pupil_detectors-2.0.2-cp39-cp39-macosx_10_9_x86_64.whl
| Download URL | pupil_detectors-2.0.2-cp39-cp39-macosx_10_9_x86_64.whl |
|---|---|
| Size | 27.6 MB |
| Tags | CPython 3.9 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
12733d6da7c8593a8af21a258e3c57e28d28b4949378cc2525f211d295a39e0e
|
|
BLAKE2b-256 checksum How to use checksums |
c346284768b825a395075c469efe5743e4671527a8b2946e257fc4c4529b03bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Release files / pupil_detectors-2.0.2-cp38-cp38-win_amd64.whl
| Download URL | pupil_detectors-2.0.2-cp38-cp38-win_amd64.whl |
|---|---|
| Size | 23.6 MB |
| Tags | CPython 3.8 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
53f1df5aedc4e2f206220c9e65fa413ed5614fc088ca352c049919ea86cf80fd
|
|
BLAKE2b-256 checksum How to use checksums |
bf9f415d704435b25a0e35921d041f86c43cd9d3f9d3ebd08ae457207c508d93
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Release files / pupil_detectors-2.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pupil_detectors-2.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 20.3 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
771ab022b0018d5c57d35f16f795cbf53f3fa39685ec8c7a1e35c425c13b26dd
|
|
BLAKE2b-256 checksum How to use checksums |
def04b28c14f2423db752ab4c032ced13a8f3a6778c6de1b26185f3acee0c724
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Release files / pupil_detectors-2.0.2-cp38-cp38-macosx_10_9_x86_64.whl
| Download URL | pupil_detectors-2.0.2-cp38-cp38-macosx_10_9_x86_64.whl |
|---|---|
| Size | 27.6 MB |
| Tags | CPython 3.8 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
d819e3d469e423a140627bd633b0d3c677e509f3f9ba44b20ea788ca9cd14027
|
|
BLAKE2b-256 checksum How to use checksums |
2d8aec2aa1d7580dcbb9da5ef7ef3218b673b710ba1cadfe4e612bf5de717909
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Release files / pupil_detectors-2.0.2-cp37-cp37m-win_amd64.whl
| Download URL | pupil_detectors-2.0.2-cp37-cp37m-win_amd64.whl |
|---|---|
| Size | 23.6 MB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Windows x86-64 |
|
SHA-256 checksum How to use checksums |
82a4ab8c301bb6043f75b8e2807b3ef9d152d445872fa720e6cd32c071890d81
|
|
BLAKE2b-256 checksum How to use checksums |
418bdf3d491b3bcc3fccf20291d75a7349629f445dc3e69ff83cdba4a2c79b91
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Release files / pupil_detectors-2.0.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pupil_detectors-2.0.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 20.3 MB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
43b85f12b64f765214c65a3ed6b3f69d41d3e2af6d27ae6f930dd9ed947d6d8e
|
|
BLAKE2b-256 checksum How to use checksums |
d6c45d0bfeb5aff2d9cc9908f5705c8c27e6e7334e59b04393b99fbad9cd3159
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Release files / pupil_detectors-2.0.2-cp37-cp37m-macosx_10_9_x86_64.whl
| Download URL | pupil_detectors-2.0.2-cp37-cp37m-macosx_10_9_x86_64.whl |
|---|---|
| Size | 27.6 MB |
| Tags | CPython 3.7 CPython 3.7 pymalloc macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
02e7629ae35c1d5ba48f4ed1db9447dbe72f5455295d38fd02f059cce5a65c12
|
|
BLAKE2b-256 checksum How to use checksums |
a5283434098bcc2a9fbe613aeafdb67474681fecbf6e4eb4e253bf44b26857f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Release files / pupil_detectors-2.0.2-cp36-cp36m-win_amd64.whl
| Download URL | pupil_detectors-2.0.2-cp36-cp36m-win_amd64.whl |
|---|---|
| Size | 23.6 MB |
| Tags | CPython 3.6 CPython 3.6 pymalloc Windows x86-64 |
|
SHA-256 checksum How to use checksums |
16af5512dd3fb1270b42dec912ae17f09e809199a9f07a4e6896621136bf03d7
|
|
BLAKE2b-256 checksum How to use checksums |
555390fea9c2a2e2a4d60794928e30fcf30d98ba51a495f15b34ec182ce07d70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Release files / pupil_detectors-2.0.2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pupil_detectors-2.0.2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 20.3 MB |
| Tags | CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
e69ebf9b82481b34f1ec0fd2d88b6feab3bc84b4926383140e683b70c9829f0f
|
|
BLAKE2b-256 checksum How to use checksums |
119bfb10a25f0c6a092d18ed9df34876d38e38fc401fae5aa4c8063df4a0913a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Release files / pupil_detectors-2.0.2-cp36-cp36m-macosx_10_9_x86_64.whl
| Download URL | pupil_detectors-2.0.2-cp36-cp36m-macosx_10_9_x86_64.whl |
|---|---|
| Size | 27.6 MB |
| Tags | CPython 3.6 CPython 3.6 pymalloc macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
693a2e6ae6d713db6baaeb6d9351cb3c624b62c07d139389842d456e25f7dafe
|
|
BLAKE2b-256 checksum How to use checksums |
dec1760b34687f602037e340fc5484bb87a4e6d58001541281a371922261f90e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|