Ask Your Question

Snow4Life's profile - activity

2020-11-19 01:00:50 -0600 received badge  Student (source)
2014-10-11 12:29:37 -0600 received badge  Editor (source)
2014-10-11 12:28:41 -0600 asked a question [Solved] Simple application crash without errors

The application is this:

#include "opencv2/opencv.hpp"

using namespace cv;

int main(int, char**)
{
    VideoCapture cap(0); // open the default camera
    if(!cap.isOpened())  // check if we succeeded
        return -1;
Mat edges;
namedWindow("edges",1);
for(;;)
{
    Mat frame;
    cap >> frame; // get a new frame from camera
    cvtColor(frame, edges, COLOR_BGR2GRAY);
    GaussianBlur(edges, edges, Size(7,7), 1.5, 1.5);
    Canny(edges, edges, 0, 30, 3);
    imshow("edges", edges);
    if(waitKey(30) >= 0) break;
}

cap.release();  
return 0;

}

This used to run with OpenCV3, but recently I upgraded and rebuilded (as static library because of other reasons, but the same was prior upgrading) and now when I run the executable it hang without any error. (the only difference is that now I have installed Qt5, but also reverting to Qt4 lead to the same result) If I run it with GDB i get this:

(gdb) run

Starting program: /root/programs/pc_camera/build/pc_camera

[Thread debugging using libthread_db enabled]

Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".

[Inferior 1 (process 7290) exited with code 0377]

Which for me is not really helpful.

Does someone know at least how to get a hint on what is failing?

2014-04-05 14:05:22 -0600 received badge  Teacher (source)
2014-04-04 10:19:25 -0600 received badge  Necromancer (source)
2014-04-04 10:17:09 -0600 answered a question profilig opencv