PDA

View Full Version : Modify .pro file for OpenCV



mind_freak
6th June 2011, 13:41
hi,
i want to use openCV in my project and previously i have work on it , but unfortunately i forgot what to write in .pro file in addition to use open Cv with my Qt project??

I know only about INCLUDEPATH,but what to write in LIBS:??

bibhukalyana
6th June 2011, 14:36
if you are using linux


LIBS +=/usr/lib64/libcv.so.2.1 \
/usr/lib64/libcvaux.so.2.1 \
/usr/lib64/libcxcore.so.2.1 \
/usr/lib64/libhighgui.so.2.1 \
/usr/lib64/libml.so.2.1


(this is an example.)

similarly you can use the lib file for windows application.

mind_freak
6th June 2011, 15:57
hey thanks...
but m using openCv 2.2

below is my profile.

#-------------------------------------------------
#
# Project created by QtCreator 2011-06-06T19:49:01
#
#-------------------------------------------------

QT += core gui

TARGET = Facedetection
TEMPLATE = app


SOURCES += main.cpp\
facerecognizer.cpp

HEADERS += facerecognizer.h

FORMS += facerecognizer.ui

CONFIG += mobility
MOBILITY =
INCLUDEPATH+=C:\OpenCV2.2\include\opencv \
C:\OpenCV2.2\include\opencv2

LIBS+=C:/OpenCV2.2/lib/*.lib

symbian {
TARGET.UID3 = 0xeebafacd
# TARGET.CAPABILITY +=
TARGET.EPOCSTACKSIZE = 0x14000
TARGET.EPOCHEAPSIZE = 0x020000 0x800000
}

Can you pleas tell me were am i wrong??
I am facing error of "No Such File or Directory"

MarekR22
6th June 2011, 16:38
use slashes no backslash, don't use wild cards in file names

mind_freak
6th June 2011, 18:32
use slashes no backslash, don't use wild cards in file names
thanks...
but still same problem "No Such File or Directory"

C:/QtSDK/Facedetection-build-simulator/../../OpenCV2.2/include/opencv/highgui.h:47: error: opencv2/highgui/highgui_c.h: No such file or directory

bibhukalyana
7th June 2011, 07:22
copy the opencv and opencv2 folder to qt include path.
use the header file as : #include <opencv/highgui.h>
for this you should not add includes in .pro file.