Shape detection using OpenCV
Project description
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
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 shape-detection-jdla-0.0.2.tar.gz.
File metadata
- Download URL: shape-detection-jdla-0.0.2.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32e72a611bc0f864891ecb9df13fd47b170c430ec3fb3f28291bd467bb7496b5
|
|
| MD5 |
ee4c6e4a028acf84e16b2c69c4a0e8d5
|
|
| BLAKE2b-256 |
6e9f0a9a89b36918c46928ca4a9d6c5d191e7f8d7d84fc757d80f515dd379eb6
|
File details
Details for the file shape_detection_jdla-0.0.2-py3-none-any.whl.
File metadata
- Download URL: shape_detection_jdla-0.0.2-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e08441c03100216766e8bf84f43b6693291f4f95a54e8a5c4fe57a7571ef4f71
|
|
| MD5 |
4f01419624f6d3af8365f3970373692a
|
|
| BLAKE2b-256 |
990f3a29b06a19b2585161f7d66a5fe1056d09421952e8fbe5813fb35d992ef3
|