1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #include "stdafx.h"
- #include <iostream>
- #include <strstream>
- #include <time.h>
- #include "imstorage_manager.h"
- //using namespace graft_cv;
- void test_file_storeage()
- {
- ///*extern CRITICAL_SECTION g_cs;
- //InitializeCriticalSection(&g_cs);*/
-
- CImStoreManager ism = CImStoreManager();
- //ism.setStoreDays(1);
- string path = "D:\\logs\\img_depo";
- ism.setStoreDir(path);
- for(size_t i=0;i<7;++i){
- stringstream buff,bid;
- buff <<"D:\\private\\grafting_robot\\samples\\rootstlock_pumpkin\\000\\"<<i<<".jpg";
- bid<<time(NULL)<<"_"<<i;
- string fn = buff.str();
- string fid = bid.str();
- Mat img = imread(fn);
- ism.saveImage(img,fid);
- }
-
- Sleep(5000);
-
- //DeleteCriticalSection(&g_cs);
- }
- //int _tmain(int argc, _TCHAR* argv[])
- //{
- // test_file_storeage();
- //
- // return 0;
- //}
|