Skip to main content

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.

Metadata

Release files for color-detection-jdla 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for color-detection-jdla 0.0.3
File Size Uploaded Provenance Actions
color-detection-jdla-0.0.3.tar.gz 4.3 kB Without provenance Details for color-detection-jdla-0.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for color-detection-jdla 0.0.3
File Interpreter ABI Platform Actions
color_detection_jdla-0.0.3-py3-none-any.whl Python 3 none any Details for color_detection_jdla-0.0.3-py3-none-any.whl

Total release size: 10.0 kB

Release files / color-detection-jdla-0.0.3.tar.gz

Download URL color-detection-jdla-0.0.3.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
faf38e06a60f13df024f6ec345560b7b013fa3f6d9e7f6a3786c8c4bd016abe9
BLAKE2b-256 checksum
How to use checksums
c36bcb25e67ca84cb744f5e6b8324ec4f42c5a8bc5e41b11087a868e01eebeaa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.0

Release files / color_detection_jdla-0.0.3-py3-none-any.whl

Download URL color_detection_jdla-0.0.3-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
553618de57ac92a8db83da86ad036be30155832d27e1a66a95ff4b192b19a649
BLAKE2b-256 checksum
How to use checksums
733a91dd22ca382bcaf3c132b6c39fad8648c7123a3feac04f53abfc516ec527
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.0

Security for color-detection-jdla 0.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page