1
我從opencv網站下載了OpenCV 2.4.6。爲了避免這個問題我mentioned before,我決定編譯OpenCV庫。 CMake和Mingw32-make後,編譯成功。但是,當顯示jpeg圖像時,一個簡單的測試程序會崩潰。這是我的.pro和main.cpp的文件:「無法在函數IntGetProcAddress中加載OpenGL擴展[glBindBuffer]」Qt中的OpenCV異常
的.pro:
TEMPLATE = app
CONFIG += console
CONFIG -= app_bundle
CONFIG -= qt
SOURCES += main.cpp
#INCLUDEPATH += D:/opencv2.4.6/build/include
INCLUDEPATH += D:/opencv2.4.6/release/install/include
LIBS += -LD:/opencv2.4.6/release/install/bin \
-lopencv_core246 \
-lopencv_highgui246 \
-lopencv_imgproc246 \
-lopencv_features2d246 \
-lopencv_calib3d246
main.cpp中:
int main() {
Mat input = imread("Z:/1.jpg");
cv::imshow("1.jpg",input);
}
這裏的問題是:
OpenCV Error: OpenGL API call (Can't load OpenGL extension [glBindBuffer]) in In
tGetProcAddress, file ..\..\..\modules\core\src\gl_core_3_1.cpp, line 141
terminate called after throwing an instance of 'cv::Exception'
what(): ..\..\..\modules\core\src\gl_core_3_1.cpp:141: error: (-219) Can't lo
ad OpenGL extension [glBindBuffer] in function IntGetProcAddress
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
我以前從未遇到過這樣的問題。這有點奇怪。我該怎麼做才能擺脫這個問題?