ImageBoundaryPointsGeneration takes an image..
.. identifies the " region " in it and returns a list of points bounding the region.
This is meant to be used with a procedural generation project that generates 2D tile maps from provided tile sets within specified regions. It facilitates specifying those regions by uploading pictures in which the specification is clearly present.
Example:
The above is a region assembled from pieces I picked up at a fair.
Approximation is done by calling RegionBordersApproximator.approximate:
RegionBordersApproximator.approximate(base_image_data=base_image_data, base_image_width=400, base_image_height=300, min_canny_threshold=100, max_canny_threshold=200, min_segmenting_threshold=70, max_segmenting_threshold=255, contour_thickness=2)
base_image_data: image in Base64base_image_width,base_image_height: image width/heightmin_canny_threshold,max_canny_threshold: Canny edge detection thresholdsmin_segmenting_threshold,max_segmenting_threshold: Image segmenting thresholdscontour_thickness: thickness of lines drawn for region borders
Results are output as
@dataclass(frozen=True)
class RegionBordersApproximation:
border_points: dict[uuid4, Point]
border_segments: tuple[RegionBordersApproximator.RegionBorderSegment]
RegionBorderSegment.point_Id values correspond to border_points keys.
Examples (visual):
Borders highlighted:
Borders & boundary points highlit:
The idea is that the border points can be more finely, manually tweaked from this initial state. Future iterations will reliably automate that tweaking.
Metadata
Release files for ImageBoundaryPointsGeneration 0.1.0.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| imageboundarypointsgeneration-0.1.0.2.4.tar.gz | 7.2 kB | Without provenance | Details for imageboundarypointsgeneration-0.1.0.2.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| imageboundarypointsgeneration-0.1.0.2.4-py3-none-any.whl | Python 3 | none | any | Details for imageboundarypointsgeneration-0.1.0.2.4-py3-none-any.whl |
Total release size: 15.5 kB
Release files / imageboundarypointsgeneration-0.1.0.2.4.tar.gz
| Download URL | imageboundarypointsgeneration-0.1.0.2.4.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4c8144e53b7e20f5cd218628eb4bf8ec8f5f8e43f62f4f18223407dc6d35e1f2
|
|
BLAKE2b-256 checksum How to use checksums |
b2f4fbce5791ca10dd8d32c2c61399a25efe5052bd26c6516647c216ca9d6d5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / imageboundarypointsgeneration-0.1.0.2.4-py3-none-any.whl
| Download URL | imageboundarypointsgeneration-0.1.0.2.4-py3-none-any.whl |
|---|---|
| Size | 8.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f1f2fd00c0591449059794578b1cb1742c8f6977f38c8c398cbda0a04fd2ba82
|
|
BLAKE2b-256 checksum How to use checksums |
cb3962c3f786cdd24617cc12f7d470c317e7771672b7a49bd0d8f85bed870ddd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Security for ImageBoundaryPointsGeneration 0.1.0.2.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.