MAXBLOBS RelaxRate

This commit is contained in:
dviid 2012-03-01 08:52:32 +01:00
parent 46d02b4166
commit 884e55abd4
3 changed files with 9 additions and 2 deletions

View File

@ -39,6 +39,7 @@
<relaxrate> <relaxrate>
<treshold>51</treshold> <treshold>51</treshold>
<maxblobs>25</maxblobs>
</relaxrate> </relaxrate>
</config> </config>

View File

@ -13,6 +13,7 @@ using Poco::Thread;
#define NUMBER_RUNS 1 #define NUMBER_RUNS 1
#define ACQUIRE_TIME 20 #define ACQUIRE_TIME 20
#define TRESHOLD 80 #define TRESHOLD 80
#define MAXBLOBS 15
void RelaxRateAnalysis::setup(int camWidth, int camHeight) 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); _treshold = RefractiveIndex::XML.getValue("config:relaxrate:treshold", TRESHOLD);
cout << "TRESHOLD RelaxRateAnalysis " << _treshold << endl; 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 //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 DELTA_T_SAVE = 2*(10*acq_run_time/2); // for 20 seconds, we want this to be around 200 files
@ -145,7 +150,7 @@ void RelaxRateAnalysis::synthesise()
rfiCvContourFinder* cf = new rfiCvContourFinder(); 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); cvContourFinderVect.push_back(cf);

View File

@ -36,6 +36,7 @@ protected:
float c, _frame_cnt, _frame_cnt_max, _anim_cnt_max; float c, _frame_cnt, _frame_cnt_max, _anim_cnt_max;
int _treshold; int _treshold;
int _maxblobs;
bool _show_image, _image_shown; bool _show_image, _image_shown;
ofImage image1; ofImage image1;