quadrilateral-fitter
QuadrilateralFitter is an efficient and easy-to-use Python library for fitting irregular quadrilaterals from irregular polygons or any noisy data.
Decision gist · record as of 2026-08-14
Yes, if you need to fit quadrilaterals to noisy polygons or point clouds. The package is lightweight, has no known vulnerabilities, and carries a permissive MIT license. Maintenance is dormant but the code is stable and the dependency set is standard. Install it if your workflow involves cleaning up shape detections; skip it if you need active support or ongoing feature development.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction: pure Python wheel with three common dependencies (shapely, numpy, scipy).
- Maintenance is dormant—last commit was 2024-08-25—but the package is marked Production/Stable and carries no known vulnerabilities.
License · maintenance · safety
MIT (permissive) — MIT license is permissive: you can use, modify, and distribute this package freely in commercial or private projects with minimal restrictions, provided you include the license notice.
last release 2024-08-28 (716 days) · last repo commit 2024-08-25 · 31 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 117,330 downloads/mo, #12,167 on PyPI
Alternatives
Verify before relying
pip install quadrilateral-fitter
from quadrilateral_fitter import QuadrilateralFitter
import numpy as np
noisy_polygon = np.array([[x1, y1], [x2, y2], ...]) # Your polygon points
fitter = QuadrilateralFitter(polygon=noisy_polygon)
fitted_quad = fitter.fit() # Returns tuple of (x, y) corners- Whether the package works correctly with very large point clouds or whether performance degrades significantly.
- How the Douglas-Peucker simplification threshold (default 10) affects accuracy in typical real-world use cases.
- Whether the tight_quadrilateral property is suitable as a drop-in replacement when some point loss is acceptable.
What it is and what it does
QuadrilateralFitter solves the problem of extracting a clean four-corner polygon from noisy or irregular shape detections. It takes a polygon defined by any number of points and finds the smallest-area quadrilateral that fully contains all those points, minimizing the Intersection Over Union (IoU) metric. The library wraps shapely, numpy, and scipy to perform the geometric optimization.
Typical use is cleaning up detections from computer vision pipelines—such as form boundaries or document corners detected with noise—before applying perspective correction or template matching. You instantiate it with a polygon (as a numpy array, list, tuple, or shapely Polygon), call fit() to get the corners, or access tight_quadrilateral for a tighter fit when some point loss is acceptable. The package includes optional Douglas-Peucker simplification to speed up processing on large convex hulls.
Use it for
- Clean up noisy document or form corner detections from image processing before perspective correction.
- Extract a four-corner bounding quadrilateral from irregular polygon detections in computer vision pipelines.
- Prepare shape data for template matching by fitting a quadrilateral to noisy point cloud input.
- Simplify irregular polygons to corners for downstream geometric analysis or pattern recognition.
- Reduce noise in polygon data from sensor or detection systems before further processing steps.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to fit quadrilaterals to noisy polygons or point clouds.
The package is lightweight, has no known vulnerabilities, and carries a permissive MIT license. Maintenance is dormant but the code is stable and the dependency set is standard. Install it if your workflow involves cleaning up shape detections; skip it if you need active support or ongoing feature development.
Install
quadrilateral-fitter on PyPI
Before you install
Low friction: pure Python wheel with three common dependencies (shapely, numpy, scipy). Maintenance is dormant—last commit was 2024-08-25—but the package is marked Production/Stable and carries no known vulnerabilities.
License in practice
MIT license is permissive: you can use, modify, and distribute this package freely in commercial or private projects with minimal restrictions, provided you include the license notice.
Quickstart
pip install quadrilateral-fitter
from quadrilateral_fitter import QuadrilateralFitter
import numpy as np
noisy_polygon = np.array([[x1, y1], [x2, y2], ...]) # Your polygon points
fitter = QuadrilateralFitter(polygon=noisy_polygon)
fitted_quad = fitter.fit() # Returns tuple of (x, y) corners
Verify before relying
- Whether the package works correctly with very large point clouds or whether performance degrades significantly.
- How the Douglas-Peucker simplification threshold (default 10) affects accuracy in typical real-world use cases.
- Whether the tight_quadrilateral property is suitable as a drop-in replacement when some point loss is acceptable.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.6 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesshapelynumpyscipy |
| Maintenance | Dormant 716 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 117,330 / month, #12,167 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Topic :: Scientific/Engineering :: Artificial IntelligenceTopic :: Scientific/Engineering :: Image RecognitionTopic :: Scientific/Engineering :: Information AnalysisTopic :: Scientific/Engineering :: MathematicsTopic :: Scientific/Engineering :: VisualizationTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python ModulesTopic :: Utilities |
Evidence: quadrilateral_fitter-1.12-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “fit quadrilateral to polygon”
- quadrilateral-fitterFits the smallest-area quadrilateral that contains all points from a…
- contourpyContourPy calculates contours of 2D quadrilateral grids using C++11…
- pyclipperPyclipper performs polygon clipping operations (intersection, union,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Libraries packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.
Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
See also qrdet · rectangle-packer · antimeridian · mapbox-earcut · shapely-polyskel · bermuda · shapely · piecewise-regression · lmfit · pypcd4