Giter Site home page Giter Site logo

aabdz / skeletonize Goto Github PK

View Code? Open in Web Editor NEW
21.0 1.0 5.0 156 KB

2d and 3d distance transform based skeletonization

License: MIT License

Python 100.00%
3d-skeleton 2d-skeleton binary-image-skeleton euler-back-tracking sub-voxel-skeleton fast-marching-method tubular-objects

skeletonize's Introduction

skeletonize

The skeletonize class finds the skeleton of a 2D pixel-based or 3D voxel-based object. The method detects ridges in the distance field of the object surface. If you use skeletonize in your research, please cite:

  • Abdollahzadeh, A., Sierra, A. & Tohka, J. Cylindrical Shape Decomposition for 3D Segmentation of Tubular Objects. IEEE Access 9, 23979โ€“23995 (2021).

The implementation only requires numpy and scikit-fmm:

import numpy as np
from skeletonize import skeletonize

fn = './examples/bw_2d.npy'
bw_2d = np.load(fn)

skel = skeletonize(speed_power=1.2, Euler_step_size=0.5, depth_th=2, length_th=None, simple_path=False, verbose=False)
s = skel.skeleton(bw_2d)
  • speed_power defines the power of the speed image.
  • Euler_step_size: The Euler scheme is used for the back-tracking procedure, which solves the ordinary differential equation with a sub-voxel accuracy.
  • depth_th: prunning skeleton branches as a factor of deepest point in the object
  • length_th: prunning skeleton branches as a factor of longest skeleton branch
  • simple_path: substitute Euler method to define the shortest path
  • verbose: print the branch length while finding the skeleton

skeletonize's People

Contributors

aabdz avatar ifryed avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

skeletonize's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.