Color Tracker - Multi Object Tracker
Easy to use multi object tracking package based on colors 🎨
Install
pip install color-tracker
pip install git+https://github.com/gaborvecsei/Color-Tracker.git
Object Tracker
-
Check out the examples folder, or go straight to the sample tracking app which is an extended version of the script below. This script tracks the red-ish objects, if you'd like to track another color, then start with the
hsv_color_detector.pyscript$ python examples/tracking.py --help usage: tracking.py [-h] [-low LOW LOW LOW] [-high HIGH HIGH HIGH] [-c CONTOUR_AREA] [-v] optional arguments: -h, --help show this help message and exit -low LOW LOW LOW, --low LOW LOW LOW Lower value for the HSV range. Default = 155, 103, 82 -high HIGH HIGH HIGH, --high HIGH HIGH HIGH Higher value for the HSV range. Default = 178, 255, 255 -c CONTOUR_AREA, --contour-area CONTOUR_AREA Minimum object contour area. This controls how small objects should be detected. Default = 2500 -v, --verbose
-
Simple script:
import cv2 import color_tracker def tracker_callback(t: color_tracker.ColorTracker): cv2.imshow("debug", t.debug_frame) cv2.waitKey(1) tracker = color_tracker.ColorTracker(max_nb_of_objects=1, max_nb_of_points=20, debug=True) tracker.set_tracking_callback(tracker_callback) with color_tracker.WebCamera() as cam: # Define your custom Lower and Upper HSV values tracker.track(cam, [155, 103, 82], [178, 255, 255], max_skipped_frames=24)
Color Range Detection
This is a tool which you can use to easily determine the necessary HSV color values and kernel sizes for you app
You can find the HSV Color Detector code here
python examples/hsv_color_detector.py
Donate ☕
If you feel like it is a useful package and it saved you time and effor, then you can donate a coffe for me, so I can keep on staying awake for days 😃
About
Gábor Vecsei
@misc{vecsei2018colortracker,
doi = {10.5281/ZENODO.4097717},
howpublished={\url{https://github.com/gaborvecsei/Color-Tracker}},
author = {Gabor Vecsei},
title = {Color Tracker - Multi Object Tracker},
year = {2018},
copyright = {MIT License}
}
Metadata
Release files for color-tracker 0.1.1
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 | |
|---|---|---|---|---|
| color_tracker-0.1.1.tar.gz | 11.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| color_tracker-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.8 kB
Release files / color_tracker-0.1.1.tar.gz
| Download URL | color_tracker-0.1.1.tar.gz |
|---|---|
| Size | 11.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
96bc4c8cb7aed7d1ad0ae79868a7430a3165c3c2b479f73135d5aa5fc03ebfad
|
|
BLAKE2b-256 checksum How to use checksums |
51ba1893ded2925f8f23f24b33dfaba64180c40f0949bb9b416956d49bb951c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6
|
Release files / color_tracker-0.1.1-py3-none-any.whl
| Download URL | color_tracker-0.1.1-py3-none-any.whl |
|---|---|
| Size | 13.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b2cef788abeac3cb111c75f89c468be5615a761d429227aa4a1ce04fcb2997a1
|
|
BLAKE2b-256 checksum How to use checksums |
3be7de91953333df44c044d4a2b350390735dc051552eee68b83a3858938bc0c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6
|
Security for color-tracker 0.1.1
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.