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
Close
Hashes for shape-detection-jdla-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32e72a611bc0f864891ecb9df13fd47b170c430ec3fb3f28291bd467bb7496b5 |
|
MD5 | ee4c6e4a028acf84e16b2c69c4a0e8d5 |
|
BLAKE2b-256 | 6e9f0a9a89b36918c46928ca4a9d6c5d191e7f8d7d84fc757d80f515dd379eb6 |
Close
Hashes for shape_detection_jdla-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e08441c03100216766e8bf84f43b6693291f4f95a54e8a5c4fe57a7571ef4f71 |
|
MD5 | 4f01419624f6d3af8365f3970373692a |
|
BLAKE2b-256 | 990f3a29b06a19b2585161f7d66a5fe1056d09421952e8fbe5813fb35d992ef3 |