#include <opencv2/opencv.hpp>
#include <windows.h>
#include <stdio.h>
#include <string>
#include <iostream>
using namespace std;
using namespace cv;
int main()
{
char originPath[200]="";
char outPath[200]="";
Mat srcImg;
int truthIndex = 0;
for (int frame = 0; frame<2400; frame++)
{
sprintf(originPath, "E:\\TrainData\\Pos\\%d.bmp", frame);
srcImg = imread(originPath);
if (!srcImg.data)
{
printf("Not found 【%d】 File!",frame);
continue;
}
sprintf(outPath,"E:\\TrainData\\Pos\\Rename\\%d.bmp", truthIndex);
imwrite(outPath, srcImg);
truthIndex++;
}
return 0;
}
【机器学习】对挑选后的训练样本进行连续重命名
最新推荐文章于 2021-12-14 15:11:39 发布