Skip to content

Generate a height/depth map and a mesh from a single silhouette.

Notifications You must be signed in to change notification settings

unclearness/inflation_py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

inflation_py

An implementation of inflation from silhouettes in python. Generate a height/depth map and a mesh from a single silhouette. No machine learning is included.

Run

python inflation.py generates sample outputs.

OpenCV, numpy and scipy are required as dependencies.

Sample inputs and outputs

  • Input
    • A single silhouette (mask) image
  • Output
    • a depth/height map (colorized) and a mesh in .ply format (its shaded rendering is shown in the table below)
Input silhouettes
Distance Transform
Distance Transform + Activation (tanh)
Baran's method

Algorithm

Distance Transform (+ Activation)

Based on distance transform that computes distance from silhouette edges to pixels in the silhouette. This method tends to cause steepy surfaces. Additioanlly, you can set activation function to operate steepness but it is difficult to control.

Baran's method

Based on Poisson's equation. Implementation of the following paper: "Notes on Inflating Curves" Baran and Lehtinen 2009. This method generates smooth surfaces considering gradient space. Especially, a circle silhouette becomes a hemisphere mesh.

About

Generate a height/depth map and a mesh from a single silhouette.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages