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

details

parent 4336246f
No related branches found
No related tags found
No related merge requests found
...@@ -195,8 +195,6 @@ int main(int argc, char * argv[]) ...@@ -195,8 +195,6 @@ int main(int argc, char * argv[])
//see paper https://dl.acm.org/citation.cfm?id=2321600 //see paper https://dl.acm.org/citation.cfm?id=2321600
//https://ieeexplore.ieee.org/document/4527178/ //https://ieeexplore.ieee.org/document/4527178/
//was in benchmark on top https://www.researchgate.net/publication/259340906_A_comprehensive_review_of_background_subtraction_algorithms_evaluated_with_synthetic_and_real_videos //was in benchmark on top https://www.researchgate.net/publication/259340906_A_comprehensive_review_of_background_subtraction_algorithms_evaluated_with_synthetic_and_real_videos
//my own adapter to use the model //my own adapter to use the model
int i= 0; int i= 0;
...@@ -311,7 +309,7 @@ int main(int argc, char * argv[]) ...@@ -311,7 +309,7 @@ int main(int argc, char * argv[])
bgs->setFlagWrite(1); bgs->setFlagWrite(1);
bgs->setFlagWriteDBGpic(1); bgs->setFlagWriteDBGpic(1);
int everyPic=60;
for(i=begin;i<begin+steps;i++) for(i=begin;i<begin+steps;i++)
{ {
...@@ -330,6 +328,16 @@ int main(int argc, char * argv[]) ...@@ -330,6 +328,16 @@ int main(int argc, char * argv[])
//cv::imshow("input", img_input); //cv::imshow("input", img_input);
//we write just every xx pic a dbg picture, will speed up
if(i%everyPic==0)
{
bgs->setFlagWrite(1);
}
else
{
bgs->setFlagWrite(0);
}
cv::Mat img_mask; cv::Mat img_mask;
cv::Mat img_bkgmodel; cv::Mat img_bkgmodel;
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
...@@ -346,7 +354,7 @@ int main(int argc, char * argv[]) ...@@ -346,7 +354,7 @@ int main(int argc, char * argv[])
clock_t endAll = clock(); clock_t endAll = clock();
double elapsedSecTotal = double(endAll - beginAll) / CLOCKS_PER_SEC; double elapsedSecTotal = double(endAll - beginAll) / CLOCKS_PER_SEC;
cout <<"process single pic:\t"<<elapsedSecs<<"s"<<amountFiles<<" total:\t"<<(int)(elapsedSecTotal/60)<<" min"<<endl; cout <<"process single pic:\t"<<elapsedSecs<<" s \t:"<<amountFiles<<"\t-\t"<<(int)(elapsedSecTotal/60)<<" min"<<endl;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment