Ask Your Question

Trying to configure OpenCV 3.1 Viz Module with Visual Studio 2015

asked 2017-03-22 15:39:15 -0500

Heen gravatar image

Hello all,

I am currently trying to configure my Visual Studio to work with the Viz module for OpenCV for a 3D scanning project I have been working on. My build of OpenCV only had a build and sources folder. I added the viz.hpp and corresponding headers to the opencv2 directories within the include folder and it shows no errors. I am getting an error when trying to build my project saying that there are some unresolved external symbols, which make sense as there isn't a definition for some of these declared methods, which point to the needed module folder viz. In the viz folder, it contains all the C++ files for the needed headers, I am just struggling to make them visible to the project. Adding them to the included source directories of my properties file seemed to not change the error.

Tl;dr version: I need to configure Visual Studio to recognize and source the Viz module properly.

Any help would be greatly appreciated!

edit retag flag offensive close merge delete


use cmake gui.

first donwload vtk and compile it. then clone opencv run cmakegui. Compile opencv

LBerger gravatar imageLBerger ( 2017-03-22 15:49:48 -0500 )edit

I'm not sure if it worked, I was able to compile both of them and in the resulting opencv folder there is no build or source folder present and there's a bunch of install VC++ files in every directory along with cmake directories. I am using Visual Studio to compile the code.

Heen gravatar imageHeen ( 2017-03-23 12:51:04 -0500 )edit

"I was able to compile " have you build opencv with samples? have you got dll in bin/debug or bin/release

LBerger gravatar imageLBerger ( 2017-03-23 13:10:03 -0500 )edit

I am not seeing a build folder with samples. I am getting the debug and release folders ( ( but I am not seeing the build or source folder like in the common .exe installer for windows that I would expect for including in Visual Studio ( . Thank you for your help LBerger with this, I've been really struggling

Heen gravatar imageHeen ( 2017-03-25 12:33:19 -0500 )edit

in this folder have you got opencv_viz320 ?

LBerger gravatar imageLBerger ( 2017-03-25 15:46:10 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2017-03-25 15:53:59 -0500

LBerger gravatar image

updated 2017-03-25 16:03:43 -0500

I made some video. I supposed that you have already build Vtk in g:/lib/vtk/build using cmake

1 Clone opencv

2 Clone opencv_contrib

3 Use Cmake first part and second part

4 build opencv using VS 2015 without CUDA and withvtk

edit flag offensive delete link more


If there is no sensitive information, you could consider hosting your videos as tutorial videos on a more generic platform like YouTube.

Eduardo gravatar imageEduardo ( 2017-03-25 18:49:05 -0500 )edit

You're tutorial worked well! I didn't use the opencv_contrib when building my solution the first time. Thanks!

Heen gravatar imageHeen ( 2017-03-29 13:11:33 -0500 )edit

Question Tools

1 follower


Asked: 2017-03-22 15:39:15 -0500

Seen: 1,055 times

Last updated: Mar 25 '17