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

todo

parent 78ae68aa
Branches
Tags
No related merge requests found
...@@ -277,9 +277,9 @@ int main(int argc, char * argv[]) ...@@ -277,9 +277,9 @@ int main(int argc, char * argv[])
} }
cout <<"b) we train the background with random choosen files"<< fileName<<endl; cout <<"b) we train the background with random choosen files"<< fileName<<endl;
int j=255; //int j=255;
vector<string> myRandomTrainList; //we save all draws in a list which will save to the results vector<string> myRandomTrainList; //we save all draws in a list which will save to the results
for(i=0;i<amountTrainingSteps;i++,j--) for(i=0;i<amountTrainingSteps;i++)
{ {
//random index //random index
...@@ -300,15 +300,15 @@ int main(int argc, char * argv[]) ...@@ -300,15 +300,15 @@ int main(int argc, char * argv[])
cv::Mat img_mask; cv::Mat img_mask;
cv::Mat img_bkgmodel; cv::Mat img_bkgmodel;
//adapter learning rate // //adapter learning rate
if(j>62) // if(j>62)
bgs->setLearningRate(j); // bgs->setLearningRate(j);
bgs->process(img_input, img_mask, img_bkgmodel); // by default, it shows automatically the foreground mask image bgs->process(img_input, img_mask, img_bkgmodel); // by default, it shows automatically the foreground mask image
//we save the bk gmodel // //we save the bk gmodel
std::string bkTestFileName = inputDir + "bk_"+TToolBox::mNzero(i)+".jpg"; // std::string bkTestFileName = inputDir + "bk_"+TToolBox::mNzero(i)+".jpg";
imwrite(bkTestFileName.c_str(),img_bkgmodel); // imwrite(bkTestFileName.c_str(),img_bkgmodel);
} }
else else
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment