• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

yqueau/shape_from_shading: Matlab codes for shape from shading

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

yqueau/shape_from_shading

开源软件地址(OpenSource Url):

https://github.com/yqueau/shape_from_shading

开源编程语言(OpenSource Language):

MATLAB 94.1%

开源软件介绍(OpenSource Introduction):

Codes_Shape_from_shading

Matlab codes for shape-from-shading. Several variants are implemented:

  • ADMM-based variational shape from shading with general camera (orthographic or perspective) and lighting (spherical harmonics), see [1]
  • Lax-Friedriechs solving of the eikonal case (orthographic camera, frontal directional lighting), cf. Equation (8) in [2]
  • Semi-Lagrangian solver for the eikonal case (orthographic camera, frontal directional lighting), see [3]
  • Semi-Lagrangian solver for the perspective eikonal case (perspective camera, frontal directional lighting), see [4]

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 two demo files accompanying [1] 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

The three other demo files illustrate alternative PDE-based methods based semi-Lagrangian schemes, when lighting is frontal and directional, see [2,3,4] for details.

Contents

The main fuctions for ref [1] 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

[2] "A comprehensive introduction to photometric 3D-reconstruction", J.-D. Durou et al., 2020

[3] "An algorithm for the global solution of the Shape-fromShading model", M. Falcone and M. Sagona, ICIAP 1997

[4] "Some remarks on perspective shape-from-shading models", E. Cristiani et al., SSVM 2007




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap