Giter VIP home page Giter VIP logo

msf's Introduction

MSF (Medial Skeletonization Flow)

A realization of Mean Curvature Skeleton

UCL COMP0119: Acquisition and Processing of 3D Geometry Project

Reference: Tagliasacchi, A., Alhashim, I., Olson, M. and Zhang, H. (2012), Mean Curvature Skeletons. Computer Graphics Forum, 31: 1735-1744. https://doi.org/10.1111/j.1467-8659.2012.03178.x

Project Structure

src: Source code of the implementation;

examples: Some example skeletons generated by our implementation;

docs: Paper and some files;

models: Some meshs used for testing and development.

Examples

1 1 1
2 2 2
2 2 2
1 1 1
1 1 1
1 1 1
3 3 3
3 3 3
3 3 3

How to use

If you want, you can adjust the parameters in src/config.json.

# Assuming you are in the root of project
from src.msf import MSF

# Initial a MSF Instance
msf = MSF()

# Load a mesh
msf.load_mesh("../models/armadillo.obj")

# Let's iterate! Of course you should repeate it.
msf.iterate() # msf.iterate(50) # or iterate 50 rounds directly

# Then see the skeletons in the latest folder of the `result` folder.

Parameter Explaination

Set the parameters in src/config.json

  • wL: wL in the paper;

  • wH: wL in the paper;

  • wM: wL in the paper;

  • use_dynamic_scale: If true, then allow adjusting scale between iterations. The scale will change between scale_min and scale_max repeatedly at intervals of scale_delta, which can speed up convergence;

  • scale: The $\varepsilon$ in the paper will be scale multiply the diagonal length of the mesh's bounding box;

  • scale_min: Only be used when use_dynamic_scale=true;

  • scale_delta: Only be used when use_dynamic_scale=true;

  • scale_max: Only be used when use_dynamic_scale=true;

  • scale_fix: Be used to fix vertices;

  • alpha: The $\theta$ in the paper;

  • use_Laplacian_smoothing: If true, then use Implicit Laplacian smoothing before mesh optimizing, which is critical to produce a complete skeleton instead of meso-skeleton;

  • smooth_lam: $\lambda$ in the Implict Laplacian Smoothing (step size);

  • smooth_it: The iteration number of the Implict Laplacian Smoothing;

  • use_reconstruction_in_voronoi: If true, use mesh reconstruction before calculating Voronoi poles, which can produce a better approximation of medial axis;

  • k_voronoi:, Parameter in mesh reconstruction, only be used when use_reconstruction_in_voronoi=true, which means using the eigen vectors corresponding to the k_voronoi` smallest eigen values to perform reconstruction;

  • use_reconstruction_in_skeletonization: If true, use reconstructed mesh in skeletonization, which can ignore details on the mesh that do not contribute to the skeletonization;

  • k_skeleton: As k_voronoi, only be used when use_reconstruction_in_skeletonization=true;

  • lsqr_args: Parameters for scipy.sparse.linalg.lsqr. Generally not modified.

Algorithm Procedure Code

procedure_code

msf's People

Contributors

lucieniii avatar linsonng avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

linsonng

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.