ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
It should work like this:
cv::imshow("view", cv_ptr->image);
cv::waitKey(10);
To wait for a couple of miliseconds with waitKey()
when trying to display an image is important in OpenCV, because it allows some time for GUI processing.
You don't really need cvNamedWindow()
if you use the default parameter CV_WINDOW_AUTOSIZE
because a window is already created by imshow()
. If you want to use name window anyway, you should stick to the OpenCV C++ API: cv::namedWindow()