Color Thief
A module for detecting shapes using OpenCV.
Installation
pip install shape-detection-jdla
Overview
Square detection rules:
- There must be four corners
- All four lines must be the same length
- All four corners must be 90°
- Lines AB and CD must be horizontal lines
- Lines AC and BC must be vertical lines
- The contour must be concave
Example
from shape_detection.square import Square
import numpy as np
try:
contour = np.array([[[368, 160]], [[391, 163]],
[[384, 200]], [[361, 194]]])
square = Square.is_square(contour)
print(square)
except Exception as e:
print(e)
Links
Metadata
Release files for shape-detection-jdla 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| shape-detection-jdla-0.0.2.tar.gz | 7.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| shape_detection_jdla-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.5 kB
Release files / shape-detection-jdla-0.0.2.tar.gz
| Download URL | shape-detection-jdla-0.0.2.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
32e72a611bc0f864891ecb9df13fd47b170c430ec3fb3f28291bd467bb7496b5
|
|
BLAKE2b-256 checksum How to use checksums |
6e9f0a9a89b36918c46928ca4a9d6c5d191e7f8d7d84fc757d80f515dd379eb6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
|
Release files / shape_detection_jdla-0.0.2-py3-none-any.whl
| Download URL | shape_detection_jdla-0.0.2-py3-none-any.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e08441c03100216766e8bf84f43b6693291f4f95a54e8a5c4fe57a7571ef4f71
|
|
BLAKE2b-256 checksum How to use checksums |
990f3a29b06a19b2585161f7d66a5fe1056d09421952e8fbe5813fb35d992ef3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
|