用opencv如何分段保存视频,文件名时间按系统时间命名。
保存的视频要分成多个文件,要用到线程?求大神讲解下,下面是调用系统时间的代码:
#include "stdafx.h"
#include <iostream>
#include <time.h>
#include <stdio.h>
int _tmain(int argc, _TCHAR* argv[])
{
while(1)
{
time_t t = time(0);
char tmp[64];
strftime( tmp, sizeof(tmp), "%Y/%m/%d %X %A 本年第%j天 %z",localtime(&t) );
puts( tmp );
}
system("pause");
return 0;
}