Skip to content

Latest commit

 

History

History
34 lines (28 loc) · 3.29 KB

README.md

File metadata and controls

34 lines (28 loc) · 3.29 KB

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.