PDA

View Full Version : OpenCV and Qt Error While Running!



hazad
6th February 2013, 10:32
Hi friends,

I have problems with OpenCV and Qt,

in the sample code link = http://forum.donanimhaber.com/m_17940057/tm.htm

code is working well but i create class and the included all needed OpenCV header fileand make floodfill to member function of my class

however when i run this function example object->fill(){ floodfill(..,..,..,..,)}

the program is terminated unexpectedly and Compiler MEssage
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

(Test_014_ColorKinect:11338): Gtk-WARNING **: gtk_disable_setlocale() must be called before gtk_init()
OpenCV Error: Unsupported format or combination of formats () in cvFloodFill, file /home/robotic_goruntu/Downloads/OpenCV/opencv/modules/imgproc/src/floodfill.cpp, line 621
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.

terminate called after throwing an instance of 'cv::Exception'
what(): /home/robotic_goruntu/Downloads/OpenCV/opencv/modules/imgproc/src/floodfill.cpp:621: error: (-210) in function cvFloodFill

The program has unexpectedly finished.>>>>>>>>>>>>>>>>>>>>>>>>

d_stranz
6th February 2013, 16:49
How is this a Qt question? You've obviously made an error in calling an OpenCV method. The error message from the runtime is quite detailed and tells you *exactly* what you've done wrong. Read it and think about it, and if you still can't figure it out, ask on an OpenCV forum.

The Qt part of the error message is reported only because OpenCV has thrown an exception from within one of your Qt event handlers (which, as it says, is not supported by Qt). The error is *still* in your use of OpenCV.

Simply running code, watching it crash, and scratching your head before posting here will not help. You need to step into the OpenCV code and find out where and why OpenCV is throwing the exception, then fix your code.

rexslahed
11th February 2013, 23:33
How is this a Qt question? You've obviously made an error in calling an OpenCV method. The error message from the runtime is quite detailed and tells you *exactly* what you've done wrong. Read it and think about it, and if you still can't figure it out, ask on an OpenCV forum.

The Qt part of the error message is reported only because OpenCV has thrown an exception from within one of your Qt event handlers (which, as it says, is not supported by Qt). The error is *still* in your use of OpenCV.

Simply running code, watching it crash, and scratching your head before posting here will not help. You need to step into the OpenCV code and find out where and why OpenCV is throwing the exception, then fix your code.

That was absolutely uncalled for! If you dont have anything to say to help, why even bother.

This person obviously dint know what to do and hence he went through the trouble of explaining his situation, putting up his code and asking his question. Im a dev too and I would never reply to a question in that fashion. You sir, are a kick(read rhymming word starting with a 'd')
!