#include <time.h>

char pStrPath1[20];
time_t currTime;
struct tm *mt;
Mat saveImg1;

currTime = time(NULL);
mt = localtime(&currTime);
/*根据日期生成文件名*/
sprintf(pStrPath1, "D:\\images\\face\\yr0905\\%d%02d%02d%02d%02d%02d.jpg", mt->tm_year + 1900, mt->tm_mon + 1, mt->tm_mday, mt->tm_hour, mt->tm_min, mt->tm_sec);
imwrite(pStrPath1, saveImg1);

 

相关文章:

  • 2021-11-02
  • 2021-10-27
  • 2021-11-30
  • 2021-10-14
  • 2022-12-23
  • 2021-12-10
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案