forked from lagadic/visp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tutorial-install-opensuse.doc
294 lines (241 loc) · 9.6 KB
/
tutorial-install-opensuse.doc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
/**
\page tutorial-install-opensuse Tutorial: Installation from source on Linux openSUSE
\tableofcontents
In this tutorial you will learn how to install ViSP from source on openSUSE. These steps have been tested for openSUSE 14.1 (x86_64) distribution, but should work with any other distribution as well.
\note Concerning ViSP installation, we provide also other \ref tutorial.
\section install_opensuse_required Install prerequisities
- gcc 4.4.x or later. This can be installed with:
\code
sudo zypper install gcc-c++
\endcode
- CMake 2.6 or higher that could be installed with:
\code
sudo zypper install cmake
\endcode
- Git if you want to get the source code from http:https://github.com/lagadic/visp
\code
sudo zypper install git-core
\endcode
\section install_opensuse_3rdparty Install 3rd parties
ViSP is interfaced with several 3rd party libraries. The <a href="http:https://visp.inria.fr/software-architecture">complete list is provided here</a>.
\subsection install_opensuse_3rdparty_recommended Recommended 3rd parties
We recommend to install the following:
- OpenCV
\code
sudo zypper install opencv-devel
\endcode
- libX11 to be able to open a window to display images
\code
sudo zypper install libX11-devel
\endcode
- lapack to benefit from optimized mathematical capabilities
\code
sudo zypper install lapack-devel
\endcode
- libv4l to grab images from usb or analogic cameras
\code
sudo zypper install libv4l-devel
\endcode
- libxml2 to be able to configure the model-based trackers from xml files
\code
sudo zypper install libxml2-devel
\endcode
\subsection install_opensuse_3rdparty_other Other optional 3rd parties
We give also the way to install other 3rd party libraries to enable specific capabilities.
- libjpeg and libpng to support jpeg and png images (only useful if OpenCV is not installed)
\code
sudo zypper install libjpeg8-devel libpng-devel
\endcode
\section install_opensuse_install_visp Install ViSP from source code
\subsection install_opensuse_get_source Getting ViSP source code
There are different ways to get ViSP source code:
- You can download the <a href="http:https://visp.inria.fr/download">latest release</a> as a zip or a tarball. Once downloaded, uncompress the file using either
\code
tar xvzf visp-x.y.z.tar.gz
\endcode
or
\code
unzip visp-x.y.z.zip
\endcode
- You can also download a <a href="http:https://visp.inria.fr/download#snapshot">daily snapshot</a>. Once downloaded, uncompress the file using
\code
tar xvzf visp-snapshot-yyyy-mm-dd.tar.gz
\endcode
- Or you get the cutting-edge ViSP from <a href="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/lagadic/visp">GitHub repository</a> using the following command
\code
$ git clone https://github.com/lagadic/visp.git
\endcode
We suppose now that ViSP source is in a directory denoted \<source_dir\>, for example \c $HOME/visp
\subsection install_opensuse_config Configuring ViSP from source
- Create first a directory denoted \<binary_dir\> where you want to build ViSP. This directory will contain generated Makefiles, object files, and output libraries and binaries.
\code
cd $HOME; mkdir visp-build
\endcode
- Enter the \<binary_dir\> and configure the build:
\code
cd $HOME/Vvisp-build
cmake ../visp
\endcode
A more versatile way to configure the build is to use \c ccmake, the CMake GUI:
\code
ccmake ../visp
\endcode
The following image shows that this command allows to configure (just by pressing [c] key) the build in a more advanced way where some options could be easily turned On/Off. It allows also to see which are the 3rd parties that will be used. To generate the makefiles, just press [g] key in the ccmake gui.
\image html img-ccmake-ubuntu-all.png Snapshot of the ccmake \c ../visp command used to configure ViSP.
\subsection install_opensuse_build Building ViSP from source
- To build ViSP proceed with:
\code
make -j4
\endcode
- To install ViSP proceed with:
\code
sudo make install
\endcode
- To build ViSP documentation, you have first to install Doxygen package:
\code
sudo zypper install doxygen graphviz
\endcode
Then you can proceed with:
\code
make -j4 visp_doc
\endcode
\section install_opensuse_dataset Install ViSP dataset
Some ViSP examples and tests require data (images, video, models) that are not part of ViSP source code but available in a separate archive named \c ViSP-images-x.y.z.zip. This archive could be downloaded from http:https://visp.inria.fr/download page. We provide here after the way to install these data if you want to run ViSP examples.
\code
cd $HOME
unzip ViSP-images-x.y.z.zip
\endcode
We suppose now that the data are located in \c $HOME/ViSP-images.
\code
$ ls $HOME/ViSP-images
Klimt README.md circle ellipse iv mbt mire-2
LICENSE.txt calibration cube ellipse-1 line mire video
\endcode
Set \c VISP_INPUT_IMAGE_PATH environment variable to help ViSP examples and tests to find the location of the data set. It's convenient if the environment variables is automatically added to your bash session every time a new shell is launched:
\code
echo "export VISP_INPUT_IMAGE_PATH=$HOME" >> ~/.bashrc
source ~/.bashrc
\endcode
\note For historical reasons \c VISP_INPUT_IMAGE_PATH should not contain the folder \c ViSP-images, but the parent folder.
From now, you can try to run ViSP examples and tests. For example you can run \c displayX example that should open a windows with Klimt painting image and some overlay drawings:
\code
$ cd $HOME/visp-build
$ ./example/device/display/displayX
A click to close the windows...
A click to display a cross...
Cross position: 201, 441
A click to exit the program...
Bye
\endcode
\section install_opensuse_tips Tips and tricks
\subsection install_opensuse_tips_uninstall How to uninstall ViSP
After ViSP installation, you can remove installed material using:
\code
$ sudo make uninstall
\endcode
\subsection install_opensuse_tips_modules How to build only ViSP libraries
If you want to build only ViSP modules libraries, nor the examples, tutorials and tests:
\code
$ make -j4 visp_modules
\endcode
\subsection install_opensuse_tips_module_once How to build a ViSP specific module
If you want to build a given module and all the dependencies:
\code
$ make -j4 visp_<module_name>
\endcode
For example to build the model-based tracker module named mbt, run:
\code
$ make -j4 visp_mbt
\endcode
\subsection install_opensuse_tips_target Which are the targets that could be run with make ?
To know which are the target available with \c make:
\code
$ make help | grep visp
... visp_tests
... visp_demos
... visp_tutorials
... visp_examples
... visp_modules
... visp_doc
... visp_core
... visp_detection
... visp_robot
... visp_sensor
... visp_vision
... visp_vs
... visp_ar
... visp_mbt
... visp_tt
... visp_tt_mi
\endcode
\subsection install_opensuse_tips_3rd_party Which are the 3rd party libraries that are used in ViSP ?
To see which are the optional 3rd parties that are found during the configuration stage and that will be used by ViSP during the build you can have a look to the text file named \c ViSP-third-party.txt and located in \<binary_dir\>. We provide hereafter an example of a possible content of this file:
\code
ViSP third-party libraries
Below you will find the list of third party libraries used to
build ViSP on your computer.
Mathematics:
Gnu Scientific Library : yes
Lapack/blas : yes
Simulator:
Ogre simulator : no
\- Ogre3D : no
\- OIS : no
Coin simulator : no
\- Coin3D : no
\- SoWin : no
\- SoXt : no
\- SoQt : no
\- Qt4 : no
\- Qt3 : no
Robots
Afma6 : no
Afma4 : no
Biclops : no
Ptu46 : no
Pioneer : no
Viper S650 : no
Viper S850 : no
Video devices (display)
X11 : no
GTK : no
OpenCV : yes
GDI : no
Direct3D : no
Framegrabbers
Firewire libdc1394-2.x : yes
Video For Linux Two : no
DirectShow : no
CMU 1394 Digital Camera SDK : no
OpenCV : yes
Specific devices
Yarp : no
Kinect : yes
\-libfreenect : yes
\-libusb-1.0 : yes
\-pthread : yes
Video and image Read/Write:
FFMPEG : no
libjpeg : yes
libpng : yes
Misc:
XML2 : yes
pthread : yes
OpenMP : no
zbar : no
dmtx : yes
Documentation:
Doxygen : no
Graphviz dot : no
ViSP built with C++11 features: no
\endcode
\section install_opensuse_issues Known issues
\subsection install_opensuse_issues_libjpeg libjpeg.so.8 may conflict with libjpeg.so.62
Note that with openSUSE 12.04 but also with 13.02, libjpeg-devel package lead to libjpeg62.so installation, that may conflict with libjpeg8.so that is also installed. That's why we recommend to not install libjpeg-devel, but rather install libjpeg8-devel.
\code
Linking CXX executable HelloWorld
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: warning: libjpeg.so.8, needed by /usr/lib64/libopencv_highgui.so.2.4.9, may conflict with libjpeg.so.62
\endcode
\section install_opensuse_next Next tutorial
You are now ready to see the next \ref tutorial-getting-started that will show you how to use ViSP as a 3rd party to build your own project.
*/