#include <iostream>
#include "opencv2\opencv.hpp"

using namespace cv;
using namespace std;

int main(void)
{
    VideoCapture capture;
    Mat frame;

    capture.open(0);
    if(! capture.isOpened())
    {
        cout << "Not Open" << endl;
        waitKey(10000);
        return 1;
    }

    namedWindow("Original Camera");
    cout<<"<ESC> - quit the program"<<endl;

    for(;;)
    {
        capture >> frame;
        if( (waitKey(33) & 255) == 27 )
        {
            capture.release();
            break;
        }
        imshow("Original Camera",frame);
    }
    return 0;
}
