• Stars
    star
    166
  • Rank 227,748 (Top 5 %)
  • Language
    Python
  • License
    MIT License
  • Created about 7 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Color tracking with OpenCV

Codacy Badge PyPI version License: MIT Python 3 DOI

Color Tracker - Multi Object Tracker

Easy to use multi object tracking package based on colors ๐ŸŽจ

yellow-cruiser ball-tracking

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.py script

    $ 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 ๐Ÿ˜ƒ

Buy Me a Coffee at ko-fi.com

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}
}

More Repositories

1

Stocks-Pattern-Analyzer

This tool should help discover different patterns based on similarity measures in historical (financial) data
Python
221
star
2

whisper-live-transcription

Live-Transcription (STT) with Whisper PoC
Python
124
star
3

usage-tracker.nvim

NeoVim plugin with which you can track the time you spent on files, projects, repos, filetypes
Lua
91
star
4

SLE-GAN

Towards Faster and Stabilized GAN Training for High-fidelity Few-shot Image Synthesis
Python
69
star
5

memento.nvim

A NeoVim plugin which remembers where you've been
Lua
62
star
6

YouTube-Live-Stream-Docker

Live stream from a USB webcam with your Raspberry Pi to Youtube
Python
59
star
7

Ridurre-Network-Filter-Pruning-Keras

Keras model convolutional filter pruning package
Python
44
star
8

Pdf-Split-Merge

simple pdf file split and merge tool
Python
44
star
9

CDCGAN-Keras

Conditional Deep Convolutional GAN
Jupyter Notebook
43
star
10

Neural-Network-Steganography

Hide some secret ๐Ÿ˜Ž data in a Neural Network - text, malicious software or watermark your NN
Jupyter Notebook
41
star
11

Federated-Learning-Mini-Framework

Federated Learning mini-framework with Keras
Python
35
star
12

Dockerized-Microservice-Template

Microservice with Docker, Flask, Postgres, Nginx
Python
22
star
13

cryptoprice.nvim

NeoVim plugin with which you can check the price of your favourite cryptos
Lua
22
star
14

Home-Security

Home Security System with motion detector, what you can control from a website.
Python
22
star
15

Wakatime-Logger

"Extend" the Wakatime Free Plan so you won't loose your logged data!
Python
19
star
16

Emotion-Recognition

Emotion recognition from face
Python
17
star
17

Prometh-Review

AI Pull-Request Reviewer Companion (in the command line)
Python
13
star
18

Mad-Money-Backtesting

Backtesting recommendations from Mad Money and "The Cramer Effect/Bounce"
Jupyter Notebook
13
star
19

Simple-Console-Chat

Just a simple chat app written in python
Python
8
star
20

Face-Recognizer

Thesis: Face Recognizer
Python
8
star
21

Iris-Classification-with-Heroku

Iris classification problem deployed to Heroku
Python
7
star
22

ConsoleTRON

This is a simple local multiplayer TRON game running on the console window
C
6
star
23

Machine-Learning-Inference-With-GitHub-Actions

This repository demonstrated how you can use Github Actions to perform inference with your ML model
Jupyter Notebook
6
star
24

Straighten-Image

Straighten a rotated image with OpenCV and Java
Java
5
star
25

Neural-Network-Dreams

Learning an abstract representation of the word which is called the dream
Jupyter Notebook
5
star
26

OCR-libraries

Google Cloud Vision, Tesseract and Asprise OCR ibrary tests
Java
4
star
27

Barlow-Twins

Clean Tensorflow 2 Implementation of the Barlow Twins self-supervised learning method
Jupyter Notebook
4
star
28

Finger-Detection

Finger detection and counting with Matlab
MATLAB
4
star
29

Variational-Autoencoder

Variational-Autoencoder w/ Convolutional Layers
Jupyter Notebook
3
star
30

pyTRON

This is a tron game which you can play from the console
Python
3
star
31

Mini-Projects

My mini projects
Python
3
star
32

Swiss-Army-Tensorboard

A tool which helps you to release the true potential of Tensorboard
Python
3
star
33

Console-Car-Racer

Retro car racing game ๐Ÿš— ๐Ÿš™
Python
2
star
34

OnalloLaboratorium

This is my individual project for University - 2D local multiplayer
HTML
2
star
35

gptj-demo-restapi

Python
1
star
36

Colaboratory-Helper

Python
1
star
37

YouTube-Most-Replayed-Curve

Python
1
star
38

Somnium-Doctrina

Python
1
star