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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01a5e16d032f520da2ea110e9726daad76d8891bd99077af2bd2000c6a4dcb99 |
|
MD5 | 0c51681d7eddeab5e2a7a67d80a80eb6 |
|
BLAKE2b-256 | cec74e6c63f31f9614e405cf1f032abcbef9bba99491cce96b7e6f74f589e857 |
Close
Hashes for shape_detection_jdla-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0afaf21b88739ffc125b0b937b624a573c103343ab13931b0b2ce94c7334513 |
|
MD5 | e71961726c3f46b2dcbd5101eb976695 |
|
BLAKE2b-256 | 886e22044bbbaa7b2c1d735bdfda627c5e0422d12de2428470da6107e2760a83 |