UI bugfixes (thanks Michael).
This commit is contained in:
@@ -161,7 +161,7 @@ namespace rtengine {
|
||||
|
||||
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
// begin block processing of image
|
||||
// begin tile processing of image
|
||||
|
||||
//output buffer
|
||||
Imagefloat * dsttmp = new Imagefloat(imwidth,imheight);
|
||||
@@ -194,8 +194,9 @@ namespace rtengine {
|
||||
tileheight += (tileheight&1);
|
||||
tileHskip = tileheight-overlap;
|
||||
}
|
||||
//now we have tile dimensions, overlaps
|
||||
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
||||
#pragma omp parallel for schedule(dynamic)
|
||||
|
||||
for (int tiletop=0; tiletop<imheight; tiletop+=tileHskip) {
|
||||
@@ -206,11 +207,13 @@ namespace rtengine {
|
||||
int width = tileright-tileleft;
|
||||
int height = tilebottom-tiletop;
|
||||
|
||||
|
||||
//LabImage * labin = new LabImage(width,height);
|
||||
//input L channel
|
||||
array2D<float> Lin(width,height);
|
||||
//wavelet denoised image
|
||||
LabImage * labdn = new LabImage(width,height);
|
||||
//residual between input and denoised L channel
|
||||
array2D<float> Ldetail(width,height);
|
||||
|
||||
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel for
|
||||
#endif
|
||||
@@ -231,13 +234,9 @@ namespace rtengine {
|
||||
labdn->b[i1][j1] = (Y-Z);
|
||||
|
||||
Ldetail[i1][j1] = 0;
|
||||
|
||||
Lin[i1][j1] = Y;
|
||||
}
|
||||
|
||||
array2D<float> Lin(width,height);
|
||||
float * Linptr = Lin;
|
||||
memcpy (Linptr, labdn->data, width*height*sizeof(float));
|
||||
|
||||
//initial impulse denoise
|
||||
impulse_nr (labdn, 50.0f/20.0f);
|
||||
|
||||
@@ -267,6 +266,7 @@ namespace rtengine {
|
||||
impulse_nr (labdn, 50.0f/20.0f);
|
||||
//PF_correct_RT(dst, dst, defringe.radius, defringe.threshold);
|
||||
|
||||
//wavelet denoised L channel
|
||||
array2D<float> Lwavdn(width,height,ARRAY2D_CLEAR_DATA);
|
||||
float * Lwavdnptr = Lwavdn;
|
||||
memcpy (Lwavdnptr, labdn->data, width*height*sizeof(float));
|
||||
@@ -277,6 +277,7 @@ namespace rtengine {
|
||||
// missed by wavelet denoise
|
||||
// blocks are not the same thing as tiles!
|
||||
|
||||
//pixel weight
|
||||
array2D<float> totwt(width,height,ARRAY2D_CLEAR_DATA);//weight for combining blocks
|
||||
|
||||
// allocate DCT data structures
|
||||
@@ -287,6 +288,7 @@ namespace rtengine {
|
||||
//const int nrtiles = numblox_W*numblox_H;
|
||||
// end of tiling calc
|
||||
|
||||
//DCT block data storage
|
||||
float * Lblox = (float *) fftwf_malloc (numblox_W*TS*TS * sizeof (float));
|
||||
float * fLblox = (float *) fftwf_malloc (numblox_W*TS*TS * sizeof (float));
|
||||
|
||||
@@ -296,7 +298,6 @@ namespace rtengine {
|
||||
|
||||
int nfwd[2]={TS,TS};
|
||||
|
||||
|
||||
//for DCT:
|
||||
const fftw_r2r_kind fwdkind[2] = {FFTW_REDFT10, FFTW_REDFT10};
|
||||
const fftw_r2r_kind bwdkind[2] = {FFTW_REDFT01, FFTW_REDFT01};
|
||||
@@ -405,6 +406,7 @@ namespace rtengine {
|
||||
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
// transform denoised "Lab" to output RGB
|
||||
|
||||
//calculate mask for feathering output tile overlaps
|
||||
float * Vmask = new float [height];
|
||||
float * Hmask = new float [width];
|
||||
|
||||
@@ -455,7 +457,6 @@ namespace rtengine {
|
||||
|
||||
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
//delete labin;
|
||||
delete labdn;
|
||||
|
||||
|
||||
|
@@ -216,10 +216,10 @@ void ProcParams::setDefaults () {
|
||||
defringe.threshold = 25;
|
||||
|
||||
dirpyrDenoise.enabled = false;
|
||||
dirpyrDenoise.luma = 10;
|
||||
dirpyrDenoise.Ldetail = 10;
|
||||
dirpyrDenoise.chroma = 10;
|
||||
dirpyrDenoise.gamma = 2.0;
|
||||
dirpyrDenoise.luma = 20;
|
||||
dirpyrDenoise.Ldetail = 50;
|
||||
dirpyrDenoise.chroma = 20;
|
||||
dirpyrDenoise.gamma = 1.7;
|
||||
dirpyrDenoise.expcomp = 0.0;
|
||||
|
||||
edgePreservingDecompositionUI.enabled = false;
|
||||
@@ -478,9 +478,9 @@ int ProcParams::save (Glib::ustring fname, Glib::ustring fname2, ParamsEdited* p
|
||||
|
||||
// save dirpyrDenoise
|
||||
if (!pedited || pedited->dirpyrDenoise.enabled) keyFile.set_boolean ("Directional Pyramid Denoising", "Enabled", dirpyrDenoise.enabled);
|
||||
if (!pedited || pedited->dirpyrDenoise.luma) keyFile.set_integer ("Directional Pyramid Denoising", "Luma", dirpyrDenoise.luma);
|
||||
if (!pedited || pedited->dirpyrDenoise.luma) keyFile.set_integer ("Directional Pyramid Denoising", "Ldetail", dirpyrDenoise.Ldetail);
|
||||
if (!pedited || pedited->dirpyrDenoise.chroma) keyFile.set_integer ("Directional Pyramid Denoising", "Chroma", dirpyrDenoise.chroma);
|
||||
if (!pedited || pedited->dirpyrDenoise.luma) keyFile.set_double ("Directional Pyramid Denoising", "Luma", dirpyrDenoise.luma);
|
||||
if (!pedited || pedited->dirpyrDenoise.Ldetail) keyFile.set_double ("Directional Pyramid Denoising", "Ldetail", dirpyrDenoise.Ldetail);
|
||||
if (!pedited || pedited->dirpyrDenoise.chroma) keyFile.set_double ("Directional Pyramid Denoising", "Chroma", dirpyrDenoise.chroma);
|
||||
if (!pedited || pedited->dirpyrDenoise.gamma) keyFile.set_double ("Directional Pyramid Denoising", "Gamma", dirpyrDenoise.gamma);
|
||||
|
||||
//Save edgePreservingDecompositionUI.
|
||||
@@ -856,9 +856,9 @@ if (keyFile.has_group ("Impulse Denoising")) {
|
||||
if (keyFile.has_group ("Directional Pyramid Denoising")) {//TODO: No longer an accurate description for FT denoise
|
||||
if (keyFile.has_key ("Directional Pyramid Denoising", "Enabled")) { dirpyrDenoise.enabled = keyFile.get_boolean ("Directional Pyramid Denoising", "Enabled"); if (pedited) pedited->dirpyrDenoise.enabled = true; }
|
||||
if (keyFile.has_key ("Directional Pyramid Denoising", "Luma")) { dirpyrDenoise.luma = keyFile.get_double ("Directional Pyramid Denoising", "Luma"); if (pedited) pedited->dirpyrDenoise.luma = true; }
|
||||
if (keyFile.has_key ("Directional Pyramid Denoising", "Ldetail")) { dirpyrDenoise.luma = keyFile.get_double ("Directional Pyramid Denoising", "Ldetail"); if (pedited) pedited->dirpyrDenoise.Ldetail = true; }
|
||||
if (keyFile.has_key ("Directional Pyramid Denoising", "Ldetail")) { dirpyrDenoise.Ldetail = keyFile.get_double ("Directional Pyramid Denoising", "Ldetail"); if (pedited) pedited->dirpyrDenoise.Ldetail = true; }
|
||||
if (keyFile.has_key ("Directional Pyramid Denoising", "Chroma")) { dirpyrDenoise.chroma = keyFile.get_double ("Directional Pyramid Denoising", "Chroma"); if (pedited) pedited->dirpyrDenoise.chroma = true; }
|
||||
if (keyFile.has_key ("Directional Pyramid Denoising", "Gamma")) { dirpyrDenoise.gamma = keyFile.get_double ("Directional Pyramid Denoising", "Gamma"); if (pedited) pedited->dirpyrDenoise.gamma = true; }
|
||||
if (keyFile.has_key ("Directional Pyramid Denoising", "Gamma")) { dirpyrDenoise.gamma = keyFile.get_double ("Directional Pyramid Denoising", "Gamma"); if (pedited) pedited->dirpyrDenoise.gamma = true; }
|
||||
}
|
||||
|
||||
//Load EPD.
|
||||
|
Reference in New Issue
Block a user