Convert the Skeleton to a Graph using Python.
Project description
PySkel2Graph
Convert the Skeleton to a Graph using Python.
Install
pip install pyskel2graph
Use
from pyskel2graph.io import imread, imwrite
from pyskel2graph import skel2graph
from pyskel2graph.vis import vis_graph, vis_graph_plt
img = imread('assets/test.jpg')
skel = imread('assets/skeleton.png')
graph = skel2graph(skel, pruning_threshold=5)
vis_graph_plt(graph, img=img)
imwrite(vis_graph(graph, skel.shape), 'assets/pruning_skel.png')
Image
Skeleton (Obtain through certain methods)
Skeleton (pruning_threshold=5)
Graph
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
pyskel2graph-0.1.0.tar.gz
(17.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyskel2graph-0.1.0.tar.gz.
File metadata
- Download URL: pyskel2graph-0.1.0.tar.gz
- Upload date:
- Size: 17.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4341fb0bd919e7f8cf602b9aa93a1a113639e253a44f0651851aa94fc1b8225
|
|
| MD5 |
85d822ba091b6ad3503cc920550f5bad
|
|
| BLAKE2b-256 |
2d3b91381950095181a59a98bbd857e3585cefb3a6f7e2b7056f5267d2cb3fa3
|
File details
Details for the file pyskel2graph-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pyskel2graph-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ca9cf7c370a017e392f1970e78387ce22fd785748090e09fcd276eebacc8c6a
|
|
| MD5 |
05d0053e1201048a1544c6173038c316
|
|
| BLAKE2b-256 |
7afce84dca2e0211f8ca62d512f6f347a40511355d040a87f0254ba9fea80e8e
|