March 12, 2011

tanclanship tanclanship
Lab Rat
24 posts

[solved] Linking Nokia Qt with OpenVC

Page  
1

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

  1. #-------------------------------------------------
  2. #
  3. # Project created by QtCreator 2011-03-12T01:59:47
  4. #
  5. #-------------------------------------------------
  6.  
  7.  
  8. QT       += core gui
  9.  
  10. TARGET = cubaanImage
  11. TEMPLATE = app
  12.  
  13.  
  14. SOURCES += main.cpp\
  15.       mainwindow.cpp
  16.  
  17. HEADERS  += mainwindow.h
  18.  
  19. FORMS    += mainwindow.ui
  20.  
  21. CONFIG += mobility
  22. MOBILITY =
  23.  
  24.  
  25. INCLUDEPATH += C:/OpenCV2.1/include/opencv \
  26.                 C:/OpenCV2.1/src/cv \
  27.                  C:/OpenCV2.1/src/cvaux \
  28.                 C:/OpenCV2.1/src/cxcore \
  29.                  C:/OpenCV2.1/src/highgui \
  30.                  C:/OpenCV2.1/src/ml \
  31.  
  32.  
  33. LIBS += -LC:/OpenCV2.1/lib
  34.  
  35. LIBS += -lcv210d -lcxcore210d -lhighgui210d
  36.  
  37.  
  38.  
  39. symbian {
  40.     TARGET.UID3 = 0xe62189e7
  41.     # TARGET.CAPABILITY +=
  42.     TARGET.EPOCSTACKSIZE = 0x14000
  43.     TARGET.EPOCHEAPSIZE = 0x020000 0x800000
  44. }

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 ^^

36 replies

March 13, 2011

tanclanship tanclanship
Lab Rat
24 posts

Hope someone can help.

March 13, 2011

tanclanship tanclanship
Lab Rat
24 posts

I tried to integrate OpenCV with NokiaQT
When debug it , the NokiaQT did not show the emulator. At the bottom of my

Application Output Shows :
C:\NokiaQtSDK\PSM\cubaanImage-build-simulator\release\cubaanImage.exe exited with code -1072365566

Compile Output :
The process “C:/NokiaQtSDK/mingw/bin/mingw32-make.exe” exited normally.

Any ideas ? ^^

Edit: merged this question from a separate post into this thread; Andre

March 13, 2011

Scylla Scylla
Lab Rat
238 posts

On my mac I have just this in my *.pro file

  1. INCLUDEPATH += /usr/local/include/opencv
  2. LIBS += -lopencv_highgui

Take a look here [qt-apps.org]

March 14, 2011

tanclanship tanclanship
Lab Rat
24 posts

Scylla. I presume that you been using this for your project and it runs normally.Does it ?

March 14, 2011

Scylla Scylla
Lab Rat
238 posts

Yes it runs normally. But I see you are using the symbian. I’m not in touch with symbian. Do you need a cross compiler for symbian, if yes do you have corss compiled the opencv libs?

March 14, 2011

tanclanship tanclanship
Lab Rat
24 posts

What is a cross compiler ? Can you explain it to me ? I think my OpenCV does not have it

March 14, 2011

Andre Andre
Area 51 Engineer
6031 posts

tanclanship wrote:
What is a cross compiler ? Can you explain it to me ?

A cross compiler [en.wikipedia.org] is compiler that runs on platform A to produce binaries for platform B.

So, in order to produce software that runs on Symbian, you probably will be needing a cross compiler that runs on your desktop and that produces binaries for Symbian, as you don’t want want to compile your software on the device itself, I’d say :)

 Signature 

Looking for Qt developers to join our team @ i-Optics: https://qt-project.org/forums/viewthread/25393/

March 14, 2011

tanclanship tanclanship
Lab Rat
24 posts

Andre -> Thanks for the information. Do NokiaQT could perform cross compiler on other third party libraries too ?

March 14, 2011

Andre Andre
Area 51 Engineer
6031 posts

tanclanship wrote:
Andre -> Thanks for the information. Do NokiaQT could perform cross compiler on other third party libraries too ?

I would imagine that an installed cross compilation tool chain would work for third party libraries too, if these libraries can be compiled for the different platform. For instance, if your library makes use of x86 specific functionality, then you can not expect to be able to compile and/or run it successfully on an ARM based device.

 Signature 

Looking for Qt developers to join our team @ i-Optics: https://qt-project.org/forums/viewthread/25393/

March 14, 2011

tanclanship tanclanship
Lab Rat
24 posts

Andre -> I see. then the libraries do can be compile at different platforms . But problem again is that I do now know how to do it(refer first post). Thanks again

Me -> Will be waiting here patiently for someone to solve the OpenCV and NOkiaQT problem.Been killing me

March 14, 2011

Andre Andre
Area 51 Engineer
6031 posts

tanclanship wrote:
Andre -> I see. then the libraries do can be compile at different platforms . But problem again is that I do now know how to do it(refer first post). Thanks again

I have no experience with this library, so I can’t help you there.

Me -> Will be waiting here patiently for someone to solve the OpenCV and NOkiaQT problem.Been killing me

I doubt that is a very effective strategy. I’d keep trying to find a solution myself, with lots of googling, posting in relevant forums, looking for relevant mailing lists, trying for relevant IRC channels, and if all else fails, even trying to email the author of the OpenCV library and politely asking where you might find pointers to solve your problem. The internet is a big place, and DevNet is not the only place where you might unearth solutions to your problems.

 Signature 

Looking for Qt developers to join our team @ i-Optics: https://qt-project.org/forums/viewthread/25393/

March 14, 2011

Gerolf Gerolf
Area 51 Engineer
3210 posts

You can create a project qith QMake for the sources to compile (should also work with non Qt projects). You can use qmake -project for that. Then you can compile for the needed platform as you do with all other projects in QtCreator…

 Signature 

Nokia Certified Qt Specialist.
Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

March 14, 2011

cincirin cincirin
Ant Farmer
387 posts

Below is my application project linked with OpenCV 2.2 (It works like a charm with 2 cameras attached)


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

March 14, 2011

Gerolf Gerolf
Area 51 Engineer
3210 posts

this is the project file of your app, not for openVC.
You have to build OpenVC for the target platform.

So: get the source of OpenVC and compile it for your target platform.

 Signature 

Nokia Certified Qt Specialist.
Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

March 14, 2011

cincirin cincirin
Ant Farmer
387 posts

I have compiled all modules from OpenCV 2.2 in Windows 7 and Ubuntu 64 bits.
All the modules I’ve compiled with QtCreator. They are: lapack, core, contrib, calib3d, features2d, flann, gpu, haartraining, highgui, imgproc, legacy, ml, objdetect, traincascade, video.

My application is linked with OpenCV with Qt project described above.

Page  
1

  ‹‹ GLib based event dispatcher: how to compile it from QT Everywhere source code?      QSqldatabase and QT creator ››

You must log in to post a reply. Not a member yet? Register here!