Skip to main content

Pupil Labs 2D Pupil Detector

Project description

https://img.shields.io/pypi/v/pupil-detectors.svg https://img.shields.io/pypi/pyversions/pupil-detectors.svg tests Code style: Black https://img.shields.io/badge/skeleton-2022-informational

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 .

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

pupil_detectors-2.0.2.tar.gz (69.6 kB view details)

Uploaded Source

Built Distributions

pupil_detectors-2.0.2-cp311-cp311-win_amd64.whl (23.6 MB view details)

Uploaded CPython 3.11 Windows x86-64

pupil_detectors-2.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (20.3 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

pupil_detectors-2.0.2-cp311-cp311-macosx_10_9_x86_64.whl (27.6 MB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

pupil_detectors-2.0.2-cp310-cp310-win_amd64.whl (23.6 MB view details)

Uploaded CPython 3.10 Windows x86-64

pupil_detectors-2.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (20.3 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

pupil_detectors-2.0.2-cp310-cp310-macosx_10_9_x86_64.whl (27.6 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

pupil_detectors-2.0.2-cp39-cp39-win_amd64.whl (23.6 MB view details)

Uploaded CPython 3.9 Windows x86-64

pupil_detectors-2.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (20.3 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

pupil_detectors-2.0.2-cp39-cp39-macosx_10_9_x86_64.whl (27.6 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

pupil_detectors-2.0.2-cp38-cp38-win_amd64.whl (23.6 MB view details)

Uploaded CPython 3.8 Windows x86-64

pupil_detectors-2.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (20.3 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

pupil_detectors-2.0.2-cp38-cp38-macosx_10_9_x86_64.whl (27.6 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

pupil_detectors-2.0.2-cp37-cp37m-win_amd64.whl (23.6 MB view details)

Uploaded CPython 3.7m Windows x86-64

pupil_detectors-2.0.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (20.3 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

pupil_detectors-2.0.2-cp37-cp37m-macosx_10_9_x86_64.whl (27.6 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

pupil_detectors-2.0.2-cp36-cp36m-win_amd64.whl (23.6 MB view details)

Uploaded CPython 3.6m Windows x86-64

pupil_detectors-2.0.2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (20.3 MB view details)

Uploaded CPython 3.6m manylinux: glibc 2.17+ x86-64

pupil_detectors-2.0.2-cp36-cp36m-macosx_10_9_x86_64.whl (27.6 MB view details)

Uploaded CPython 3.6m macOS 10.9+ x86-64

File details

Details for the file pupil_detectors-2.0.2.tar.gz.

File metadata

  • Download URL: pupil_detectors-2.0.2.tar.gz
  • Upload date:
  • Size: 69.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for pupil_detectors-2.0.2.tar.gz
Algorithm Hash digest
SHA256 7e920435657e30e52eb136c10e3a116eaabcf7acd4b0a301f9a4ef4105415184
MD5 267b7d3b2e1eaf5bb5123ef2ead5bd24
BLAKE2b-256 6a28f6f27580cf7fea0f37b590c41c55090358f175299ba700cccf51d75e2477

See more details on using hashes here.

File details

Details for the file pupil_detectors-2.0.2-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for pupil_detectors-2.0.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 8909459c0bf2f92fa43e2732b5c04304753ab7d758c072d0faedd9bd499ed2f6
MD5 9797cd6fa2cb28a1843935e18dd8f23a
BLAKE2b-256 e79afcd1a9673c8e3676d58f672df93235058bedaf005e8b529f0304c904a3ff

See more details on using hashes here.

File details

Details for the file pupil_detectors-2.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pupil_detectors-2.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0e43939210ae3c3f17c2789474188e06ccded707b1ac76bb4e4934ed9622e140
MD5 7d9bcd24f422ee89b1477dcba8aaa4d0
BLAKE2b-256 35bb9c83ccf437b2bcb9b22160aebdfb0a77262023a04e0cb01c3179d6d8173a

See more details on using hashes here.

File details

Details for the file pupil_detectors-2.0.2-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pupil_detectors-2.0.2-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 8b9bdc25b57efb9abb739d4890fee162fc83ce3d5a82003ce08fca23ec338cd7
MD5 2e38955cd65c1f6322d78dd701bcae39
BLAKE2b-256 be5f733e37d01e1b400d079712662daeea93e048fcffccc75974036b25bbfe79

See more details on using hashes here.

File details

Details for the file pupil_detectors-2.0.2-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for pupil_detectors-2.0.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c9edde7d826f9c1c6ef1f2824fa878a26502f9778db7364c3c6d22296c6c5be2
MD5 f69646cdda3449a7647143cdb4df17fe
BLAKE2b-256 a2c10980b2b132df57ed7735ad8c8fcc6bcab4e0c544a8b9b37d223a63776b35

See more details on using hashes here.

File details

Details for the file pupil_detectors-2.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pupil_detectors-2.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7022a45f65eca91e78e90c64bd5126c666a4081886aa800a73ef81acddfae1ee
MD5 d8716ad343708b454f7c928217be0b50
BLAKE2b-256 12fbb1a177bf1bed6108027b364c2507419400c991b056ccbc3010f7bb6f0f5d

See more details on using hashes here.

File details

Details for the file pupil_detectors-2.0.2-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pupil_detectors-2.0.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7d504a35d1c8b2094a89ff7b12c137e987f81f46c249aec750b03534139a641a
MD5 09bb25f477c218327b88ea67903adba3
BLAKE2b-256 96271225e6be64d4d004758c8deec94638de218cdc80910ec49d591519a94278

See more details on using hashes here.

File details

Details for the file pupil_detectors-2.0.2-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for pupil_detectors-2.0.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 36f6dddbc35017d5a319cac453c0f3af172798abf09ed93a7ffc7be6e0926611
MD5 9d54e2fa11d9f2a909f759cc7c3ebd3f
BLAKE2b-256 64b2a337bf1e9b1b468ec7a2cb04a70758ff4d91722fe877e9f927aff9966259

See more details on using hashes here.

File details

Details for the file pupil_detectors-2.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pupil_detectors-2.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1da39739e3760624f1b2a7ecee62aa89ecc7e39419117b45ac511722017f6a0d
MD5 dce08da0ef2e69c639c28d5778d0b111
BLAKE2b-256 7402620bcbf0866bc2949a84000dcb1c6bb6da3c221c051ec7ba4c8b7e017d51

See more details on using hashes here.

File details

Details for the file pupil_detectors-2.0.2-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pupil_detectors-2.0.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 12733d6da7c8593a8af21a258e3c57e28d28b4949378cc2525f211d295a39e0e
MD5 a271fc21794578d61223dcfa876fc9df
BLAKE2b-256 c346284768b825a395075c469efe5743e4671527a8b2946e257fc4c4529b03bd

See more details on using hashes here.

File details

Details for the file pupil_detectors-2.0.2-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for pupil_detectors-2.0.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 53f1df5aedc4e2f206220c9e65fa413ed5614fc088ca352c049919ea86cf80fd
MD5 726957217252b67896ddd6affd03002d
BLAKE2b-256 bf9f415d704435b25a0e35921d041f86c43cd9d3f9d3ebd08ae457207c508d93

See more details on using hashes here.

File details

Details for the file pupil_detectors-2.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pupil_detectors-2.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 771ab022b0018d5c57d35f16f795cbf53f3fa39685ec8c7a1e35c425c13b26dd
MD5 1d114370f5723b10badef9242938b1fe
BLAKE2b-256 def04b28c14f2423db752ab4c032ced13a8f3a6778c6de1b26185f3acee0c724

See more details on using hashes here.

File details

Details for the file pupil_detectors-2.0.2-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pupil_detectors-2.0.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d819e3d469e423a140627bd633b0d3c677e509f3f9ba44b20ea788ca9cd14027
MD5 09e6a916863e0a268cf0e0c4c35fe4cc
BLAKE2b-256 2d8aec2aa1d7580dcbb9da5ef7ef3218b673b710ba1cadfe4e612bf5de717909

See more details on using hashes here.

File details

Details for the file pupil_detectors-2.0.2-cp37-cp37m-win_amd64.whl.

File metadata

File hashes

Hashes for pupil_detectors-2.0.2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 82a4ab8c301bb6043f75b8e2807b3ef9d152d445872fa720e6cd32c071890d81
MD5 67780cd46ea75ecfd2c1609b6bc5d9e1
BLAKE2b-256 418bdf3d491b3bcc3fccf20291d75a7349629f445dc3e69ff83cdba4a2c79b91

See more details on using hashes here.

File details

Details for the file pupil_detectors-2.0.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pupil_detectors-2.0.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 43b85f12b64f765214c65a3ed6b3f69d41d3e2af6d27ae6f930dd9ed947d6d8e
MD5 1eacd119b935de20df7948861bf3e527
BLAKE2b-256 d6c45d0bfeb5aff2d9cc9908f5705c8c27e6e7334e59b04393b99fbad9cd3159

See more details on using hashes here.

File details

Details for the file pupil_detectors-2.0.2-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pupil_detectors-2.0.2-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 02e7629ae35c1d5ba48f4ed1db9447dbe72f5455295d38fd02f059cce5a65c12
MD5 7b4af2f1b63a2a9ae4c2cd1a205788cb
BLAKE2b-256 a5283434098bcc2a9fbe613aeafdb67474681fecbf6e4eb4e253bf44b26857f3

See more details on using hashes here.

File details

Details for the file pupil_detectors-2.0.2-cp36-cp36m-win_amd64.whl.

File metadata

File hashes

Hashes for pupil_detectors-2.0.2-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 16af5512dd3fb1270b42dec912ae17f09e809199a9f07a4e6896621136bf03d7
MD5 0724f8efd484d74ace585581c85f1fd9
BLAKE2b-256 555390fea9c2a2e2a4d60794928e30fcf30d98ba51a495f15b34ec182ce07d70

See more details on using hashes here.

File details

Details for the file pupil_detectors-2.0.2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pupil_detectors-2.0.2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e69ebf9b82481b34f1ec0fd2d88b6feab3bc84b4926383140e683b70c9829f0f
MD5 82644cb660ad1068f45387bc374cae5f
BLAKE2b-256 119bfb10a25f0c6a092d18ed9df34876d38e38fc401fae5aa4c8063df4a0913a

See more details on using hashes here.

File details

Details for the file pupil_detectors-2.0.2-cp36-cp36m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pupil_detectors-2.0.2-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 693a2e6ae6d713db6baaeb6d9351cb3c624b62c07d139389842d456e25f7dafe
MD5 1d8ef0d273d4be837d7aa3f86ae0dda3
BLAKE2b-256 dec1760b34687f602037e340fc5484bb87a4e6d58001541281a371922261f90e

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