Hello,
I am trying to use OpenCV for the first time. I'm not getting.
I'm following in the steps of the forum comments here.
My .pro:
QT += core
QT -= gui
TARGET = vision
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
SOURCES += main.cpp
INCLUDEPATH += E:/OpenCV2.3/opencv/modules/core/include \
E:/OpenCV2.3/opencv/modules/highgui/include
LIBS += -L"E:/OpenCV2.3/build/x64/mingw/bin"
LIBS += -lopencv_core230 -lopencv_highgui230
QT += core
QT -= gui
TARGET = vision
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
SOURCES += main.cpp
INCLUDEPATH += E:/OpenCV2.3/opencv/modules/core/include \
E:/OpenCV2.3/opencv/modules/highgui/include
LIBS += -L"E:/OpenCV2.3/build/x64/mingw/bin"
LIBS += -lopencv_core230 -lopencv_highgui230
To copy to clipboard, switch view to plain text mode
My main.cpp:
#include <QtCore/QCoreApplication>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/core/core.hpp>
int main(int argc, char *argv[])
{
cv::Mat image = cv::imread("C:\teste.jpg");
cv::namedWindow("My Image");
cv::imshow("My Image", image);
cv::waitKey(-1);
return 0;
}
#include <QtCore/QCoreApplication>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/core/core.hpp>
int main(int argc, char *argv[])
{
cv::Mat image = cv::imread("C:\teste.jpg");
cv::namedWindow("My Image");
cv::imshow("My Image", image);
cv::waitKey(-1);
return 0;
}
To copy to clipboard, switch view to plain text mode
The following error occurs when you make the release:
E:/OpenCV2.3/build/x64/mingw/bin/libopencv_core230.dll: file not recognized: File format not recognized
collect2: ld returned 1 exit status
make[1]: *** [debug\vision.exe] Error 1
make[1]: Leaving directory `C:/Users/Danilo Pena/Meus Programas Qt/CV/vision'
make: *** [debug] Error 2
always this occurs:
E:/OpenCV2.3/build/x64/mingw/bin/libopencv_core230.dll: file not recognized: File format not recognized
My OpenCV installed on:
E:/OpenCV2.3/
Thanks.
Added after 1 22 minutes:
I had forgotten to make mingw32-make.
Error continues.
My .pro:
QT += core
QT -= gui
TARGET = vision
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
SOURCES += main.cpp
INCLUDEPATH += E:/OpenCV2.3/opencv/modules/core/include \
E:/OpenCV2.3/opencv/modules/highgui/include
LIBS += "E:\OpenCV2.3\build\lib\libopencv_core230.dll.a" \
LIBS "E:\OpenCV2.3\build\lib\libopencv_highgui230.dll.a"
QT += core
QT -= gui
TARGET = vision
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
SOURCES += main.cpp
INCLUDEPATH += E:/OpenCV2.3/opencv/modules/core/include \
E:/OpenCV2.3/opencv/modules/highgui/include
LIBS += "E:\OpenCV2.3\build\lib\libopencv_core230.dll.a" \
LIBS "E:\OpenCV2.3\build\lib\libopencv_highgui230.dll.a"
To copy to clipboard, switch view to plain text mode
New erro:
:: error: LIBS: No such file or directory
:: error: LIBS: No such file or directory
To copy to clipboard, switch view to plain text mode
Bookmarks