//this shows my webcam stream with lots of noise. like an old tv set on the wrong channel. Please help.
#include "pch.h"
include "opencv2/imgproc/imgproc.hpp"
include "opencv2/highgui/highgui.hpp"
include <iostream>
using namespace std; using namespace cv;
int main(int argc, char** argv) { VideoCapture cap; cap.open(0); if (!cap.isOpened()) { printf("--(!)Error opening video capture\n"); return -3; }
Mat image;
namedWindow("Image", WINDOW_AUTOSIZE);
while (1)
{
cap.read(image);
imshow("Image", image);
waitKey(30);
}
return 0;
} /////