Results 1 to 1 of 1

Thread: Problems using OpenCV 2.4.3 with QT

  1. #1
    Join Date
    Jan 2013
    Posts
    25
    Thanks
    2
    Platforms
    Windows

    Default Problems using OpenCV 2.4.3 with QT

    Dear all,

    I am facing problem in using OpenCV 2.4.3 with QT. I downloaded built version of OpenCV 2.4.3 from opencv website. It works with Visual Studio 2010.
    My QT application works when I use old interfaces like IplImage, CvCapture etc.
    I get undefined reference errors, as soon as I start using new interfaces lik cv::Mat, cv::VideoCapture. This is my QT project file including includes and libs for OpenCV:


    Qt Code:
    1. INCLUDEPATH += C:/OpenCV2.4.3/include/
    2. INCLUDEPATH += C:/OpenCV2.4.3/include/opencv/
    3. INCLUDEPATH += C:/OpenCV2.4.3/include/opencv2/
    4. INCLUDEPATH += C:/OpenCV2.4.3/modules/core/include/
    5. INCLUDEPATH += C:/OpenCV2.4.3/modules/imgproc/include/
    6. INCLUDEPATH += C:/OpenCV2.4.3/modules/video/include/
    7. INCLUDEPATH += C:/OpenCV2.4.3/modules/features2d/include/
    8. INCLUDEPATH += C:/OpenCV2.4.3/modules/calib3d/include/
    9. INCLUDEPATH += C:/OpenCV2.4.3/modules/objdetect/include/
    10. INCLUDEPATH += C:/OpenCV2.4.3/modules/legacy/include/
    11. INCLUDEPATH += C:/OpenCV2.4.3/modules/photo/include/
    12. INCLUDEPATH += C:/OpenCV2.4.3/modules/ml/include/
    13. INCLUDEPATH += C:/OpenCV2.4.3/modules/contrib/include/
    14. INCLUDEPATH += C:/OpenCV2.4.3/modules/flann/include/
    15. INCLUDEPATH += C:/OpenCV2.4.3/modules/highgui/include/
    16.  
    17.  
    18.  
    19. CONFIG(release,debug|release)
    20. {
    21. LIBS += C:\opencv2.4.3\build\x86\vc10\lib\opencv_calib3d243.lib \
    22. C:\opencv2.4.3\build\x86\vc10\lib\opencv_contrib243.lib \
    23. C:\opencv2.4.3\build\x86\vc10\lib\opencv_core243.lib \
    24. C:\opencv2.4.3\build\x86\vc10\lib\opencv_features2d243.lib \
    25. C:\opencv2.4.3\build\x86\vc10\lib\opencv_flann243.lib \
    26. C:\opencv2.4.3\build\x86\vc10\lib\opencv_gpu243.lib \
    27. C:\opencv2.4.3\build\x86\vc10\lib\opencv_haartraining_engine.lib \
    28. C:\opencv2.4.3\build\x86\vc10\lib\opencv_highgui243.lib \
    29. C:\opencv2.4.3\build\x86\vc10\lib\opencv_imgproc243.lib \
    30. C:\opencv2.4.3\build\x86\vc10\lib\opencv_legacy243.lib \
    31. C:\opencv2.4.3\build\x86\vc10\lib\opencv_ml243.lib \
    32. C:\opencv2.4.3\build\x86\vc10\lib\opencv_objdetect243.lib \
    33. C:\opencv2.4.3\build\x86\vc10\lib\opencv_ts243.lib \
    34. C:\opencv2.4.3\build\x86\vc10\lib\opencv_video243.lib
    35. }
    36.  
    37. CONFIG(debug,debug|release)
    38. {
    39. LIBS += C:\opencv2.4.3\build\x86\vc10\lib\opencv_calib3d243d.lib \
    40. C:\opencv2.4.3\build\x86\vc10\lib\opencv_contrib243d.lib \
    41. C:\opencv2.4.3\build\x86\vc10\lib\opencv_core243d.lib \
    42. C:\opencv2.4.3\build\x86\vc10\lib\opencv_features2d243d.lib \
    43. C:\opencv2.4.3\build\x86\vc10\lib\opencv_flann243d.lib \
    44. C:\opencv2.4.3\build\x86\vc10\lib\opencv_gpu243d.lib \
    45. C:\opencv2.4.3\build\x86\vc10\lib\opencv_haartraining_engined.lib \
    46. C:\opencv2.4.3\build\x86\vc10\lib\opencv_highgui243d.lib \
    47. C:\opencv2.4.3\build\x86\vc10\lib\opencv_imgproc243d.lib \
    48. C:\opencv2.4.3\build\x86\vc10\lib\opencv_legacy243d.lib \
    49. C:\opencv2.4.3\build\x86\vc10\lib\opencv_ml243d.lib \
    50. C:\opencv2.4.3\build\x86\vc10\lib\opencv_objdetect243d.lib \
    51. C:\opencv2.4.3\build\x86\vc10\lib\opencv_ts243d.lib \
    52. C:\opencv2.4.3\build\x86\vc10\lib\opencv_video243d.lib
    53. }
    To copy to clipboard, switch view to plain text mode 
    Does any body has faced similar situation How to resolve this problem?


    [EDIT] I build OpenCV 2.4.6 with MinGW/QT support using CMake. I still face the same problem as mentioned above. My application works for IplImage format and give error 0xc0000139 while executing the application.

    Qt Code:
    1. INCLUDEPATH += C:/2.4.6/install/include/
    2. INCLUDEPATH += C:/2.4.6/install/include/opencv/
    3. INCLUDEPATH += C:/2.4.6/install/include/opencv2/
    4.  
    5. LIBS += -LC:\2.4.6/install/lib/
    6. LIBS += -llibopencv_calib3d290d -llibopencv_contrib290d -llibopencv_core290d -llibopencv_features2d290d -llibopencv_flann290d -llibopencv_highgui290d -llibopencv_imgproc290d -llibopencv_legacy290d -llibopencv_ml290d -llibopencv_objdetect290d -llibopencv_video290d
    To copy to clipboard, switch view to plain text mode 

    Regards,
    Last edited by tesmai4; 16th September 2013 at 17:45.

Similar Threads

  1. OpenCV on mac
    By sandeep_hyd123 in forum Newbie
    Replies: 1
    Last Post: 17th June 2011, 04:53
  2. OpenCV again (Linker Problems)
    By embedded123 in forum Newbie
    Replies: 1
    Last Post: 28th April 2011, 11:32
  3. Qt and OpenCV
    By malorie in forum Newbie
    Replies: 2
    Last Post: 7th March 2010, 14:57
  4. OpenCv & Qt4
    By switch in forum Qt Programming
    Replies: 0
    Last Post: 4th August 2009, 15:12
  5. JAI vs. OpenCV vs. ITK
    By tpieciak in forum General Programming
    Replies: 0
    Last Post: 8th July 2009, 13:45

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.