Results 1 to 5 of 5

Thread: Error while executing the GUI Program for image processing

  1. #1
    Join Date
    Jan 2013
    Location
    Bangalore, India
    Posts
    36
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    9
    Thanked 2 Times in 2 Posts

    Question Error while executing the GUI Program for image processing

    Hi,

    I am creating a GUI application for image processing with opencv library and i almost wrote a program but i am getting an error while debugging.

    i have a screenshot of my GUI below in which i can able to open an image when the open pushbutton is pushed, but when i press the erode button i am getting the error as:

    "Starting D:\qtproject\Final\debug\Final.exe...
    Qt: Untested Windows version 6.2 detected!
    OpenCV Error: Assertion failed (src.size() == dst.size() && src.type() == dst.type()) in unknown function, file C:\slave\WinInstallerMegaPack\src\opencv\modules\i mgproc\src\morph.cpp, line 1221
    Qt has caught an exception thrown from an event handler. Throwing
    exceptions from an event handler is not supported in Qt. You must
    reimplement QApplication::notify() and catch all exceptions there.

    D:\qtproject\Final\debug\Final.exe exited with code 3"

    since i am newbie i dont know where i am going wrong. I have attached my code below for your consideration. Plz someone help me with this, because i have very less time to implement this.

    code1.txtGUI.jpg
    thanx.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Wiki edits
    17

    Default Re: Error while executing the GUI Program for image processing

    As the assert in OpenCV (not Qt) is telling you, the src size and type are different to the dst size and type in a function found in C:\slave\WinInstallerMegaPack\src\opencv\modules\i mgproc\src\morph.cpp, line 1221. Look at that source, work out which function it is, and how you are calling it with incorrect values. By my reckoning that will be cvErode(): the first argument is expected to be type "const CvArr*" and you are passing "IplImage *" http://docs.opencv.org/modules/imgpr...ing.html#erode

  3. The following user says thank you to ChrisW67 for this useful post:

    jakr13 (10th January 2013)

  4. #3
    Join Date
    Jan 2013
    Location
    Bangalore, India
    Posts
    36
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    9
    Thanked 2 Times in 2 Posts

    Default Re: Error while executing the GUI Program for image processing

    thanks for the reply ...but i passed "IplImage" in the position of "const CvArr*", It worked with vs2010 without Qt.

  5. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Wiki edits
    17

    Default Re: Error while executing the GUI Program for image processing

    OpenCV is not Qt, your code is not Qt, your compiler is not Qt, and the problem is a combination of these; ergo the problem is nothing to do with Qt.

    The OpenCV sanity checks have told you exactly what the problem is. The size and type of the data represented by the first CvArr* and second CvArr* passed to cvErode() are not the same. Is the IplImage* op of type IPL_DEPTH_8U with only 1 channel?
    "We can't solve problems by using the same kind of thinking we used when we created them." -- Einstein
    If you are posting code then please use [code] [/code] tags around it - makes addressing the problem easier.

  6. The following user says thank you to ChrisW67 for this useful post:

    jakr13 (11th January 2013)

  7. #5
    Join Date
    Jan 2013
    Location
    Bangalore, India
    Posts
    36
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    9
    Thanked 2 Times in 2 Posts

    Default Re: Error while executing the GUI Program for image processing

    Hi Chris,

    got you and it worked. Thanx for your help. Gonna implement some more things and will ask you if there is any problem,if i could not solve it.

    jakr13

Similar Threads

  1. Replies: 1
    Last Post: 13th December 2010, 13:19
  2. Replies: 0
    Last Post: 20th August 2010, 14:45
  3. Replies: 2
    Last Post: 11th August 2010, 11:13
  4. Image Processing using Qt
    By danielperaza in forum Qt Programming
    Replies: 2
    Last Post: 9th March 2008, 19:15
  5. finding the time interval of executing a program
    By babu198649 in forum Qt Programming
    Replies: 1
    Last Post: 13th December 2007, 13:05

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
  •  
Qt is a trademark of The Qt Company.