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
Close
Hashes for color-detection-jdla-0.0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | faf38e06a60f13df024f6ec345560b7b013fa3f6d9e7f6a3786c8c4bd016abe9 |
|
MD5 | 5fe478f9b1c3bd78d87647e0823695e7 |
|
BLAKE2b-256 | c36bcb25e67ca84cb744f5e6b8324ec4f42c5a8bc5e41b11087a868e01eebeaa |
Close
Hashes for color_detection_jdla-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 553618de57ac92a8db83da86ad036be30155832d27e1a66a95ff4b192b19a649 |
|
MD5 | 1aec3096770498d59bd4cb7a76e73495 |
|
BLAKE2b-256 | 733a91dd22ca382bcaf3c132b6c39fad8648c7123a3feac04f53abfc516ec527 |