color-detection-jdla-0.0.3
توضیحات
Color Detection using OpenCV
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | color-detection-jdla-0.0.3 |
| نام | color-detection-jdla |
| نسخه کتابخانه | 0.0.3 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Josué de León |
| ایمیل نویسنده | josuedlavs@gmail.com |
| آدرس صفحه اصلی | https://github.com/JosueDLA/ColorDetection |
| آدرس اینترنتی | https://pypi.org/project/color-detection-jdla/ |
| مجوز | MIT |
# Color detection with OpenCV
Python module for detecting the color of a OpenCV frame.
## Installation
```bash
> pip install jdla-color-detection
```
## Usage
```python
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](https://github.com/fengsp/color-thief-py) for grabbing the most dominant color of a contour.
نیازمندی
| مقدار | نام |
|---|---|
| ==1.21.4 | numpy |
| ==4.5.4.60 | opencv-python |
| ==0.2.1 | colorthief |
| ==8.4.0 | pillow |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.10 | Python |
نحوه نصب
نصب پکیج whl color-detection-jdla-0.0.3:
pip install color-detection-jdla-0.0.3.whl
نصب پکیج tar.gz color-detection-jdla-0.0.3:
pip install color-detection-jdla-0.0.3.tar.gz