diff --git a/.gitattributes b/.gitattributes index f415166..1a677ab 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,6 +1,3 @@ -*.rc eol=crlf -*.rc2 eol=crlf *.vcproj eol=crlf *.bat eol=crlf *.sln eol=crlf -*.ico -text \ No newline at end of file diff --git a/.gitignore b/.gitignore index 1767fc4..905cdaf 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,6 @@ qt_gui/ fet/etc/ *.exe *.pdb -vs2010mfc/src/bgslibrary_vs2010_mfc.aps \ No newline at end of file +vs2010mfc/src/bgslibrary_vs2010_mfc.aps +*.suo +vs2010mfc/src/bgslibrary_vs2010_mfc.v12.suo \ No newline at end of file diff --git a/package_bgs/dp/DPAdaptiveMedianBGS.cpp b/package_bgs/dp/DPAdaptiveMedianBGS.cpp index e9ef4fe..0ae68fe 100644 --- a/package_bgs/dp/DPAdaptiveMedianBGS.cpp +++ b/package_bgs/dp/DPAdaptiveMedianBGS.cpp @@ -61,6 +61,11 @@ void DPAdaptiveMedianBGS::process(const cv::Mat &img_input, cv::Mat &img_output, bgs.Initalize(params); bgs.InitModel(frame_data); + + std::cout << "threshold: " << threshold << std::endl; + std::cout << "samplingRate: " << samplingRate << std::endl; + std::cout << "learningFrames: " << learningFrames << std::endl; + std::cout << "showOutput: " << showOutput << std::endl; } bgs.Subtract(frameNumber, frame_data, lowThresholdMask, highThresholdMask); @@ -68,11 +73,15 @@ void DPAdaptiveMedianBGS::process(const cv::Mat &img_input, cv::Mat &img_output, bgs.Update(frameNumber, frame_data, lowThresholdMask); cv::Mat foreground(highThresholdMask.Ptr()); + cv::Mat background(bgs.Background()->Ptr()); - if(showOutput) - cv::imshow("Adaptive Median (McFarlane&Schofield)", foreground); + if(showOutput){ + cv::imshow("Adaptive Median FG (McFarlane&Schofield)", foreground); + cv::imshow("Adaptive Median BG (McFarlane&Schofield)", background); + } foreground.copyTo(img_output); + background.copyTo(img_bgmodel); delete frame; firstTime = false; diff --git a/package_bgs/dp/DPPratiMediodBGS.cpp b/package_bgs/dp/DPPratiMediodBGS.cpp index 65c3ef3..ba1d6be 100644 --- a/package_bgs/dp/DPPratiMediodBGS.cpp +++ b/package_bgs/dp/DPPratiMediodBGS.cpp @@ -69,11 +69,15 @@ void DPPratiMediodBGS::process(const cv::Mat &img_input, cv::Mat &img_output, cv bgs.Update(frameNumber, frame_data, lowThresholdMask); cv::Mat foreground(highThresholdMask.Ptr()); + cv::Mat background(bgs.Background()->Ptr()); - if(showOutput) - cv::imshow("Temporal Median (Cucchiara&Calderara)", foreground); + if(showOutput){ + cv::imshow("Temporal Median FG (Cucchiara&Calderara)", foreground); + cv::imshow("Temporal Median BG (Cucchiara&Calderara)", background); + } foreground.copyTo(img_output); + background.copyTo(img_bgmodel); delete frame; firstTime = false; diff --git a/vs2010mfc/src/bgslibrary_vs2010_mfc.rc b/vs2010mfc/src/bgslibrary_vs2010_mfc.rc index a5c55ee..7251658 100644 Binary files a/vs2010mfc/src/bgslibrary_vs2010_mfc.rc and b/vs2010mfc/src/bgslibrary_vs2010_mfc.rc differ diff --git a/vs2010mfc/src/res/bgslibrary_vs2010_mfc.rc2 b/vs2010mfc/src/res/bgslibrary_vs2010_mfc.rc2 index bfac6f8..e327fa8 100644 Binary files a/vs2010mfc/src/res/bgslibrary_vs2010_mfc.rc2 and b/vs2010mfc/src/res/bgslibrary_vs2010_mfc.rc2 differ