Color Detection using OpenCV
Project description
Color detection with OpenCV
Python module for detecting the color of a OpenCV frame.
Installation
> pip install jdla-color-detection
Usage
from color_detection.detect import Mask
import numpy as np
import cv2
# Get dominant color
image = cv2.imread("img/blue.jpg")
color = Mask.detect_dominant(image)
print(color)
# Detect color
my_mask = Mask("Blue", [90, 60, 0], [121, 255, 255])
detected_mask = Mask.detect(color, [my_mask])
print(detected_mask.name)
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Acknowledgments
This module uses ColorThief for grabbing the most dominant color of a contour.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file color-detection-jdla-0.0.3.tar.gz.
File metadata
- Download URL: color-detection-jdla-0.0.3.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
faf38e06a60f13df024f6ec345560b7b013fa3f6d9e7f6a3786c8c4bd016abe9
|
|
| MD5 |
5fe478f9b1c3bd78d87647e0823695e7
|
|
| BLAKE2b-256 |
c36bcb25e67ca84cb744f5e6b8324ec4f42c5a8bc5e41b11087a868e01eebeaa
|
File details
Details for the file color_detection_jdla-0.0.3-py3-none-any.whl.
File metadata
- Download URL: color_detection_jdla-0.0.3-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
553618de57ac92a8db83da86ad036be30155832d27e1a66a95ff4b192b19a649
|
|
| MD5 |
1aec3096770498d59bd4cb7a76e73495
|
|
| BLAKE2b-256 |
733a91dd22ca382bcaf3c132b6c39fad8648c7123a3feac04f53abfc516ec527
|