Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bradmontgomery/python-laser-tracker
A simple laser tracker using Python and OpenCV.
https://github.com/bradmontgomery/python-laser-tracker
opencv python
Last synced: 5 days ago
JSON representation
A simple laser tracker using Python and OpenCV.
- Host: GitHub
- URL: https://github.com/bradmontgomery/python-laser-tracker
- Owner: bradmontgomery
- License: mit
- Created: 2012-09-13T15:57:44.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2019-09-01T19:46:23.000Z (about 5 years ago)
- Last Synced: 2024-11-01T22:42:52.003Z (12 days ago)
- Topics: opencv, python
- Language: Python
- Homepage:
- Size: 34.2 KB
- Stars: 84
- Watchers: 14
- Forks: 38
- Open Issues: 4
-
Metadata Files:
- Readme: README.rst
- License: LICENSE.txt
Awesome Lists containing this project
README
python laser tracker
====================This is a OpenCV application that applies filters in order to track specific HSV ranges. By default, it tracks a red laser pointer, but it is modular and you can track about whatever you want.
Requirments
-----------This requires Python2 and the Python wrapper for OpenCV.
It was tested on GNU/Linux distributions and Mac OS X.Usage
-----
Run ``python laser_tracker/laser_tracker.py -h`` for help on the available command-line parameters.Range for each HSV components:
- hue: [0, 180]
- saturation: [0, 255]
- value: [0, 255]About the code
--------------
The code performs the following steps, and displays the results in several windows. The general idea is to:1. Grab the video frame.
2. Convert it to HSV
3. Split the frame into individual components (separate images for H, S, and V)
4. Apply a threshold to each compenent (hopefully keeping just the dot from the laser)
5. Perform an AND operation on the 3 images (which "should" cut down on false positives)
6. Display the result.The filtering part is done using successive `thresholding `_
.. image:: img/filtering.png
License
-------This code is MIT-licensed. You can basically do whatever you want with it.
Contributing
------------Any suggestions, bug reports, or pull requests are welcome! If there's
something I should be doing differently, here, feel free to open an Issue and
let me know.