starter_video.cpp hid local functions
This commit is contained in:
parent
3441b2df65
commit
69c626e720
@ -19,7 +19,9 @@
|
|||||||
using namespace cv;
|
using namespace cv;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
void help(char** av) {
|
//hide the local functions in an anon namespace
|
||||||
|
namespace {
|
||||||
|
void help(char** av) {
|
||||||
cout << "The program captures frames from a video file, image sequence (01.jpg, 02.jpg ... 10.jpg) or camera connected to your computer." << endl
|
cout << "The program captures frames from a video file, image sequence (01.jpg, 02.jpg ... 10.jpg) or camera connected to your computer." << endl
|
||||||
<< "Usage:\n" << av[0] << " <video file, image sequence or device number>" << endl
|
<< "Usage:\n" << av[0] << " <video file, image sequence or device number>" << endl
|
||||||
<< "q,Q,esc -- quit" << endl
|
<< "q,Q,esc -- quit" << endl
|
||||||
@ -30,9 +32,9 @@ void help(char** av) {
|
|||||||
<< "\texample: " << av[0] << " video.avi" << endl
|
<< "\texample: " << av[0] << " video.avi" << endl
|
||||||
<< "\tYou can also pass the path to an image sequence and OpenCV will treat the sequence just like a video." << endl
|
<< "\tYou can also pass the path to an image sequence and OpenCV will treat the sequence just like a video." << endl
|
||||||
<< "\texample: " << av[0] << " right%%02d.jpg" << endl;
|
<< "\texample: " << av[0] << " right%%02d.jpg" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
int process(VideoCapture& capture) {
|
int process(VideoCapture& capture) {
|
||||||
int n = 0;
|
int n = 0;
|
||||||
char filename[200];
|
char filename[200];
|
||||||
string window_name = "video | q or esc to quit";
|
string window_name = "video | q or esc to quit";
|
||||||
@ -63,6 +65,7 @@ int process(VideoCapture& capture) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int ac, char** av) {
|
int main(int ac, char** av) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user