You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
#include "video_proc_ts.h"
_VP_timestamp::_VP_timestamp() {}
_VP_timestamp::~_VP_timestamp() {}
void _VP_timestamp::process(cv::Mat * Frame){ char DateStr[200]; time_t t; struct tm * tmp;
t = time(NULL); tmp = gmtime(&t); if (tmp == NULL) { perror("localtime"); return; }; if (strftime(DateStr, sizeof(DateStr), "%F %T GMT", tmp) == 0) { fprintf(stderr, "strftime returned 0"); return; }; rectangle(*Frame, cv::Point(10, 10), cv::Point(490, 60), cv::Scalar(0, 0, 0), CV_FILLED); putText(*Frame, DateStr, cv::Point(30, 45), cv::FONT_HERSHEY_SIMPLEX, 1, cv::Scalar(0, 255, 255), 3);}
|