Install OpenCV to Eclipse for Window (with built OpenCV2.4.9)

Environment
Eclipse - Luna
MinGW - 4 Dec 2013 (x86 compiler)
OpenCV - 3.0
CMake - 3.4

/ Update 31/05/17 /
Here is the built OpenCV 2.4.9 with MinGW.

Using Eclipse - MinGW insert of visual studio for programming. The following is remarking on compiling OpenCV from source.

Follow the step [Building the Library] below YouTube.

About 3,4
TortoiseGit needs Git for windows to clone from the internet, so install both.

Skip 6.
MinGW is x86 compiler, if you want to install other library, choose 32-bits.

About 7
Select Eclipse - MinGW insert of VisualStudio.

To install OpenNI2

Because environment variable mismatch, insert OPEN_NI_INSTALL_PATH, OPENNI2_INCLUDE_DIR and OPENNI2_LIB_DIR manually.


Config CMake (Run as admin, otherwise errors occurs).

After Generate, Open Eclipse Project Explorer->Exsting Projects into Workspace->Finish
Then Open make target, build install, all.


Error while compiling OpenNI2, so I made these modification, effect: unknown.
OniPlatform.h
warning OpenNI Platform Abstraction Layer - Win32 - Microsoft Visual Studio version below 2003 (7.0) are not supported!


OniPlatformWin32.h
#ifdef _MSC_VER
#include <crtdbg.h>
#else
#define _ASSERT(expr) ((void)0)

#define _ASSERTE(expr) ((void)0)
#endif





Follow Using OpenCV with Eclipse(pluin CDT)

About 3.
Choose MinGW

About 7.
header change
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>

About 8.
a. In GCC C++ Compiler, add 4 paths from OpenCV directory

"D:\Library\OpenCV\Builds\install\include"
"D:\Library\OpenCV\Builds\install\include\opencv2"


b. In GCC C++ linker, add \builds\bin in Library search path and add libraries

"libopencv_highgui300"
"libopencv_core300"
"libopencv_imgproc300"
"libopencv_imgcodecs300"






留言

此網誌的熱門文章

[OpenCV] RAW rgb data to IplImage | 以rgb原始資料建立IplImage指標

Monitoring System Spec.& IO Mapping

突如奇來的高科技電子零件