PDA

View Full Version : Linking NokiaQT with OpenCV



tan88122
13th March 2011, 07:06
Hello. I been looking through the internet on how to link third party libraries (openCV) with NokiaQT. But I find very limited information.
http://developer.qt.nokia.com/wiki/OpenCV_with_Qt [developer.qt.nokia.com]
http://www.qtcentre.org/threads/38861-OpenCV-integration-with-Qt-creator [qtcentre.org]

The official website(OpenCV [opencv.willowgarage.com]) describe on how to integrate OpenCV with IDE.

1. Include Directories… add: ‘C:\OpenCV2.1\include\opencv;’
2. Library Directories… add: ‘C:\OpenCV2.1\lib;’
3. Source Directories… add: ‘C:\OpenCV2.1\src\cv; C:\OpenCV2.1\src\cvaux; C:\OpenCV2.1\src\cxcore; C:\OpenCV2\src\highgui; C:\OpenCV2.1\src\ml;’

For Debug Builds.. add: ‘cv210d.lib; cxcore210d.lib; highgui210d.lib;’ * For Release Builds.. add: ‘cv210.lib; cxcore210.lib; highgui210.lib;’

So the question is how to integrate it on NokiaQT. Below is my pro.file


#-------------------------------------------------
#
# Project created by QtCreator 2011-03-12T01:59:47
#
#-------------------------------------------------


QT += core gui

TARGET = cubaanImage
TEMPLATE = app


SOURCES += main.cpp\
mainwindow.cpp

HEADERS += mainwindow.h

FORMS += mainwindow.ui

CONFIG += mobility
MOBILITY =


INCLUDEPATH += C:/OpenCV2.1/include/opencv \
C:/OpenCV2.1/src/cv \
C:/OpenCV2.1/src/cvaux \
C:/OpenCV2.1/src/cxcore \
C:/OpenCV2.1/src/highgui \
C:/OpenCV2.1/src/ml \


LIBS += -LC:/OpenCV2.1/lib

LIBS += -lcv210d -lcxcore210d -lhighgui210d



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

Can someone tell me did I link it correctly and also one of my path have the word “include” -> C:\OpenCV2.1\include\opencv;
it shows a yellow label on include in the NokiaQT. How to solve it thanks ^^

cincirin
14th March 2011, 07:16
Below is my application project linked with OpenCV 2.2

...
OPENCV_DIR = ../../../../LIBS/OpenCV/OpenCV-2.2

INCLUDEPATH += \
$$OPENCV_DIR/include \
$$OPENCV_DIR/modules/core/include \
$$OPENCV_DIR/modules/imgproc/include \
$$OPENCV_DIR/modules/video/include \
$$OPENCV_DIR/modules/features2d/include \
$$OPENCV_DIR/modules/flann/include \
$$OPENCV_DIR/modules/calib3d/include \
$$OPENCV_DIR/modules/objdetect/include \
$$OPENCV_DIR/modules/legacy/include \
$$OPENCV_DIR/modules/highgui/include \
$$OPENCV_DIR/modules/ml/include \
$$OPENCV_DIR/modules/contrib/include

LIBS = \
-L$$OPENCV_DIR/modules/core/lapack/$$CONFDIR \
-L$$OPENCV_DIR/modules/core/$$CONFDIR \
-L$$OPENCV_DIR/modules/highgui/$$CONFDIR \
\
-lopencv_lapack \
-lopencv_core \
-lopencv_highgui

win32: LIBS += -lvfw32 -lole32