You can specify filename for output video by using -out_filename res.avi

This commit is contained in:
AlexeyAB
2017-08-23 21:54:24 +03:00
parent 4d2fefd75a
commit 76276fdbea
11 changed files with 21 additions and 18 deletions

View File

@ -115,7 +115,7 @@ double get_wall_time()
return (double)time.tv_sec + (double)time.tv_usec * .000001;
}
void demo(char *cfgfile, char *weightfile, float thresh, int cam_index, const char *filename, char **names, int classes, int frame_skip, char *prefix)
void demo(char *cfgfile, char *weightfile, float thresh, int cam_index, const char *filename, char **names, int classes, int frame_skip, char *prefix, char *out_filename)
{
//skip = frame_skip;
image **alphabet = load_alphabet();
@ -194,7 +194,7 @@ void demo(char *cfgfile, char *weightfile, float thresh, int cam_index, const ch
if(!prefix){
//show_image(disp, "Demo");
show_image_cv_ipl(show_img, "Demo");
show_image_cv_ipl(show_img, "Demo", out_filename);
int c = cvWaitKey(1);
if (c == 10){
if(frame_skip == 0) frame_skip = 60;
@ -244,7 +244,7 @@ void demo(char *cfgfile, char *weightfile, float thresh, int cam_index, const ch
}
}
#else
void demo(char *cfgfile, char *weightfile, float thresh, int cam_index, const char *filename, char **names, int classes, int frame_skip, char *prefix)
void demo(char *cfgfile, char *weightfile, float thresh, int cam_index, const char *filename, char **names, int classes, int frame_skip, char *prefix, char *out_filename)
{
fprintf(stderr, "Demo needs OpenCV for webcam images.\n");
}