From 884e55abd48d4efa0c6bfe06469e7b1abea51c14 Mon Sep 17 00:00:00 2001 From: dviid Date: Thu, 1 Mar 2012 08:52:32 +0100 Subject: [PATCH] MAXBLOBS RelaxRate --- config.refindx | 1 + src/RelaxRateAnalysis.cpp | 9 +++++++-- src/RelaxRateAnalysis.h | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/config.refindx b/config.refindx index 392ceb3..8f73c79 100644 --- a/config.refindx +++ b/config.refindx @@ -39,6 +39,7 @@ 51 + 25 \ No newline at end of file diff --git a/src/RelaxRateAnalysis.cpp b/src/RelaxRateAnalysis.cpp index 1ba57e5..1f87ec7 100755 --- a/src/RelaxRateAnalysis.cpp +++ b/src/RelaxRateAnalysis.cpp @@ -13,6 +13,7 @@ using Poco::Thread; #define NUMBER_RUNS 1 #define ACQUIRE_TIME 20 #define TRESHOLD 80 +#define MAXBLOBS 15 void RelaxRateAnalysis::setup(int camWidth, int camHeight) { @@ -27,6 +28,10 @@ void RelaxRateAnalysis::setup(int camWidth, int camHeight) _treshold = RefractiveIndex::XML.getValue("config:relaxrate:treshold", TRESHOLD); cout << "TRESHOLD RelaxRateAnalysis " << _treshold << endl; + _maxblobs = RefractiveIndex::XML.getValue("config:relaxrate:maxblobs", MAXBLOBS); + cout << "MAXBLOBS RelaxRateAnalysis " << _maxblobs << endl; + + //int acq_run_time = 20; // 20 seconds of acquiring per run DELTA_T_SAVE = 2*(10*acq_run_time/2); // for 20 seconds, we want this to be around 200 files @@ -145,10 +150,10 @@ void RelaxRateAnalysis::synthesise() rfiCvContourFinder* cf = new rfiCvContourFinder(); - cf->findContours(cvGrayDiff1, 20, (image1.width * image1.height) / 4, 25, true); + cf->findContours(cvGrayDiff1, 20, (image1.width * image1.height) / 4, _maxblobs, true); cvContourFinderVect.push_back(cf); - + } } diff --git a/src/RelaxRateAnalysis.h b/src/RelaxRateAnalysis.h index 2b75cef..e19babd 100755 --- a/src/RelaxRateAnalysis.h +++ b/src/RelaxRateAnalysis.h @@ -36,6 +36,7 @@ protected: float c, _frame_cnt, _frame_cnt_max, _anim_cnt_max; int _treshold; + int _maxblobs; bool _show_image, _image_shown; ofImage image1;