How to build viz module with VTK 9.0.1?
Hi all.
I would like to build OpenCV with viz module using VTK 9.0.1.
Environments:
- OS: Windows 10 x64
- IDE: Visual Studio 2015
- SDK: OpenCV 4.4.0, VTK 9.0.1
- CMake: 3.17.0-rc1
I referred this link: https://answers.opencv.org/question/1...
I tried as below procedure :
//VTK
- Download VTK-9.0.1.tar.gz file and unzip to 'vtk_sources' folder.
- Create 'vtk_bin' folder.
- Run CMake program as a administrator and set the 'vtk_sources' path to 'source code', 'vtk_bin' path to 'binaries'.
- Click the 'Configure' button and select 'Visual Studio 2015', 'x64'.
- Select VTK default option and click the 'Generate' button.
- Run VTK.sln in the vtk_bin folder as a administrator.
- Build 'ALL_BUILD' and 'INSTALL'.
- Succeeded to create a library and it works well.
//OpenCV
- Download opencv-4.4.0-vc14_vc15.exe file and run.
- Copy the 'sources' file to 'opencv_sources' folder.
- Create 'opencv_bin' folder.
- Run CMake program as a administrator and set the 'opencv_sources' path to 'source code', 'opencv_bin' path to 'binaries'.
- Click the 'Configure' button and select 'Visual Studio 2015', 'x64'.
- Set the VTK_DIR to 'vtk_bin' folder.
- Check the 'WITH_VTK'.
- Uncheck the 'BUILD_opencv_world'.
- Click the 'Generate' button.
- Run OpenCV.sln in the opencv_bin folder as a administrator.
- Build 'ALL_BUILD' and 'INSTALL'.
- Succeeded to create a library and it works well.
- But 'include/opencv2/' has no viz.hpp file. I can't find the 'viz' file.
I have been trying to build the OpenCV with viz for a week. But I couldn't find any solution.
Could you please help me?
Thank you.
the viz module is from opencv_contrib, did you miss that ?
-
I found that I missed opencv_contrib. and I'm trying to build the OpenCV 4.4.0 with VTK 9.0.1 and opencv_contrib 4.4.0. But the error occurred.
^^ can you edit your question, and put errors there, please ? (comments are far too limited for this task)
I'm facing the same issue. Please post an answer if found. Or if previous version is compatible ( either earlier version of opencv or earlier version version of vtk) whichever is closest please let me know,
see https://answers.opencv.org/question/1...