multithreading fixed for gain map, common mode and ghosting

This commit is contained in:
2019-09-18 13:21:47 +02:00
parent 400e69cef2
commit 61c495f218
10 changed files with 283 additions and 106 deletions

View File

@ -9,16 +9,24 @@ public:
virtual int getROI(int ix, int iy){return ix+(iy/200)*400;};
virtual void addToCommonMode(double val, int ix=0, int iy=0) {
if (ix<rows || ix>399-rows) {
if (iy<rows || iy>399-rows) {
int iroi=getROI(ix,iy);
// cout << iy << " " << ix << " " << iroi ;
if (iroi>=0 && iroi<nROI) {
mean[iroi]+=val;
mean2[iroi]+=val*val;
nCm[iroi]++;
if (nCm[iroi]>rows) cout << "Too many pixels added " << nCm[iroi] << endl;
/* if (ix==10 && iy<20) */
/* cout << " ** "<<val << " " << mean[iroi] << " " << nCm[iroi] << " " << getCommonMode(ix, iy) << endl; */
}
}
};
virtual commonModeSubtractionColumn *Clone() {
return new commonModeSubtractionColumn(this->rows);
}
private:
int rows;
};
@ -47,7 +55,6 @@ class moench03CommonMode : public commonModeSubtractionColumn {
moench03CommonMode(int nr=20) : commonModeSubtractionColumn(nr){} ;
};