Added new mode "Horizontal on PDAF rows only" for the "line noise filter"

This commit is contained in:
Alberto Griggio
2018-03-10 22:56:45 +01:00
parent 478ebb1a49
commit 81210d18b4
8 changed files with 79 additions and 9 deletions

View File

@@ -39,7 +39,7 @@ using namespace rtengine;
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
void RawImageSource::CLASS cfa_linedn(float noise, bool horizontal, bool vertical)
void RawImageSource::CLASS cfa_linedn(float noise, bool horizontal, bool vertical, const CFALineDenoiseRowBlender &rowblender)
{
// local variables
int height = H, width = W;
@@ -254,10 +254,15 @@ void RawImageSource::CLASS cfa_linedn(float noise, bool horizontal, bool vertica
// copy temporary buffer back to image matrix
#pragma omp for
for(int i = 0; i < height; i++)
for(int j = 0; j < width; j++) {
rawData[i][j] = RawDataTmp[i * width + j];
for(int i = 0; i < height; i++) {
float f = rowblender(i);
if (f > 0.f) {
float f2 = 1.f - f;
for(int j = 0; j < width; j++) {
rawData[i][j] = f * RawDataTmp[i * width + j] + f2 * rawData[i][j];
}
}
}
} // end of parallel processing