include "opencv2/highgui/highgui.hpp"
include <iostream>
include "opencv2/opencv.hpp"
using namespace cv; using namespace std; int main(int, char**) { VideoCapture capturo(0); Mat img1, img2; int input; namedWindow("Image 1",CV_WINDOW_AUTOSIZE); namedWindow("Image 2",CV_WINDOW_AUTOSIZE); for(;;){ char input = cvWaitKey(33); if(input == 27) break; if (input == 49) { img1= capturo.grab(); cv::imshow("Image 1",img1); } if (input == 50){ img2= capturo.grab(); cv::imshow("Image 2",img2); } } return 0; }
Please tell what am I doing wrong here.