Patch to fix highlight speckling when using line denoise + AMaZE.
This commit is contained in:
@@ -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++) {
|
||||
ri->data[row][col] = CLIP((int)(cfadn[indx]+ 0.5));
|
||||
if (ri->data[row][col]<clip_pt && cfadn[indx]<clip_pt)
|
||||
ri->data[row][col] = CLIP((int)(cfadn[indx]+ 0.5));
|
||||
}
|
||||
}
|
||||
if(plistener) plistener->setProgress(fabs((float)top/height));
|
||||
|
Reference in New Issue
Block a user