Problems showing an image, ASSERT: "false" in file qasciikey.cpp

asked 2018-03-14 16:29:35 -0600

ATierz gravatar image

Hello, I have a problem each time when I want to show a window on my screen. The next problem always appears: ASSERT: "false" in file qasciikey.cpp, line 501 The program has unexpectedly finished.

For example with the following code, the window is opened for a second and then the previous message appears and the program crashes.

int main(int, char**){

VideoCapture cap;

cap.open(string("/home/atierz/Documentos/Univrersidad/Vision/datos_practicas_1234_vison_computador/secuencias/sec_test.mp4"));
Mat frame;
namedWindow("video", 1);
for(;;){

    cap >>frame;
    if(!frame.data) break;
    imshow("video", frame);

    if (waitKey(5) >= 0)
        break;
}

}

Thanks in advance.

edit retag flag offensive close merge delete

Comments

opencv version ?

berak gravatar imageberak ( 2018-03-14 16:41:32 -0600 )edit

OpenCv 3.4.0

ATierz gravatar imageATierz ( 2018-03-14 17:23:29 -0600 )edit

can you try to lookup the assert ?

(it's not part of the opencv codebase, you'll have to look into the qt code)

berak gravatar imageberak ( 2018-03-15 03:15:17 -0600 )edit

Sorry I don't find the file qasciikey.cpp in my computer. And from the qtcreator I can open it neither.

ATierz gravatar imageATierz ( 2018-03-15 11:46:20 -0600 )edit

there were some hickups with waitKey in the past, but i can't remember, when exactly that was solved.

can you try to update to latest master ?

berak gravatar imageberak ( 2018-03-15 11:54:43 -0600 )edit