Compiling Meshlab

转载 2012年03月10日 20:56:36

What you need

To compile MeshLab you need a C++ compiling environment, (we regularly compile meshlab under VisualStudio 2005, gcc and xcode) and the following libraries:

  • Qt 4.4 (note that Qt 4.4 are required, Qt versions < 4.4 could not compile). Current version of MeshLab compiles well against Qt 4.4.3.
  • the VCG libraries; http://vcg.sf.net, this library is not distributed by means of easy-to-download packages, but it is only accessible through anonymous svn (svn string: svn co https://vcg.svn.sourceforge.net/svnroot/vcg vcg ). If you get the current version of the VCG library we suggest you to also get the current version of MeshLab. If you want to compile the distributed sources check out from the repository the VCG lib with the same date of the release of MeshLab.
  • MeshLab's source code version 1.2.1. Now you have two different options:

External Dependencies

MeshLab and MeshLab's plugins invokes functions exported by external libraries. The code of all these libraries is normally included in the MeshLab's source code package. You can find it in the folder external in the MeshLab source tree.

  • glew ( http://glew.sourceforge.net/ ), strongly required. You just need the sources (.h and .c), (not the compiled libs), glew is statically compiled into meshlab, so no dynamic libraries are required.
  • lib3ds-1.3.0 ( http://lib3ds.sourceforge.net/ ) This one is needed only for the io_3ds plugin. Without this plugin the 3ds file formats will not be parsed.
  • bzip2-1.0.3 this one is required only for the epoch format import plugins; if you do not have datasets produced with the arc3D web reconstruction service, you do not need this plugin.
  • muParser 1.30 ( http://muparser.sourceforge.net/ ) This library is needed for filter_func plugin.

In order to successfully compile a MeshLab's plugin with external dependency you have before to compile the referred library and put it into the folder meshlab/src/external/lib/YOUR_OS where YOUR_OS is a string related to your operating system and compiler according to QMAKESPEC definition (like for example macx or win32-msvc2005).
Into the folder external a .pro file, external.pro, has been provided to easily compile all the external libraries. To do this you can either:

  • use a Qt-friendly IDE, like Qt Creator, Visual Studio or Eclipse (the last two with the IDE's Qt integration provided by Trolltech)
  • use command line.
qmake -recursive external.pro 
make
 

A note: when we say that a library is needed only for a specific plugin we mean that if you do not have that library you should not try to compile that specific plugin otherwise the compilation of that plugin could fail on that plugin and, depending on your compiling environment, the whole compilation could stop. To avoid the compilation of problematic plugins simply comments the relative line (adding a # at the beginning of the line) in the src/meshlabplugins/meshlabpluginsv12.pro.

Code tree structure

The meshlab sources and the vcg library must be at the same level and the vcg library root should be named 'vcglib'. The external compiled libraries should be placed in a dir named ~/devel/meshlab/external/lib/YOUR_OS (see the above section).
You should have setup your directories in a way that should be similar to the following ones (obviously you are not forced to call your base dir devel or to put it under your home dir):

~/devel/vcglib/vcg/space/ 
~/devel/meshlab/src/meshlab/interfaces.h
~/devel/meshlab/external/lib/YOUR_OS

If you put things in dirs with different relations, you have to manually change the .pro. Please note that if you are a developer that will soon or later submit back its work, it is strongly deprecated that you use your own version of .pro files: use the standard setup.

Compiling

The compiling step depends on the compiling environment. Using GCC (both under linux and using the mingw gcc provided with the free Qt distribution) you should just type, from the devel/meshlab/src directory:

qmake -recursive meshlabv12.pro
make

the devel/meshlab/src directory contains also the meshlab_mini.pro project that contains a much smaller set of the meshlab plugins, easier (no need for lib3ds and bzip) and faster to be compiled.

Under windows the suggested platform is the one formed by the open source version of Qt with the mingw gcc compiler that is kindly included in the open source Qt distribution available from TrollTech.

If you want to use Visual Studio, please buy the commercial version of Qt that offers a nice integration of the Qt tools into the Visual Studio IDE. In that case you simply have to import the top level pro ( ~/devel/meshlab/src/meshlab.pro ) into VisualStudio.

Using Microsoft Visual Studio 8 express edition and QT

It is possible to use the Visual Studio 8 express edition (the one free from MS). Simple steps for the lazy ones:

  • download and install Microsoft Visual Studio 8 express edition
  • download from trolltech QT 4.4.3 , the zip with the sources not the precompiled bin for mingw.
  • unzip it and rename the created folder to c:/Qt/4.4.3 (or something different if you already have installed the qt distribution with mingw.
  • Now open the visual studio console (program files->visual studio 2008-> vs 2008 tools-> vs 2008 command promt). Go to the directory where you unzipped qt and type configure -debug-and-release. Wait a few mins (it compiles qmake and runs it, creating the makefiles for vs2008)
  • type nmake. Wait a few hours (it recompiles the whole Qt).
  • last step: prepare the environment; you have to add to the environment of vs8 command prompt:
set QTDIR=C:/Qtvs/4.4.3
set PATH=C:/Qtvs/4.4.3/bin
set PATH=%PATH%;%SystemRoot%/System32
set QMAKESPEC=win32-msvc2008
  • after that just start that enhanced vs8 command prompt, go in the appropriate dir, type
qmake -tp vc -recursive meshlabv12.pro
  • and magically a solution that contains meshlab and all the plugins will appear.
  • In some cases it could help also to configure visual C++, so it can see always Qt: (tools->options) and add: $(QTDIR)/include to the include directories and $(QTDIR)/lib to the lib directories, but it should not be required (and perhaps a bit dangerous if you upgrade qt).

MeshLab安装在linux下

PPA 安装,打开终端,输入以下命令: sudo add-apt-repository ppa:zarquon42/meshlab sudo apt-get update sudo apt-get i...
  • dxuehui
  • dxuehui
  • 2014年09月27日 10:34
  • 1366

meshlab v1.3.4官方版 附使用教程

meshlab中文版是一款开源便携式可扩展程序,可以对点云进行各种操作,比如滤波、降采样、构网、重建等,基于VCG库,当然还可基于其他的一些第三方库进行扩展。支持生成原始数据和3D打印模型功能,非常实...
  • u013066323
  • u013066323
  • 2017年07月28日 09:07
  • 1141

使用visualSFM和meshlab进行三维重建

最近一直在看的三维重建的东西,拿着SIFT-GPU + Bundler + PMVS已经可以重建出稠密的三维点云了,但是怎么用三维点云重建出真正的三维模型还是没有研究过。在网上搜索方法发现meshla...
  • lhanchao
  • lhanchao
  • 2016年08月18日 10:32
  • 10229

meshlab简单实践

meshlab学习初期的简单实践
  • beifangdefengchuilai
  • beifangdefengchuilai
  • 2017年10月15日 20:52
  • 384

利用meshlab构网

meshlab是一个开源的点云处理软件,我们可以利用它对点云进行各种操作,如滤波、降采样、构网、重建等。下面介绍一下利用meshlab的构网过程。(1)首先从网上下载bunny点云文件,利用meshl...
  • hanshuobest
  • hanshuobest
  • 2016年02月27日 13:05
  • 3604

MeshLab源码编译 vs2010+win7 64bit

为了能够方便的使用meshlab的源码,今天特意编辑了一下mesh源码 1.源码bian
  • yannwpu
  • yannwpu
  • 2014年04月14日 15:58
  • 8564

MeshLab和VCG的开发环境配置

Meshlab和VCGlib都是意大利国立研究院的作品,meshlab提供了大量的模型分析与处理的算法,而VCGlib建立了基础的数据结构及其遍历访问的算法,也提供了模型的基本处理算法。VCGlib是...
  • fightingbull
  • fightingbull
  • 2012年10月22日 23:02
  • 8217

meshlabserver+mlx 模型自动化处理

1 介绍meshlabserver是meshlab中一个很有用的插件,其以命令行的方式运行,基本的语法格式为:meshlabserver arg1 arg2 ...其中可用的参数(args)如下: -...
  • Linear_Luo
  • Linear_Luo
  • 2016年09月01日 09:44
  • 1799

MeshLab中Filters菜单下插件的编写

在MeshLab中对其功能的扩展是通过插件来实现的,通过实现不同的接口,可以将插件放在不同的菜单下或工具栏上,在这里只介绍Filter菜单下的插件实现,其他的类似。       1. 首先在mes...
  • fightingbull
  • fightingbull
  • 2012年10月23日 16:29
  • 4105

Meshlab中IO插件编写_使用自已添加的external支持库

一、使用在external中自定义添加的第三方库,如何添加请参考: http://blog.csdn.net/fightingbull/article/details/8143796   对于第...
  • fightingbull
  • fightingbull
  • 2012年11月03日 19:54
  • 2089
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:Compiling Meshlab
举报原因:
原因补充:

(最多只允许输入30个字)