PDA

View Full Version : Error while working with OpenCV



hamykhafan
13th August 2013, 04:38
I am using Opencv 2.2(qt version:5.1 and compiler is vs2010)

when I was trying to write my first program with opencv , I face this error:

RS6010

My source file is simply:


#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
using namespace cv;

int main()
{
Mat image = imread("Untitled.jpg");
namedWindow("OpenCV Test");
imshow("Untitled",image);
waitKey(5000);
return 1;
}


and this is my .pro file:



QT += core

QT -= gui

TARGET = OpenCVTest
CONFIG += console
CONFIG -= app_bundle

TEMPLATE = app


SOURCES += main.cpp

INCLUDEPATH += C:\OpenCV2.2\include\

LIBS += -LC:\OpenCV2.2\lib \
-lopencv_core220 \
-lopencv_highgui220 \
-lopencv_imgproc220 \
-lopencv_features2d220 \
-lopencv_calib3d220



Thanks appreciate any help to get me up and running

alainstgt
13th August 2013, 23:42
change

imshow("Untitled",image);
to

imshow( "OpenCV Test", image );