https://github.com/mwja/human-interface
Interface for real objects to virtual points
https://github.com/mwja/human-interface
Last synced: 3 months ago
JSON representation
Interface for real objects to virtual points
- Host: GitHub
- URL: https://github.com/mwja/human-interface
- Owner: mwja
- License: mit
- Created: 2021-06-27T14:35:47.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-06-27T14:35:51.000Z (almost 4 years ago)
- Last Synced: 2025-02-09T00:41:26.942Z (4 months ago)
- Language: Python
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Color detection program
This is a set of scripts to detect colors from the camera and then turn them into virtual coordinates. This uses:
- `opencv2` (camera interface)
- `numpy` (image data management)
- `scikit` (distinguishing color clusters)
- `matplotlib` (tests)
- `pygame` (also tests)## Installation
Install the requirements with
```
$ python3 -m pip install -r requirements.txt
```Or the following on Windows
```
$ py -m pip install -r requirements.txt
```## Usage
You can import these libraries, but for example usage, see [Examples](#examples).## Examples
Run all of these examples with `python -m examples.`.### `cluster_detection`
Uses `ClusterDetection.feed_cluster_rect_data` to find all clusters of the color and then draws rects around each cluster found.### `key_point_detection`
Uses `ClusterDetection.find_key_points` to find the largest areas of the wanted colors and then draws lines between them. This is the matplotlib simplified version of `pygame_test`.### `pygame_test`
Tests usage of normalized points with Pygame, and draws circles and rects around red and blue points and recognizes human skin.This also draws a line between key points.