Ask Your Question
1

how to install opencv with vtk for viz

asked 2016-08-03 09:04:04 -0600

Nbb gravatar image

updated 2016-08-03 10:44:31 -0600

can anyone post a link to a guide or write it down here ? Im going to follow this video to install vtk https://www.youtube.com/watch?v=Igvbh...

how do i make opencv work with vtk after that ? I found this so Im gonna try it out ! http://answers.opencv.org/question/32...

edit retag flag offensive close merge delete

Comments

please add your story, too !

berak gravatar imageberak ( 2016-08-03 11:58:58 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
2

answered 2016-08-03 11:55:22 -0600

berak gravatar image
  1. i'm using mingw, so your details will vary, but the essence of it is: using cmake, building VTK follows pretty much the same process as building opencv.
  2. i got vtk7.0.0 (the src archive).
  3. cd vtk7.0.0; mkdir build; cd build; # the fundamental things apply ..
  4. cmake-gui ..
    • due to mingw64, so i had to specify c++ compiler, make utility, and such (nothing new)
    • it needed 3 configure passes, each one would add like 15 new options (!), i left them all at default.
    • though it's probably a better idea, to build static libs, i did not dare to get experimental (mingw, again), and left it to default(dynamic)
  5. make (build VTK.sln, or whatever it generates) # ...as time goes by ...
  6. (an hour later) make install (build INSTALL project). you need to be admin for that ! (because the default is "C:\Program Files (x86)\VTK", maybe it's wise to choose a different CMAKE_INSTALL_PREFIX here)
  7. hey, done with VTK !
  8. back to opencv / cmake. make sure, you have WITH_VTK set and VTK_DIR pointing to your install folder
  9. make && make install. yikes, it really build the viz module (opencv_viz310.a in my case) ! xD
  10. add "C:\Program Files (x86)\VTK\bin" to the PATH env var, so it finds all the dlls at runtime
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-08-03 09:04:04 -0600

Seen: 10,476 times

Last updated: Aug 03 '16