I am trying to execute facedetect sample of Opencv-2.4.7 on linux environment. But it get stuck without giving any error , warning or log. The strange thing happening is if I try to debug the process using strace then the execution completes with correct output.
I am compiling the facedetect.cpp using following command:
gcc -o facedetect facedetect.cpp -L/usr/local/opencv-2.4.7/lib
-I/usr/local/opencv-2.4.7/include -lopencv_objdetect -lopencv_imgproc
-lopencv_core -lopencv_highgui
and executing it by command as follows:
/usr/local/opencv-2.4.7/facedetect
--cascade="/usr/local/opencv-2.4.7/haarcascades/haarcascade_frontalface_default.xml" image.jpeg
Any suggestion will be helpful!!
It was due to waitkey function call which doesnot respond. Following link can be used for resolving this purpose:
Opencv python. WaitKey don't respond?
Although in my case it works fine even if I comment the waitkey function call.