Why tutorials compile and exit without any explains [closed]
Hello comrades. Please help me.
Win10, VS 2012 Express.
I try to learn OCV.
I use just one C++ file in the project, copy tutorial examples from tutorial dir, to this file and try to compile.
Environment of VS turned good, all includes of the OCV, paths, libraries, etc a connected and many tutorials from different sources are works. Project directory permissions checked - All permissions
But when I try to test OpenCV tutorials and examples from tutorial dir, I have a trouble.
Link - OK, Compile - OK no problem, but debugging is finished.
At the Output window
Stream 0x3300 finished with code -1 (0xffffffff).
Stream 0x27f8 finished with code -1 (0xffffffff).
Stream 0x2af8 finished with code -1 (0xffffffff).
Program "[9316] OCVTest.exe" finished with code -1 (0xffffffff).
What's going on?
hard to tell, without seing your code, but obviously your prog hit something like
if (something_bad) return -1;
.so, probably nothing's wrong, you maybe forgot to supply a cmdline arg, an image failed to load, etc.
sorry for forgetting the obvious:
please tell us, which sample you're trying to use, then we can point you at where / why / how it failed for you.
First of all big thanks of quick answer. For example I try to start "opencv-2,4,13\opencv\sources\samples\cpp\tutorial_code\objectDetection...".
Second. Could you explain, what you mean, when you told - "you maybe forgot to supply a cmdline arg, an image failed to load, etc." ?
it's probably one of those , and you did not see the error msg, starting your prog straight from your ide.
Yes. You are right. Rely i didn't read comments careful. I had make those XML files. And project was started. But unfortunately I have exception during a function call "detectAndDisplay( frame )". In the debug mode step by step, I see that webcam On, but just try to call detectAndDisplay( frame ) - exception.
Exception exactly at string
*face_cascade.detectMultiScale( frame_gray, faces, 1.1, 2, 0|CV_HAAR_SCALE_IMAGE, Size(30, 30) ); OpenCV Error: Bad argument (Invalid classifier cascade) in cvHaarDetectObjectsForROC
what do you mean ? it seems, that did not work. try to copy them over from opencv/data/haarcascades, or use an absolute path to there.
Big big thanks Friend. All right, all work.