opencv ::具有垃圾名称的多个不需要的窗口 [英] opencv :: Multiple unwanted window with Garbage name

查看:99
本文介绍了opencv ::具有垃圾名称的多个不需要的窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用opencv从网络摄像头捕获视频并将其显示在namedWindow中.

cv::Mat rawImage;
cv::VideoCapture captureDevice;
captureDevice.open(0);
cv::namedWindow("webcam", 1);
bool running = true;
while(running)
{
    captureDevice >> rawImage;
    if(!rawImage.data)
    {
        continue;
    }
    cv::imshow("webcam", rawImage);
    char ch = cv::waitKey(33);
    if(ch == 'e')
    running = false;
}

最初的代码运行良好,但是在随机(约5秒)后,旧的命名窗口冻结,并弹出带有某些垃圾名称的新窗口,并开始显示网络摄像头图像.这继续发生,我得到了多个不需要的命名窗口.弹出那些不需要的窗口的原因是什么?

解决方案

您是否尝试过此处介绍的解决方案?

initially code runs fine but after random (5 sec approx) period older named window freezes and new window with some garbage name pops up and start showing webcam images. this continues to happen and i am getting multiple unwanted named window. What is the reason for popping up for those unwanted windows?

Have you tried the solution described here?

http://www.ridgesolutions.ie/index.php/2013/09/26/opencv-display-window-title-corrupted-and-multiple-windows-show/

They also indicate that they don't understand why, but that it was manually fixed by adding preprocessor definition _ITERATOR_DEBUG_LEVEL=0 to VS2012

这篇关于opencv ::具有垃圾名称的多个不需要的窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆