Qt window does not update (Bug #812)
Description
when opening two windows using the opencv highgui, with opencv compiled with the WITH_QT flag and WITH_QT_OPENGL flag ON, the first one opened does not update with call so cv::imshow, but the second one will.
example
cv::VideoCapture vc( some_file );
while(vc.grab()) {
cv::Mat frame, result;
vc.retrieve(frame);
// do something with frame and get an image result, that is compatible with imshow
cv::Mat result = foo(frame);
// frame will not update
cv::imshow("Frame", frame);
// result will update
cv::imshow("Result", result);
}
this doesn't seem to occur if you compile with WITH_QT_OPENGL=OFF
Associated revisions
Merge pull request #812 from bitwangyaoyao:master_uhp
History
Updated by Ilya Lysenkov over 13 years ago
- Status deleted (
Open)
Updated by Ilya Lysenkov over 13 years ago
Thank you for the ticket.
I've compiled the OpenCV trunk WITH_QT flag and WITH_QT_OPENGL flag ON but I can't reproduce this problem by running OpenCV samples. Your example doesn't show me any images at all but this should be solved by adding something like cv::waitKey(30) to the end of the loop:
cv::VideoCapture vc( some_file ); while(vc.grab()) { cv::Mat frame, result; vc.retrieve(frame); // do something with frame and get an image result, that is compatible with imshow cv::Mat result = foo(frame); // frame will not update cv::imshow("Frame", frame); // result will update cv::imshow("Result", result); cv::waitKey(30); }
This version works fine for me. So try to add cv::waitKey(30) to your code and let me know if the problem still persists and how to reproduce it.
- Status set to Done
- (deleted custom field) set to worksforme
Updated by Andrey Kamaev over 12 years ago
- Status changed from Done to Cancelled
- Category changed from highgui-images to highgui-gui