multiple windows are opening with arbitrary name ..even i had gave named to window "myvideo"
#include "opencv2/highgui/highgui.hpp"
#include <iostream>
using namespace cv;
using namespace std;
int main()
{
VideoCapture cap(0);
if ( !cap.isOpened() )
namedWindow("MyVideo",CV_WINDOW_AUTOSIZE);
while(1)
{
Mat frame;
bool bSuccess = cap.read(frame);
if (!bSuccess) break;
imshow("MyVideo", frame);
if(waitKey(30) == 27)break;
}
lines :
I don't understand. I don't see any problem in your code
please double check, if you accidentally use opencv release libs in debug build, or vice versa.