使用opencv

时间:2019-04-25 08:19:18

标签: c++ opencv

我的任务是在触发后使用提取1min的视频之前触发->它包含datetimeformat(190425132148)时,我的传递通过了。我需要将此格式转换为分钟并减去1min(21-1)格式的分钟从20:00开始播放20:00,直到21:00结束,恰好是1分钟的视频需要保存并保存在单独的文件夹中。但是我每5分钟录制一次视频。我不知道该提取如何。 下面是代码,

   tm exampleTime() 
   {

struct tm tm;

strptime("2019-04-09 14:28:16", "%Y-%m-%d %H:%M:%S", &tm);

return tm;
}

int main() {

    struct tm when;
when = exampleTime();

VideoCapture obj;
Mat frame;

obj.open(recordVideo->getVideoFile(when));

while(obj.read(frame)) {

    imshow("A", frame);

    char exitKeyPress = (char)waitKey(500);   //to terminate
    if( exitKeyPress == ESC_KEY_PRESSED )
        break;
}
obj.release();

我需要拍摄视频的前1分钟

0 个答案:

没有答案