ffmpeg H265转Mat使用opencv保存图片

2022-11-12 14:15:36 浏览数 (1)

代码语言:javascript复制
 cv::Mat outMat = ffv.H265FrameToCVMat(pstPack[i].pu8Addr, pstPack[i].u32Len);
 
 if (!outMat.empty())
 {
      char pic_filename[128];
      sprintf(pic_filename, "/mnt/nfs/save_img/%d.png" ,pic_num);
      pic_num  ;
      bool wFlag = cv::imwrite(pic_filename, outMat);
      if(wFlag)
      {
          printf("save %s success n", pic_filename);
      }
 }

0 人点赞