Skip to content
Snippets Groups Projects
Commit 33167d26 authored by Thomas Boy's avatar Thomas Boy
Browse files

small fix of non readable files

parent 697dc967
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,7 @@ based on original demo.cpp ...@@ -14,7 +14,7 @@ based on original demo.cpp
#define PROCESS_CENTER_VERSION_MAJOR 0 #define PROCESS_CENTER_VERSION_MAJOR 0
#define PROCESS_CENTER_VERSION_MINOR 8 #define PROCESS_CENTER_VERSION_MINOR 9
//opencv //opencv
#include <opencv2/opencv.hpp> #include <opencv2/opencv.hpp>
...@@ -295,8 +295,9 @@ int main(int argc, char * argv[]) ...@@ -295,8 +295,9 @@ int main(int argc, char * argv[])
} }
else else
{ {
cout<<"error loading file: "<< fileName<<", will abort"<<endl; cout<<"error loading file: "<< fileName<<", will draw again"<<endl;
return EXIT_FAILURE; i--;
//return EXIT_FAILURE;
} }
} }
...@@ -306,6 +307,8 @@ int main(int argc, char * argv[]) ...@@ -306,6 +307,8 @@ int main(int argc, char * argv[])
int everyPic=60*5; int everyPic=60*5;
int frameCounter=0; int frameCounter=0;
vector<string> myFileErrorList;
for(frameCounter=0;frameCounter<amountFiles;frameCounter++) for(frameCounter=0;frameCounter<amountFiles;frameCounter++)
{ {
...@@ -550,8 +553,8 @@ int main(int argc, char * argv[]) ...@@ -550,8 +553,8 @@ int main(int argc, char * argv[])
}//end if the loaded picture has data }//end if the loaded picture has data
else else
{ {
cout<<"error loading file: "<< fileName<<", will abort"<<endl; cout<<"error loading file: "<< fileName<<", will skip this file"<<endl;
return EXIT_FAILURE; myFileErrorList.push_back(fileName);
} }
//we calc the time which we used for a picture //we calc the time which we used for a picture
...@@ -577,6 +580,15 @@ int main(int argc, char * argv[]) ...@@ -577,6 +580,15 @@ int main(int argc, char * argv[])
fs << "randomlist" << myRandomTrainList; fs << "randomlist" << myRandomTrainList;
fs.release(); fs.release();
//we write the random file list to a file
std::string nameOutErrorList = outputDir + "fileErrorList.yml";
cout <<"amount of file errors: "<< myFileErrorList.size()<<endl;
FileStorage fs2(nameOutErrorList.c_str(), FileStorage::WRITE);
fs2 << "fileErrorList" << myFileErrorList;
fs2.release();
delete bgs; delete bgs;
// capture.release(); // capture.release();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment