Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [solved] Linking Nokia Qt with OpenVC
Forum Updated to NodeBB v4.3 + New Features

[solved] Linking Nokia Qt with OpenVC

Scheduled Pinned Locked Moved Mobile and Embedded
37 Posts 9 Posters 20.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tanclanship
    wrote on last edited by
    #11

    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

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #12

      [quote author="tanclanship" date="1300092807"]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[/quote]
      I have no experience with this library, so I can't help you there.
      [quote]
      Me -> Will be waiting here patiently for someone to solve the OpenCV and NOkiaQT problem.Been killing me[/quote]
      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.

      1 Reply Last reply
      0
      • G Offline
        G Offline
        giesbert
        wrote on last edited by
        #13

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

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

        1 Reply Last reply
        0
        • C Offline
          C Offline
          cincirin
          wrote on last edited by
          #14

          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

          1 Reply Last reply
          0
          • G Offline
            G Offline
            giesbert
            wrote on last edited by
            #15

            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.

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

            1 Reply Last reply
            0
            • C Offline
              C Offline
              cincirin
              wrote on last edited by
              #16

              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.

              1 Reply Last reply
              0
              • G Offline
                G Offline
                giesbert
                wrote on last edited by
                #17

                You are at a mobile forum,
                are you building for mobile?
                or for win7 and Ubuntu 64 bits?

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

                1 Reply Last reply
                0
                • C Offline
                  C Offline
                  cincirin
                  wrote on last edited by
                  #18

                  I apologize, I have not noticed that it is a mobile forum.
                  Yes, I have compiled for win7 and Ubuntu (32&64).
                  In the near future, I'll try to compile for mobile platform.
                  Sorry again.

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    andre
                    wrote on last edited by
                    #19

                    [quote author="cincirin" date="1300101520"]I apologize, I have not noticed that it is a mobile forum.
                    Yes, I have compiled for win7 and Ubuntu (32&64).
                    In the near future, I'll try to compile for mobile platform.
                    Sorry again.[/quote]

                    -OK, so I have moved the thread to the General & Desktop forum.-
                    Moved back to Mobile & Embedded on request of TS.

                    1 Reply Last reply
                    0
                    • T Offline
                      T Offline
                      tanclanship
                      wrote on last edited by
                      #20

                      I have follow your instruction by downloading and install OpenCV2.2 in my default folder. C:/OpenCV2.2 . Below is my pro file. I have chance the OPENCV_DIR following my directory. but when I compile using NokiaQT I have error stating cannot find -lopencv_lapack. Please help thank you

                      @OPENCV_DIR = C:/OpenCV2.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@

                      1 Reply Last reply
                      0
                      • C Offline
                        C Offline
                        cincirin
                        wrote on last edited by
                        #21

                        Sorry "tanclanship" I have compiled all modules from OpenCV 2.2 by myself with QtCreator. If you install OpenCV with precompiled binaries from their site, is almost impossible that libs path be the same.
                        Anyway, I looked at their site, and there are two download locations: one for Unix, one for Windows.
                        For Windows, I have noticed that there are two variants : one with pre-compiled 32-bit binaries for Visual Studio 2010 developers, and one zip package with sources/headers to be build for your development environment. Which of these three options you've used ?

                        1 Reply Last reply
                        0
                        • T Offline
                          T Offline
                          tanclanship
                          wrote on last edited by
                          #22

                          Windows Pre Compile 32 bit. So any suggestion what should I do next ?

                          1 Reply Last reply
                          0
                          • G Offline
                            G Offline
                            giesbert
                            wrote on last edited by
                            #23

                            Hi tanclanship,

                            which compiler tool chain do you use with QtCreator?
                            I ask as by default, then mingw tool chain is used.

                            That is important. You can only use C++ libs that are build with the same compiler (also mingw, or same MSVS studio version).

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

                            1 Reply Last reply
                            0
                            • C Offline
                              C Offline
                              cincirin
                              wrote on last edited by
                              #24

                              I assume that you are using pre-compiled 32-bit binaries for Visual Studio 2010. If you have installed QtSDK for windows, it comes with MinGW toolchain. If you have installed Qt libraries 4.7.2 for windows, it comes tiwh VC2008 compiled libraries. In both both cases I don't think it's possible to link with VC2010 libraries. So, in my opinion you should have to compile OpenCV with MinGW or VC 2008. The simplest way is to use CMake ( OpenCV include tools for cross-compiling with CMake )

                              1 Reply Last reply
                              0
                              • T Offline
                                T Offline
                                tanclanship
                                wrote on last edited by
                                #25

                                Im using the Tool Chain :minGw (it written in my Build Setting).
                                Cincirin can you please guide me step by step on how to use CMake inside openCV as I have no experience to use it.

                                1 Reply Last reply
                                0
                                • G Offline
                                  G Offline
                                  giesbert
                                  wrote on last edited by
                                  #26

                                  The easies way (from my point of view) would be:

                                  download source package for OpenVC

                                  create a project for it (qmake -project)

                                  use qmake & mingw-make (or QtCreator)

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

                                  1 Reply Last reply
                                  0
                                  • T Offline
                                    T Offline
                                    tanclanship
                                    wrote on last edited by
                                    #27

                                    Gerolf I have done the following list. And now it shows no error. The emulator pop up as usual once debug.Alright so far so good.
                                    Cincirin do you have any simple coding for using OpenCV. so i could test its working

                                    @ IplImage *img = cvLoadImage("funny-pictures-cat-goes-pew.jpg");
                                    cvNamedWindow("Image:",1);
                                    cvShowImage("image:",img);

                                        cvWaitKey();
                                        cvDestroyWindow("Image:");
                                        cvReleaseImage(&img);
                                        
                                        return 0;
                                    

                                    @

                                    The code above provided using CVNamedWindow cannot be use in the QTSimulator.

                                    1 Reply Last reply
                                    0
                                    • C Offline
                                      C Offline
                                      cincirin
                                      wrote on last edited by
                                      #28

                                      You can download CMake from "here":http://www.cmake.org/cmake/resources/software.html
                                      But I'm not sure if you really want to use QtCreator for building your application and linked this with OpenCV library.
                                      CMake is cross-platform, open-source build system. For windows you have to choose for generating binaries (projects) between Visual Studio editions that you have them installed (2008, 2010, etc), CodeBlocks, makefiles, etc...
                                      As I said, I chose to compile the entire OpenCV library (all modules) with QtCreator for easy linked, debug, integrate in my application. QtCreator qmake project is not in CMake list. Therefore, each qmake project must be written manually.
                                      Fortunately for windows users, a solution can be:

                                      • generate VC projects with CMake
                                      • for every *.vcproj generated by CMake, manually create QtCreator project (static or dynamic library), and put in them all sources and headers from corresponding *.vcproj file.

                                      Other solution, without using QtCreator is:

                                      • download VC express 2008 (or if you have non-free editions, is better, because you can install Qt plug-in for VC)
                                      • choose VC 2008 from CMake list
                                      • download Qt libraries 4.7.2 for windows, it comes with VC2008 pre-compiled libraries
                                      • use VC 2008 for develop your app
                                      1 Reply Last reply
                                      0
                                      • C Offline
                                        C Offline
                                        cincirin
                                        wrote on last edited by
                                        #29

                                        Sure, for the moment I use OpenCV for calibrate lens of the Logitech 1080p webcam two cameras and put them in video stream. I don't know if you have a webcamera, but a sample program looks like :

                                        // init camera capture
                                        CvCapture* cameraCapture = cvCaptureFromCAM(0);

                                        // start a 0.1-second QObject timer
                                        timerID = startTimer(100);

                                        // ... and in your timerEvent ...
                                        IplImage* image = cvQueryFrame(cameraCapture);

                                        // you can convert IplImage in QImage "easy":http://www.qtcentre.org/threads/11655-OpenCV-integration

                                        // when finish, kill timer and release capture
                                        killTimer(timerID);
                                        cvReleaseCapture(&camerasCapture);

                                        1 Reply Last reply
                                        0
                                        • M Offline
                                          M Offline
                                          MAMartins
                                          wrote on last edited by
                                          #30

                                          [quote author="Scylla" date="1300001278"]On my mac I have just this in my *.pro file
                                          @INCLUDEPATH += /usr/local/include/opencv
                                          LIBS += -lopencv_highgui@
                                          Take a look "here":http://qt-apps.org/content/show.php/Qt+Opencv+webcam+viewer?content=89995[/quote]

                                          Scylla, how did you installed the opencv? i've downloaded an opencv 2.0 dmg from their website but I don't have the /usr/local/include/opencv

                                          I have it on my framework folder:
                                          /System/Library/Frameworks/OpenCV.framework

                                          how can I link it?

                                          thanks a lot

                                          1 Reply Last reply
                                          0

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved