1 | initial version |
by default, imshow() fits the window to the image size (WINDOW_AUTOSIZE), you probably want the opposite:
namedWindow("Webcam", WINDOW_NORMAL);
while(1)
{
Mat frame;
cap >> frame;
imshow("Webcam", frame);
if (waitKey(30) >= 0) break;
}