Results 1 to 6 of 6

Thread: Modify .pro file for OpenCV

  1. #1
    Join Date
    Mar 2009
    Location
    india->gujarat->bhavnagar
    Posts
    36
    Thanks
    7
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Maemo/MeeGo

    Question Modify .pro file for OpenCV

    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:??

  2. #2
    Join Date
    Mar 2011
    Posts
    120
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Modify .pro file for OpenCV

    if you are using linux
    Qt Code:
    1. LIBS +=/usr/lib64/libcv.so.2.1 \
    2. /usr/lib64/libcvaux.so.2.1 \
    3. /usr/lib64/libcxcore.so.2.1 \
    4. /usr/lib64/libhighgui.so.2.1 \
    5. /usr/lib64/libml.so.2.1
    To copy to clipboard, switch view to plain text mode 

    (this is an example.)

    similarly you can use the lib file for windows application.

  3. #3
    Join Date
    Mar 2009
    Location
    india->gujarat->bhavnagar
    Posts
    36
    Thanks
    7
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Maemo/MeeGo

    Question Re: Modify .pro file for OpenCV

    hey thanks...
    but m using openCv 2.2

    below is my profile.
    Qt Code:
    1. #-------------------------------------------------
    2. #
    3. # Project created by QtCreator 2011-06-06T19:49:01
    4. #
    5. #-------------------------------------------------
    6.  
    7. QT += core gui
    8.  
    9. TARGET = Facedetection
    10. TEMPLATE = app
    11.  
    12.  
    13. SOURCES += main.cpp\
    14. facerecognizer.cpp
    15.  
    16. HEADERS += facerecognizer.h
    17.  
    18. FORMS += facerecognizer.ui
    19.  
    20. CONFIG += mobility
    21. MOBILITY =
    22. INCLUDEPATH+=C:\OpenCV2.2\include\opencv \
    23. C:\OpenCV2.2\include\opencv2
    24.  
    25. LIBS+=C:/OpenCV2.2/lib/*.lib
    26.  
    27. symbian {
    28.   TARGET.UID3 = 0xeebafacd
    29.   # TARGET.CAPABILITY +=
    30.   TARGET.EPOCSTACKSIZE = 0x14000
    31.   TARGET.EPOCHEAPSIZE = 0x020000 0x800000
    32. }
    To copy to clipboard, switch view to plain text mode 

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

  4. #4
    Join Date
    Nov 2010
    Posts
    315
    Thanked 53 Times in 51 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Modify .pro file for OpenCV

    use slashes no backslash, don't use wild cards in file names

  5. #5
    Join Date
    Mar 2009
    Location
    india->gujarat->bhavnagar
    Posts
    36
    Thanks
    7
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Maemo/MeeGo

    Default Re: Modify .pro file for OpenCV

    Quote Originally Posted by MarekR22 View Post
    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

  6. #6
    Join Date
    Mar 2011
    Posts
    120
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Modify .pro file for OpenCV

    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.

Similar Threads

  1. How to modify qmap without iteration
    By sanjarbek in forum Newbie
    Replies: 9
    Last Post: 13th April 2010, 10:07
  2. how to modify contents of QScrollArea?
    By cyrfer in forum Qt Programming
    Replies: 1
    Last Post: 18th January 2010, 09:28
  3. How to modify the content of text file
    By grsandeep85 in forum Qt Programming
    Replies: 3
    Last Post: 31st July 2009, 10:23
  4. Modify a ContextMenu
    By smarinr in forum Qt Programming
    Replies: 5
    Last Post: 10th May 2008, 17:41
  5. I have a problem to modify table
    By Abk in forum Qt Programming
    Replies: 1
    Last Post: 31st May 2007, 20:11

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.