int maxlen=1024*1024; std::vector<byte>buf; FILE* f= fopen( "c:/f.jpg", "rb" ); string signature(maxlen, ' '); maxlen = fread(&signature[0], 1, maxlen, f ); fclose(f); buf.resize(maxlen); signature = signature.substr(0, maxlen); memcpy(&buf[0],&signature[0],maxle...
定义一个函数,参数为(jpg文件路径与名称,如c:\a.jpg)function I = imread_ai(Image_file_name);调用matlab的图像读取函数imread读图片 I = imread(Image_file_name);存成mat文件,下次用load读取 save('filename',I)