Bug correction in the DIRPYREQUALIZER that created random noise in the image.
This commit is contained in:
@@ -194,7 +194,7 @@ namespace rtengine {
|
|||||||
|
|
||||||
|
|
||||||
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
};
|
}
|
||||||
|
|
||||||
void ImProcFunctions::dirpyr_channel(unsigned short ** data_fine, unsigned short ** data_coarse, int width, int height, int * rangefn, int level, int scale, const double * mult )
|
void ImProcFunctions::dirpyr_channel(unsigned short ** data_fine, unsigned short ** data_coarse, int width, int height, int * rangefn, int level, int scale, const double * mult )
|
||||||
{
|
{
|
||||||
@@ -238,14 +238,12 @@ namespace rtengine {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
}
|
||||||
|
|
||||||
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
void ImProcFunctions::idirpyr_eq_channel(unsigned short ** data_coarse, unsigned short ** data_fine, int ** buffer, int width, int height, int level, const double * mult )
|
void ImProcFunctions::idirpyr_eq_channel(unsigned short ** data_coarse, unsigned short ** data_fine, int ** buffer, int width, int height, int level, const double * mult )
|
||||||
{
|
{
|
||||||
int hipass;
|
|
||||||
|
|
||||||
float noisehi = 1.33*noise*mult[4]/pow(3,level), noiselo = 0.66*noise*mult[4]/pow(3,level);
|
float noisehi = 1.33*noise*mult[4]/pow(3,level), noiselo = 0.66*noise*mult[4]/pow(3,level);
|
||||||
float * irangefn = new float [0x20000];
|
float * irangefn = new float [0x20000];
|
||||||
|
|
||||||
@@ -265,15 +263,16 @@ namespace rtengine {
|
|||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
#pragma omp parallel for
|
#pragma omp parallel for
|
||||||
#endif
|
#endif
|
||||||
for(int i = 0; i < height; i++)
|
for(int i = 0; i < height; i++) {
|
||||||
for(int j = 0; j < width; j++) {
|
for(int j = 0; j < width; j++) {
|
||||||
hipass = (data_fine[i][j]-data_coarse[i][j]);
|
int hipass = (data_fine[i][j]-data_coarse[i][j]);
|
||||||
buffer[i][j] += irangefn[hipass+0x10000] * hipass ;
|
buffer[i][j] += irangefn[hipass+0x10000] * hipass ;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
delete [] irangefn;
|
delete [] irangefn;
|
||||||
|
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
#undef DIRWT_L
|
#undef DIRWT_L
|
||||||
|
Reference in New Issue
Block a user