pywayne-cv-geometric-hull-calculator

Geometric hull calculator for 2D point sets supporting convex hull, concave hull (concave-hull, alphashape), and minimum bounding rectangle. Use when working with pywayne.cv.geometric_hull_calculator module to compute geometric hulls, visualize results with OpenCV or matplotlib, and generate random test point sets.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "pywayne-cv-geometric-hull-calculator" with this command: npx skills add wangyendt/geometric-hull-calculator

Pywayne Geometric Hull Calculator

This module computes geometric hulls (convex and concave) for 2D point sets.

Quick Start

from pywayne.cv.geometric_hull_calculator import GeometricHullCalculator
import numpy as np

# Create calculator with random points
points = GeometricHullCalculator.generate_random_points(num_points=50)
calculator = GeometricHullCalculator(points, algorithm='concave-hull')

# Get results
print(f"MBR: {calculator.get_mbr()}")
print(f"Convex Hull: {calculator.get_convex_hull()}")
print(f"Concave Hull: {calculator.get_concave_hull()}")

# Visualize with matplotlib
calculator.visualize_matplotlib()

Initialization

# algorithm options: 'concave-hull' or 'alphashape'
# use_filtered_pts: Enable point filtering based on radius
calculator = GeometricHullCalculator(
    points=your_points,
    algorithm='alphashape',
    use_filtered_pts=True
)

Supported Algorithms

AlgorithmDescription
concave-hullConcave hull using concave_hull library
alphashapeConcave hull using alphashape library

Hull Types

TypeMethodDescription
Convex Hullget_convex_hull()Outer hull containing all points
Concave Hullget_concave_hull()Inner concave boundary

Properties

PropertyDescription
pointsInput 2D points (N×2 numpy array)
algorithmAlgorithm used for concave hull
use_filtered_ptsWhether filtered points were used
boxMinimum Bounding Rectangle corners
centerCenter point of input points
filter_radiusRadius used for point filtering
concave_hull_resultConcave hull points or polygons

Visualization

OpenCV Visualization

calculator.visualize_opencv()

Displays: All input points, MBR, center, filter circle (if enabled), concave hull (green), convex hull (red).

Matplotlib Visualization

calculator.visualize_matplotlib()

Displays: All input points (red), MBR (blue), center, filter radius circle (if enabled), concave hull (orange), convex hull (purple).

Requirements

  • numpy - Array operations
  • cv2 (OpenCV) - For OpenCV visualization and MBR computation
  • matplotlib - For matplotlib visualization
  • scipy - For convex hull computation
  • concave_hull - Concave hull algorithm
  • alphashape - Alphashape algorithm
  • shapely - Polygon operations for area calculation

Notes

  • Point filtering uses radius = 30% of shorter MBR edge length
  • MBR computed using OpenCV's minAreaRect
  • Convex hull uses scipy's ConvexHull
  • Supports both single Polygon and MultiPolygon from alphashape results

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Fast Douyin Publish

抖音视频自动发布助手。一键上传视频到抖音,支持自动文案生成和标签优化。

Registry SourceRecently Updated
General

Skills Finder

Intelligent skill matcher that searches multiple skill marketplaces (ClawHub & Skills.sh) in real-time. Supports ANY language for user input, multi-step skil...

Registry SourceRecently Updated
General

Claw Self Improving Plus

Turn raw mistakes, corrections, discoveries, and repeated decisions into structured learnings and promotion candidates. Use when the user wants a conservativ...

Registry SourceRecently Updated