Demosaicing and pre-processing parameters selectable for each image.
Dark frames subtraction and badpixels file support
Fast loading in editor.
This commit is contained in:
ffsup2
2010-10-30 22:14:47 +02:00
parent 5e7a81f0f1
commit 647dfb8366
153 changed files with 10304 additions and 6407 deletions

View File

@@ -64,7 +64,9 @@ void RawImageSource::CLASS cfa_linedn(float noise)
int ex, ey;
int verbose=1;
float eps=1e-10; //tolerance to avoid dividing by zero
const float clip_pt = 0.8*ri->defgain;
float eps=1e-5; //tolerance to avoid dividing by zero
float gauss[5] = {0.20416368871516755, 0.18017382291138087, 0.1238315368057753, 0.0662822452863612, 0.02763055063889883};
float rolloff[8] = {0, 0.135335, 0.249352, 0.411112, 0.606531, 0.800737, 0.945959, 1}; //gaussian with sigma=3
@@ -189,7 +191,8 @@ void RawImageSource::CLASS cfa_linedn(float noise)
for (rr=16; rr < numrows-16; rr++) {
row = rr + top;
for (col=16+left, indx=rr*TS+16; indx < rr*TS+numcols-16; indx++, col++) {
rawData[row][col] = CLIP((int)(cfadn[indx]+ 0.5));
if (rawData[row][col]<clip_pt && cfadn[indx]<clip_pt)
rawData[row][col] = CLIP((int)(cfadn[indx]+ 0.5));
}
}
if(plistener) plistener->setProgress(fabs((float)top/height));