opencv in eclipse

Personally I would prefer Eclipse in linux platform, as in windows it's much easier to use visual studio instead. What's more, it's quite hard to build your own version for eclipse with opencv for windows.

In linux platform (taking mint as an example), to install the Eclipse CDT version and opencv, use those code:
sudo apt-get install eclipse-cdt
sudo apt-get install build-essential
sudo apt-get install libcv-dev

Now the default version of opencv should be 2.1.0. If you want to install version like 2.3.1 you have to install manually from .bin or so.

When creating a new project you should modify the properties with "/usr/include/opencv" in gcc and g++ directories, also "/usr/lib" for library and "cv, cxcore, highgui" included.

When testing program here's an error: couldn't display image, but it's alright to debug. the final solution is modify the run configuration and create a new value called "DISPLAY" in environment with the value ":0.0". Then everything would be all right.

posted @ 2012-04-27 21:22  joywelt  阅读(190)  评论(0编辑  收藏  举报