11 string folder_path=
"/media/Novo volume/bags_tese_results/teste_AtlasCar_outside/Rua_DETI_vir";
23 copy(directory_iterator(p), directory_iterator(), back_inserter(vect));
27 cout << p <<
" is not a folder"<<endl;
32 catch (
const filesystem_error& ex)
34 cout << ex.what() <<
'\n';
37 sort(vect.begin(), vect.end() );
39 frame=imread(vect[0].
string(), CV_LOAD_IMAGE_COLOR);
41 for(
int i=0; i<vect.size(); i++)
46 cout<<vect.size()<<endl;
48 VideoWriter record(
"/media/Novo volume/bags_tese_results/videos/Rua_DETI_vir.avi", CV_FOURCC(
'D',
'I',
'V',
'X'), 16, frame.size(),
true);
49 if( !record.isOpened() ) {
50 printf(
"VideoWriter failed to open!\n");
54 namedWindow(
"video",1);
56 for(uint n=1; n<vect.size();n++)
59 string ImgPath=vect[n].string();
60 frame=imread(ImgPath, CV_LOAD_IMAGE_COLOR);
63 imshow(
"video", frame);
68 if(waitKey(30) >= 0)
break;