OpenCV数字图像处理十:读写txt文件,在图像训练和测试的时候经常用到

#include 
#include 
#include 


using namespace std;
using namespace cv;


bool showSteps = true;
bool writeModel = true;
bool saveRegions = true;


#define dataNum ( 4381 )


int main()
{
FILE *fp;
int i,j;
if( ( fp=fopen("C:\\Temp\\negtives\\neg.txt","r") )==NULL ){
printf("can not open the file\n");
exit(0);
}


char *fileName = NULL;
fileName = (char *)malloc(dataNum*sizeof(char));

for(i=0;i


你可能感兴趣的:(OpenCV数字图像处理)