Visual Servoing Platform
version 3.0.0
|
In this tutorial you will learn how to install ViSP from source on Windows 10 with Visual C++. These steps have been tested on Windows 10 (64 bit), with CMake 3.3.2 and Visual Studio Community 2015.
ViSP is interfaced with several 3rd party libraries. The complete list is provided here.
We recommend to install OpenCV 3rd party. Other 3rd parties should be considered only by expert developers.
opencv-3.1.0.exe
pre-build SDK in C:\OpenCV
. The installer opencv-3.1.0.exe extracted all the material in C:\OpenCV\opencv
. C:\OpenCV\opencv\build\x64\vc14
) and also libraries compatible with Visual C++ 2013 (in C:\OpenCV\opencv\build\x64\vc12
). With any other compiler version you need to build yourself OpenCV from source.OpenCV_DIR
environment variable. Start up a command window (in your "Start" menu click on "Run" and type in cmd.exe
) and enter: C:\OpenCV\opencv\build
is where you have the build directory (extracted or built). Inside this folder you should have a file named OpenCVConfig.cmake
.There are different ways to get ViSP source code.
We suppose now that ViSP source is in a directory denoted <source_dir>, for example C:\ViSP\visp
The goal of the configuration step is now to use CMake to produce a Visual Studio C++ solution that will be located in <binary_dir>, for example C:/ViSP/visp-build
.
C:/ViSP/visp-build
folder.C:/ViSP/visp-build/install
. C:/Program
Files
(x86)/ViSP, make sure that you have administrator privileges to write in that folder.
.dll extension). This is the default configuration that is recommended. If you want to create rather a static library (with
.lib extension) you have to uncheck the BUILD_SHARED_LIBS
option to disable DLL creation.C:/ViSP/visp-build
folder you have the Visual Studio VISP.sln
generated solution file.C:/ViSP/visp-build/VISP
.sln solution file. This action will open ViSP project in Visual Studio C++. As shown in the next image, by default, Visual Studio position the solution configuration to Debug
.C:/ViSP/visp-build/install
folder.Debug
configuration.Release
settings. As shown in the next image, select the Release
configuration.C:/ViSP/visp-build/install/x64/vc14/bin
folder you have two versions of ViSP DLL libraries corresponding to ViSP modules; the one suffixed by "d" with debug information, the other one optimized with release compiler options.If you built static libraries then you are done. Otherwise, if you follow this tutorial step by step you need to add the bin folders path to the systems path. This is because you will use ViSP and OpenCV libraries in form of "Dynamic-link libraries" (also known as DLL). Inside these are stored all the algorithms and information the libraries contains. The operating system will load them only on demand, during runtime. However, to do this he needs to know where they are. The systems PATH
variable contains a list of folders where DLLs can be found. Add ViSP and OpenCV libraries path to this and the OS will know where to look if he ever needs the libraries. Otherwise, you will need to copy the used DLLs right beside the applications executable file (exe) for the OS to find it.
To modify the PATH var and add the path to ViSP library, open a cmd terminal and run:
Then to add the path to OpenCV 3rd party libraries location, close and re-open a cmd-terminal and run:
Then close and re-open a cmd terminal to check if the PATH var was well positioned.
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 ViSP-images-x.y.z.zip
. This archive could be downloaded from http://visp.inria.fr/download page. We provide here after the way to install these data if you want to run ViSP examples.
Download ViSP-images-x.y.z.zip from http://visp.inria.fr/download and uncompress it for example in C:/ViSP
.
ViSP examples and tests are able to detect automatically the location of the requested data if you position an environment variable called VISP_INPUT_IMAGE_PATH
. In our case, this variable should be set to C:\ViSP
.
VISP_INPUT_IMAGE_PATH
should not contain the folder ViSP-images
, but the parent folder.From now, you can try to run ViSP examples and tests. For example, if you want to run <binary
dir>/example/device/display/Debug/displayGDI.exe, open a command window, enter in the right folder, and run:
You are now ready to see the next Tutorial: How to create and build a CMake project that uses ViSP on Unix or Windows that will show you how to use ViSP as a 3rd party to build your own project.