diff --git a/modules/highgui/doc/reading_and_writing_images_and_video.rst b/modules/highgui/doc/reading_and_writing_images_and_video.rst index 144ba222fdaa5828482a05463a1e48d17b73d7bd..ef84f357a58c1d7aff86db1f296cd38f61e7dca6 100644 --- a/modules/highgui/doc/reading_and_writing_images_and_video.rst +++ b/modules/highgui/doc/reading_and_writing_images_and_video.rst @@ -191,8 +191,8 @@ VideoCapture ------------ .. ocv:class:: VideoCapture -Class for video capturing from video files or cameras. -The class provides C++ API for capturing video from cameras or for reading video files. Here is how the class can be used: :: +Class for video capturing from video files, image sequences or cameras. +The class provides C++ API for capturing video from cameras or for reading video files and image sequences. Here is how the class can be used: :: #include "opencv2/opencv.hpp" @@ -241,7 +241,7 @@ VideoCapture constructors. .. ocv:cfunction:: CvCapture* cvCaptureFromCAM( int device ) .. ocv:cfunction:: CvCapture* cvCaptureFromFile( const char* filename ) - :param filename: name of the opened video file + :param filename: name of the opened video file (eg. video.avi) or image sequence (eg. img%02d.jpg) :param device: id of the opened video capturing device (i.e. a camera index). If there is a single camera connected, just pass 0. @@ -258,7 +258,7 @@ Open video file or a capturing device for video capturing .. ocv:pyfunction:: cv2.VideoCapture.open(filename) -> retval .. ocv:pyfunction:: cv2.VideoCapture.open(device) -> retval - :param filename: name of the opened video file + :param filename: name of the opened video file (eg. video.avi) or image sequence (eg. img%02d.jpg) :param device: id of the opened video capturing device (i.e. a camera index). diff --git a/samples/cpp/starter_video.cpp b/samples/cpp/starter_video.cpp index 5bceb552cd8c75b746acfe67b136cec97295a200..87b414df6ce0c2d74df4e55a284b7c248e03e435 100644 --- a/samples/cpp/starter_video.cpp +++ b/samples/cpp/starter_video.cpp @@ -4,31 +4,34 @@ * Created on: Nov 23, 2010 * Author: Ethan Rublee * -* A starter sample for using opencv, get a video stream and display the images +* Modified on: April 17, 2013 +* Author: Kevin Hughes +* +* A starter sample for using OpenCV VideoCapture with capture devices, video files or image sequences * easy as CV_PI right? */ -#include "opencv2/highgui/highgui.hpp" + +#include + #include -#include #include using namespace cv; using namespace std; - - //hide the local functions in an anon namespace namespace { void help(char** av) { - cout << "\nThis program justs gets you started reading images from video\n" - "Usage:\n./" << av[0] << "