标签:lin fprintf get pre 进制 one turn isp 二进制文件
#include <fstream>
1 #include <fstream>
2 string path = "";
3 FILE* fp = fopen(path.c_str(), "r");
4 while(!feof(fp)){
5 char str[20];
6 fgets(str, 20, fp);
7 string str_s(str);
8 int eindx = str_s.find("XX.jpg");
9 string filename = "XX" + str_s.substr(0, eindx) + ".jpg";
10 im = imread(filename, CV_LOAD_IMAGE_COLOR);
11 if(im.empty()){
12 fprintf(stderr, "imread %s failed\n", filename);
13 return -1;
14 }
FILE *fd = NULL;
string tmp = lines_[lines_id_].first;
int eindx = tmp.find("XX.png");
string finenames = "XXX" + tmp.substr(38, eindx) + "y";
if(fd){
fwrite(dmap.data, sizeof(float), dmap.cols*dmap.rows, fd);
fclose(fd);
}else{
LOG(INFO) << "CANNOT OPEN FILE " << "XXX" + tmp.substr(38, eindx) + ".y";
}
标签:lin fprintf get pre 进制 one turn isp 二进制文件
原文地址:https://www.cnblogs.com/byteHuang/p/9364486.html