[Insight-users] OpenCV and Video

Kevin Keraudren kevin.keraudren10 at imperial.ac.uk
Tue Mar 6 09:44:11 EST 2012


Hi,
You have to ask cmake to build specifically the ITKOpenCVBridge.
In the "build" directory you created, after running "cmake ..", you need
to edit CMakeCache.txt .
You can get some ideas on
http://www.itk.org/Wiki/ITK_Configuring_and_Building
But the main thing you will need are (do a search for "opencv" in
CMakeCache.txt):

//Request building ITKVideoBridgeOpenCV
Module_ITKVideoBridgeOpenCV:BOOL=ON

//The directory containing a CMake configuration file for OpenCV.
OpenCV_DIR:PATH=/usr/local/share/opencv

Maybe you could also use "ccmake .." to set them.

Kind regards,

Kevin

Le 06/03/2012 12:16, 小刚 a écrit :
> Hi all !
> I'm new to ITK, but I'm quit familiar with OpenCV. I want to use
> OpenCV and ITK together, so I installed ITK. But when I ran the
> ITK-OpenCV-Bridge-Tutorial, it complains that can't find some headers,
> just like this:
>
> /home/zeta/ITK-OpenCV-Bridge-Tutorial/Exercises/ITKOpenCVBridge/exercise1/BasicFilteringITKOpenCVBridge.cxx:25:34:
> fatal error: itkOpenCVImageBridge.h: No such file or directory
> compilation terminated.
> make[2]: ***
> [Exercises/ITKOpenCVBridge/exercise1/CMakeFiles/BasicFilteringITKOpenCVBridge.dir/BasicFilteringITKOpenCVBridge.cxx.o]
> Error 1
> make[1]: ***
> [Exercises/ITKOpenCVBridge/exercise1/CMakeFiles/BasicFilteringITKOpenCVBridge.dir/all]
> Error 2
> make: *** [all] Error 2
>
> I think I had installed ITK the usual way, like :
> cd /path/to/ITK/source
> mkdir build
> cmake ..
> make
> make install
>
> I could find the Video module in the source, But can't find headers in
> /usr/local/ITK4.0. I should put something there, but i think "make
> install" would do that.
> Hope someone could explain it, with a good solution.
> ――
> 美丽有两种:
> 一是深刻又动人的方程,
> 一是你泛着倦意淡淡的笑容。
>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120306/1eec0868/attachment.htm>


More information about the Insight-users mailing list