Compiling and Running Make3D on your own computer

source: http://make3d.cs.cornell.edu/code_linux.html

Make3d has the ability to infer depth from a single 2D image. For more information on how it works see
Make3D.cs.cornell.edu.

The code is available under Creative Commons Attribution-Noncommercial 3.0 unported license.To use the code, you must agree to cite the papers number 1 (TPAMI), 3 (ICCV-3dRR), and 9 (NIPS) available
here, and the url: http://make3d.cs.cornell.edu

What you need

1) A computer running a linux distro (Ubuntu is recommended, but we have been able to run it everywhere including RedHat and amazon clusters). Standard build tools (g++, gcc etc)

2) Matlab

3) Mex compiler to compile C++ bindings to MatLab

See: http://www.mathworks.com/support/tech-notes/1600/1605.html

Steps

Step 1) Download and untar the make3d files as follows (I assume everything is done in the home directory)

cd ~
mkdir make3d
cd make3d
mkdir params
mkdir scratch
wget http://ai.stanford.edu/~asaxena/reconstruction3d/Make3dSingleImageStanford_version0.1.tar.gz
tar -xvzf Make3dSingleImageStanford_version0.1.tar.gz
cd params
wget http://ai.stanford.edu/~asaxena/reconstruction3d/MakedLearnedParameters_v0.1.tar.gz
tar -xvzf  MakedLearnedParameters_v0.1.tar.gz
cd ..

Step 2) Set the default directories for loading/storing training data and scratch data

Since we don’t want to have to pass these as arguments every time we are just going to modify the “OneShot3dEfficient.m” file to store these as defaults.

Go to the make3d/LearningCode/Debug and open the file OneShot3dEfficient.m

You will see several lines like the following (around lines 72-87)



ScratchFolder = ['/afs/cs/group/reconstruction3d/scratch/IMStorage' ];

ParaFolder = '/afs/cs/group/reconstruction3d/scratch/Para/';



change them to:



ScratchFolder = ['~/make3d/scratch' ];

ParaFolder = '~/make3d/params/';



(i.e pointing to the two folders we made earlier)

Step 3) Generate the various mex needed:

cd to ~/make3d/LearningCode

run MatLab

in matlab type:

>> InitialPath(true)

This will generate all the .mex files needed for the program to run

Now you probably want to download a test image to the

~/make3d/LearningCode directory … do that then restart matlab

run:

>> InitialPath(false)
>> OneShot3dEfficient('yourimage.jpg','./')

You should see something like the following be outputted:

>> InitialPath(false)
>> OneShot3dEfficient('paris.jpg','./')
Starting with new optimization...
Default = 

         filename: {'_'}
       ParaFolder: '~/make3d/params/'
     OutPutFolder: './'
    ScratchFolder: '~/make3d/scratch'
             Flag: [1x1 struct]

0.027535 seconds.
Loading the image...               0.2733 seconds.
Creating Superpixels...           3.0314 seconds.
Creating Features and multiple segmentations... 32.9655 seconds.
Calculating superpixel-shape features...       33.6513 seconds.
Preparation for the Inference...             39.8886 seconds.
Starting Inference...
     : Building Matrices....            2.1074
     : In 1st level Optimization, using new solver.(1/1,1/1) Success with alfa=1192.3985 Success with alfa=1635.6242     35.722
     : Writing WRL.grid 0attach 0            In WRL, vertices=2567 triangles=4691
Finished Inference at:         79.5021 seconds.
Writing superpixels and image...  79.8306 seconds.
Done.        Total time taken = 79.832 seconds.
>>

Thats all there is to it! You now have a .WRL file containing the outputted 3d model

Viewing the 3D WRL

There are many viewers to see the .WRL file. For example, you can install Cortonaviewer and view in Chrome or Firefox browser.

Make3D Convert your image into 3d model的更多相关文章

  1. 3d模型 手办制作 3d model manual production

    3d模型 手办制作 3d model manual production 作者:韩梦飞沙 Author:han_meng_fei_sha 邮箱:313134555@qq.com E-mail: 313 ...

  2. QT Graphics-View 3D编程例子- 3D Model Viewer

    学习在Graphics-View框架中使用opengl进行3D编程,在网上找了一个不错的例子“3D Model Viewer”,很值得学习. 可以在http://www.oyonale.com/acc ...

  3. WPF 3D model - Sphere, Cone, and Cylinder

    原文:WPF 3D model - Sphere, Cone, and Cylinder   Extending Visual3D - Sphere, Cone, and Cylinder http: ...

  4. ShapeNet: An Information-Rich 3D Model Repository 阅读笔记

    ShapeNet: An Information-Rich 3D Model Repository 注:本论文只是讲述数据库建立方法 摘要 ShapeNet是一个有丰富注释的大型形状存储库,由对象的3 ...

  5. Using AlloyTouch to control three.js 3D model

    As you can see, the above cube rotation, acceleration, deceleration stop all through the AlloyTouch ...

  6. submit form to convert to a Java Bean model.

    实体类中无需构造函数. Since we haven’t specified a constructor, Java will provide a default constructor that w ...

  7. x01.gamelab: An Tank 3D Model

    准备 1. 安装 OpenGL 及添加 python 引用参见我的置顶随笔. 2. 下载源代码: http://download.csdn.net/download/china_x01/1013310 ...

  8. 基于ACIS/HOOPS的3D应用开发简介 【转】

    (整理) 平台:                造型引擎——ACIS         显示引擎——Direct3D/OpenGL/GDI         应用框架——HOOPS   组件关系图     ...

  9. AVEVA RVM to 3D PDF

    AVEVA RVM to 3D PDF eryar@163.com RvmTranslator 3D PDF plugin can convert PDMS RVM files to 3D PDF w ...

随机推荐

  1. proc文件系统探索 之 根目录下的文件[1]

    2.1根目录下的文件2.1.1lock文件内核锁,记录与被打开的文件有关的锁信息. 该文件显示当前被内核锁定的文件.该文件包含的内容是内核调试数据,根据使用的系统的这些数据会变化很大.一个/proc/ ...

  2. 利用QrCode.Net生成二维码 asp.net mvc c#

    利用QrCode.Net生成二维码 asp.net mvc c# 里面介绍了.net的方式及js的方式,还不错. 里面用到的qrcode.net的类库下载地址:https://qrcodenet.co ...

  3. Spark编译及spark开发环境搭建

    最近需要将生产环境的spark1.3版本升级到spark1.6(尽管spark2.0已经发布一段时间了,稳定可靠起见,还是选择了spark1.6),同时需要基于spark开发一些中间件,因此需要搭建一 ...

  4. 在线看Android系统源码,那些相见恨晚的几种方案

    请尊重分享成果,转载请注明出处,本文来自逆流的鱼yuiop,原文链接:http://blog.csdn.net/hejjunlin/article/details/53454514 前言:最近在研究M ...

  5. iOS 用RunTime来提升按钮的体验

    用RunTime来提升按钮的体验 载请标明出处:http://blog.csdn.net/sk719887916/article/details/52597388,作者:Ryan 经常处理按钮问题都是 ...

  6. 用reg文件把便携版sublime text 3添加到右键菜单

    假设sublime文件夹在C:\\Users\\T430i\\Downloads\\Sublime Text Build 3059 x64\\ 则: Windows Registry Editor V ...

  7. python 3 黑色魔法元类初探

    最近读django源码,发现必须了解元类才能理解一些很神奇的行为. 发现元类实际上是控制class的创建过程.比如类B继承某个看似平淡无奇的类A之后,你在类B中定义的属性或方法可能会遭到彻底改变. 假 ...

  8. EBS开发技术之trace

    trace的目的 trace主要是用于程序调优,优化,程序bug调试,程序运行系统情况跟踪 trace步骤 1.并发定义中,勾上"启用跟踪" 2.提交一个请求,得到请求编号 注意: ...

  9. xlsx批量转为utf8的csv

    xlsx批量转为utf8的csv(金庆的专栏)策划的配置表为 xlsx 表格,可以有注释,公式.服务器和客户端使用的配置文件需要转成 csv 文件.使用 WPS 另存无法批量转换,并且结果不是utf8 ...

  10. FFmpeg源代码简单分析:avformat_alloc_output_context2()

    ===================================================== FFmpeg的库函数源代码分析文章列表: [架构图] FFmpeg源代码结构图 - 解码 F ...