Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Do you only want to read a single frame? Otherwise do something along these lines:

    int main() {

    Mat frame;
    string path = "D:\\outputVideo\\outputVideo.avi";
    VideoCapture capture(path); 
    namedWindow("my_window");

    for(;;) {
    capture >> frame;
    imshow("my_window", frame);

    if(cv::waitKey(30) >= 0) break;
    }
}