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

fix logic bug, max area threshold to small, will eleminate a lot of frames, silent mode again

parent 48fbbfa8
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,7 @@ based on original demo.cpp
#define PROCESS_CENTER_VERSION_MAJOR 0
#define PROCESS_CENTER_VERSION_MINOR 9
#define PROCESS_CENTER_VERSION_MINOR_FIXES 2
#define PROCESS_CENTER_VERSION_MINOR_FIXES 3
//opencv
#include <opencv2/opencv.hpp>
......@@ -320,10 +320,10 @@ int main(int argc, char * argv[])
fileName = inputDir + TToolBox::getFileName(frameCounter);
//check the string
cout <<"open fileName: "<< fileName<<endl;
if(fileName.empty())
cerr <<"error: empty string fileName"<<endl;
// //check the string
// cout <<"open fileName: "<< fileName<<endl;
// if(fileName.empty())
// cerr <<"error: empty string fileName"<<endl;
cout <<"\t"<<frameCounter<<"\tof \t"<<amountFiles<<" load file :"<< fileName<<endl;
......@@ -410,7 +410,7 @@ int main(int argc, char * argv[])
vector<Point2f> recCenterPoints;
float areaMinThreshold = 150;
float areaMaxThreshold = 15000; //TODO apply moving filter ??, an more adaptive approach
float areaMaxThreshold = 300000; //old max threshold was to small //TODO apply moving filter ??, an more adaptive approach
//iterate all rectangles
for( size_t i = 0; i< minRect.size(); i++ )
......@@ -529,14 +529,14 @@ int main(int argc, char * argv[])
#endif
cout<<"we try to write file: "<< i <<endl;
//cout<<"we try to write file: "<< i <<endl;
//! step 8: we write down all our results in yml file
std::string nameOutPutFileData = outputDir + TToolBox::mNzero(frameCounter) + ".yml";
//check the string
cout <<"write output nameOutPutFileData: "<< nameOutPutFileData<<endl;
if(nameOutPutFileData.empty())
cerr <<"error: empty string nameOutPutFileData"<<endl;
// //check the string
// cout <<"write output nameOutPutFileData: "<< nameOutPutFileData<<endl;
// if(nameOutPutFileData.empty())
// cerr <<"error: empty string nameOutPutFileData"<<endl;
FileStorage fs(nameOutPutFileData.c_str(), FileStorage::WRITE);
......@@ -582,10 +582,10 @@ int main(int argc, char * argv[])
//we write the file down
std::string nameOutPutFileDBGpic = outputDir + TToolBox::mNzero(frameCounter) + ".jpg";
//check the string
cout <<"write dbg file: "<< nameOutPutFileDBGpic<<endl;
if(nameOutPutFileDBGpic.empty())
cerr <<"error: empty string nameOutPutFileDBGpic"<<endl;
// //check the string
// cout <<"write dbg file: "<< nameOutPutFileDBGpic<<endl;
// if(nameOutPutFileDBGpic.empty())
// cerr <<"error: empty string nameOutPutFileDBGpic"<<endl;
imwrite(nameOutPutFileDBGpic.c_str(),imgOverlay2);
......@@ -615,7 +615,6 @@ int main(int argc, char * argv[])
double elapsed = double(endAll - beginAll) / CLOCKS_PER_SEC;
cout <<"process : "<<amountFiles<<" files took:\t"<<(int)(elapsed/60)<<" min -\t"<<(int)(elapsed/60/60)<<" h \n in total"<<endl;
//we write the random file list to a file
std::string nameOutRandomFile = outputDir + "randlist.yml";
FileStorage fs(nameOutRandomFile.c_str(), FileStorage::WRITE);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment