我一直在尝试为我的 Windows 7 64 位安装 opencv。我的基本目标是在 C 语言中使用 opencv。我有 borland 和 mingw 编译器。我完全按照描述使用了 Windows 7 上的 OpenCV 2.4 和 MinGW 入门指南。但我不断收到以下回复:
C:\Users\Rachit Dell\Pictures>g++ -I"C:\opencv\build\include" -L"C:\opencv\build
\x86\mingw\lib" loadimg.cpp -lopencv_core240 -lopencv_highgui240 -o loadimg
loadimg.cpp:1:39: error: opencv2/highgui/highgui.hpp: No such file or directory
loadimg.cpp:4: error: 'cv' is not a namespace-name
loadimg.cpp:4: error: expected namespace-name before ';' token
loadimg.cpp: In function 'int main(int, char**)':
loadimg.cpp:9: error: 'Mat' was not declared in this scope
loadimg.cpp:9: error: expected ';' before 'im'
loadimg.cpp:10: error: 'im' was not declared in this scope
loadimg.cpp:16: error: 'im' was not declared in this scope
loadimg.cpp:16: error: 'imshow' was not declared in this scope
loadimg.cpp:17: error: 'waitKey' was not declared in this scope
我使用的是 2.4.2 版。
有人可以指导我。我只需要设置一个 IDE 就可以在 C 中编译 opencv。
谢谢