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. RAP在线接口管理统计部署

    文档: https://github.com/thx/RAP/wiki/home_cn centos上部署 参考:https://github.com/thx/RAP/wiki/deploy_on_c ...

  2. JAVA面向对象-----访问修饰符

    访问修饰符是用来控制类.属性.方法的可见性的关键字称之为访问修饰符. 1.public 一个类中,同一包中,子类中,不同包中 2.protected 一个类中,同一包中,子类中 3.default 一 ...

  3. 11 吐司 Toast 代码案例

    package com.qf.day11_toast_demo05; import android.app.Activity; import android.graphics.Color; impor ...

  4. iOS下JS与OC互相调用(四)--JavaScriptCore

    前面讲完拦截URL的方式实现JS与OC互相调用,终于到JavaScriptCore了.它是从iOS7开始加入的,用 Objective-C 把 WebKit 的 JavaScript 引擎封装了一下, ...

  5. 3.Lucene3.x API分析,Director 索引操作目录,Document,分词器

     1  Lucene卡发包结构分析 包名 功能 org.apache.lucene.analysis Analysis提供自带的各种Analyzer org.apache.lucene.colla ...

  6. spring 的OpenSessionInViewFilter简介

    假设在你的应用中Hibernate是通过spring 来管理它的session.如果在你的应用中没有使用OpenSessionInViewFilter或者OpenSessionInViewInterc ...

  7. 3.0、Android Studio构建和运行应用

    默认情况下,Android Studio可以通过简单的点击就会将新的项目部署到虚拟机或者物理设备中.在Instant Run的帮助下,你可以将更改的方法或资源文件直接推送到一个运行的app而无需构建一 ...

  8. 给EditText的drawableRight属性的图片设置点击事件

    这个方法是通用的,不仅仅适用于EditText,也适用于TextView.AutoCompleteTextView等控件. Google官方API并没有给出一个直接的方法用来设置右边图片的点击事件,所 ...

  9. Android开发学习之路--Content Provider之初体验

    天气说变就变,马上又变冷了,还好空气不错,阳光也不错,早起上班的车上的人也不多,公司来的同事和昨天一样一样的,可能明天会多一些吧,那就再来学习android吧.学了两个android的组件,这里学习下 ...

  10. WIP 投料报 Invalid Serial Number

    1.接口表数据检查无误 2.同样数据界面能正常完成 界面做trace SQL ID: b2mw8gjyv7guh Plan Hash: 2015965341 DELETE FROM MTL_SERIA ...