Git Product home page Git Product logo

shape_from_shading's Introduction

Codes_Shape_from_shading

Matlab codes for ADMM-based variational shape from shading with spherical harmonics lighting

Introduction

These codes can be used to solve the shape-from-shading (SfS) problem (estimate shape, given a single image). Main features:

  • possibility to add a shape prior in order to guide the solution (useful for instance in RGB-D sensing)
  • minimal surface regularization to smooth out the residual noise
  • handles second-order spherical harmonics lighting
  • handles orthographic or perspective camera
  • handles grey or RGB images

Note: the classic eikonal SfS can also be achieved as a special case.

Demos

The following demo files are provided:

  • demo_1_lena_eikonal.m : classic SfS (greylevel image, orthographic camera, frontal lighting) applied to the standard Lena image

  • demo_2_vase_SH2.m : refinement of the depth map obtained with a RGB-D sensor. Source of the dataset: https://github.com/pengsongyou/SRmeetsPS

Contents

The main fuctions are in the Toolbox/ folder:

  • generic_sfs.m: main SfS code
  • theta_fun.m: cost function with respect to the surface gradient values
  • estimate_lighting.m: can be used to estimate spherical harmonics lighting, given an image and a shape estimate
  • make_gradient.m: finite differences stencils on a non-rectangular grid
  • export_obj2.m: to produce a .obj file readable with meshlab

Dependencies

References

[1] "A Variational Approach to Shape-from-shading Under Natural Illumination", Y. Quéau et al., EMMCVPR 2017

shape_from_shading's People

Watchers

 avatar

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.