Results 1 to 2 of 2

Thread: Error while working with OpenCV

  1. #1
    Join Date
    Aug 2013
    Posts
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default Error while working with OpenCV

    I am using Opencv 2.2(qt version:5.1 and compiler is vs2010)

    when I was trying to write my first program with opencv , I face this error:

    RS6010

    My source file is simply:
    Qt Code:
    1. #include <opencv2/core/core.hpp>
    2. #include <opencv2/highgui/highgui.hpp>
    3. using namespace cv;
    4.  
    5. int main()
    6. {
    7. Mat image = imread("Untitled.jpg");
    8. namedWindow("OpenCV Test");
    9. imshow("Untitled",image);
    10. waitKey(5000);
    11. return 1;
    12. }
    To copy to clipboard, switch view to plain text mode 
    and this is my .pro file:
    Qt Code:
    1. QT += core
    2.  
    3. QT -= gui
    4.  
    5. TARGET = OpenCVTest
    6. CONFIG += console
    7. CONFIG -= app_bundle
    8.  
    9. TEMPLATE = app
    10.  
    11.  
    12. SOURCES += main.cpp
    13.  
    14. INCLUDEPATH += C:\OpenCV2.2\include\
    15.  
    16. LIBS += -LC:\OpenCV2.2\lib \
    17. -lopencv_core220 \
    18. -lopencv_highgui220 \
    19. -lopencv_imgproc220 \
    20. -lopencv_features2d220 \
    21. -lopencv_calib3d220
    To copy to clipboard, switch view to plain text mode 

    Thanks appreciate any help to get me up and running

  2. #2
    Join Date
    Nov 2007
    Posts
    55
    Thanks
    1
    Thanked 9 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Error while working with OpenCV

    change
    Qt Code:
    1. imshow("Untitled",image);
    To copy to clipboard, switch view to plain text mode 
    to
    Qt Code:
    1. imshow( "OpenCV Test", image );
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Replies: 1
    Last Post: 5th October 2012, 00:22
  2. OpenCV cvSmooth not working in Qt, but OK in Visual C++ 2008
    By aoikyou in forum Installation and Deployment
    Replies: 3
    Last Post: 31st March 2012, 05:21
  3. Linking Error Qt OpenCV
    By Songi in forum Installation and Deployment
    Replies: 4
    Last Post: 28th August 2011, 05:03
  4. Qt OpenCV SIGSEGV error help
    By bobo in forum Newbie
    Replies: 3
    Last Post: 13th June 2011, 21:03

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.