Make wavelet_decomposition
const-correct
This commit is contained in:
parent
90180a7d1f
commit
38f0a2360f
@ -1111,9 +1111,6 @@ BENCHFUN
|
||||
}
|
||||
|
||||
if (execwavelet) {//gain time if user choose only median sliders L <=1 slider chrom master < 1
|
||||
wavelet_decomposition* Ldecomp;
|
||||
wavelet_decomposition* adecomp;
|
||||
|
||||
int levwav = 5;
|
||||
float maxreal = max(realred, realblue);
|
||||
|
||||
@ -1154,9 +1151,9 @@ BENCHFUN
|
||||
levwav = min(maxlev2, levwav);
|
||||
|
||||
// if (settings->verbose) printf("levwavelet=%i noisevarA=%f noisevarB=%f \n",levwav, noisevarab_r, noisevarab_b);
|
||||
Ldecomp = new wavelet_decomposition(labdn->L[0], labdn->W, labdn->H, levwav, 1, 1, max(1, denoiseNestedLevels));
|
||||
const std::unique_ptr<wavelet_decomposition> Ldecomp(new wavelet_decomposition(labdn->L[0], labdn->W, labdn->H, levwav, 1, 1, max(1, denoiseNestedLevels)));
|
||||
|
||||
if (Ldecomp->memoryAllocationFailed) {
|
||||
if (Ldecomp->memory_allocation_failed()) {
|
||||
memoryAllocationFailed = true;
|
||||
}
|
||||
|
||||
@ -1175,7 +1172,7 @@ BENCHFUN
|
||||
int Wlvl_L = Ldecomp->level_W(lvl);
|
||||
int Hlvl_L = Ldecomp->level_H(lvl);
|
||||
|
||||
float ** WavCoeffs_L = Ldecomp->level_coeffs(lvl);
|
||||
const float* const* WavCoeffs_L = Ldecomp->level_coeffs(lvl);
|
||||
|
||||
if (!denoiseMethodRgb) {
|
||||
madL[lvl][dir - 1] = SQR(Mad(WavCoeffs_L[dir], Wlvl_L * Hlvl_L));
|
||||
@ -1192,9 +1189,9 @@ BENCHFUN
|
||||
float chmaxresid = 0.f;
|
||||
float chmaxresidtemp = 0.f;
|
||||
|
||||
adecomp = new wavelet_decomposition(labdn->a[0], labdn->W, labdn->H, levwav, 1, 1, max(1, denoiseNestedLevels));
|
||||
std::unique_ptr<wavelet_decomposition> adecomp(new wavelet_decomposition(labdn->a[0], labdn->W, labdn->H, levwav, 1, 1, max(1, denoiseNestedLevels)));
|
||||
|
||||
if (adecomp->memoryAllocationFailed) {
|
||||
if (adecomp->memory_allocation_failed()) {
|
||||
memoryAllocationFailed = true;
|
||||
}
|
||||
|
||||
@ -1226,12 +1223,12 @@ BENCHFUN
|
||||
adecomp->reconstruct(labdn->a[0]);
|
||||
}
|
||||
|
||||
delete adecomp;
|
||||
adecomp.reset();
|
||||
|
||||
if (!memoryAllocationFailed) {
|
||||
wavelet_decomposition* bdecomp = new wavelet_decomposition(labdn->b[0], labdn->W, labdn->H, levwav, 1, 1, max(1, denoiseNestedLevels));
|
||||
std::unique_ptr<wavelet_decomposition> bdecomp(new wavelet_decomposition(labdn->b[0], labdn->W, labdn->H, levwav, 1, 1, max(1, denoiseNestedLevels)));
|
||||
|
||||
if (bdecomp->memoryAllocationFailed) {
|
||||
if (bdecomp->memory_allocation_failed()) {
|
||||
memoryAllocationFailed = true;
|
||||
}
|
||||
|
||||
@ -1266,7 +1263,7 @@ BENCHFUN
|
||||
bdecomp->reconstruct(labdn->b[0]);
|
||||
}
|
||||
|
||||
delete bdecomp;
|
||||
bdecomp.reset();
|
||||
|
||||
if (!memoryAllocationFailed) {
|
||||
if (denoiseLuminance) {
|
||||
@ -1306,8 +1303,6 @@ BENCHFUN
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
delete Ldecomp;
|
||||
}
|
||||
|
||||
if (!memoryAllocationFailed) {
|
||||
@ -2194,7 +2189,7 @@ void ImProcFunctions::Noise_residualAB(const wavelet_decomposition &WaveletCoeff
|
||||
const int Wlvl_ab = WaveletCoeffs_ab.level_W(lvl);
|
||||
const int Hlvl_ab = WaveletCoeffs_ab.level_H(lvl);
|
||||
|
||||
float ** WavCoeffs_ab = WaveletCoeffs_ab.level_coeffs(lvl);
|
||||
const float* const* WavCoeffs_ab = WaveletCoeffs_ab.level_coeffs(lvl);
|
||||
const float madC = SQR(denoiseMethodRgb ? MadRgb(WavCoeffs_ab[dir], Wlvl_ab * Hlvl_ab) : Mad(WavCoeffs_ab[dir], Wlvl_ab * Hlvl_ab));
|
||||
|
||||
resid += madC;
|
||||
@ -2209,7 +2204,7 @@ void ImProcFunctions::Noise_residualAB(const wavelet_decomposition &WaveletCoeff
|
||||
chmaxresid = maxresid;
|
||||
}
|
||||
|
||||
bool ImProcFunctions::WaveletDenoiseAll_BiShrinkL(const wavelet_decomposition &WaveletCoeffs_L, float *noisevarlum, float madL[8][3], float * vari, int edge, int denoiseNestedLevels)
|
||||
bool ImProcFunctions::WaveletDenoiseAll_BiShrinkL(wavelet_decomposition& WaveletCoeffs_L, float *noisevarlum, float madL[8][3], float * vari, int edge, int denoiseNestedLevels)
|
||||
{
|
||||
int maxlvl = min(WaveletCoeffs_L.maxlevel(), 5);
|
||||
const float eps = 0.01f;
|
||||
@ -2260,7 +2255,7 @@ bool ImProcFunctions::WaveletDenoiseAll_BiShrinkL(const wavelet_decomposition &W
|
||||
int Wlvl_L = WaveletCoeffs_L.level_W(lvl);
|
||||
int Hlvl_L = WaveletCoeffs_L.level_H(lvl);
|
||||
|
||||
float ** WavCoeffs_L = WaveletCoeffs_L.level_coeffs(lvl);
|
||||
float* const* WavCoeffs_L = WaveletCoeffs_L.level_coeffs(lvl);
|
||||
|
||||
if (lvl == maxlvl - 1) {
|
||||
// int edge = 0;
|
||||
@ -2392,8 +2387,7 @@ bool ImProcFunctions::WaveletDenoiseAll_BiShrinkL(const wavelet_decomposition &W
|
||||
}
|
||||
|
||||
|
||||
bool ImProcFunctions::WaveletDenoiseAll_BiShrinkAB(const wavelet_decomposition &WaveletCoeffs_L, const wavelet_decomposition &WaveletCoeffs_ab, float *noisevarchrom, float madL[8][3], float *variC, int local, float noisevar_ab, const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb, int denoiseNestedLevels)
|
||||
|
||||
bool ImProcFunctions::WaveletDenoiseAll_BiShrinkAB(wavelet_decomposition& WaveletCoeffs_L, wavelet_decomposition& WaveletCoeffs_ab, float *noisevarchrom, float madL[8][3], float *variC, int local, float noisevar_ab, const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb, int denoiseNestedLevels)
|
||||
{
|
||||
int maxlvl = WaveletCoeffs_L.maxlevel();
|
||||
|
||||
@ -2449,7 +2443,7 @@ bool ImProcFunctions::WaveletDenoiseAll_BiShrinkAB(const wavelet_decomposition &
|
||||
// compute median absolute deviation (MAD) of detail coefficients as robust noise estimator
|
||||
int Wlvl_ab = WaveletCoeffs_ab.level_W(lvl);
|
||||
int Hlvl_ab = WaveletCoeffs_ab.level_H(lvl);
|
||||
float ** WavCoeffs_ab = WaveletCoeffs_ab.level_coeffs(lvl);
|
||||
const float* const* WavCoeffs_ab = WaveletCoeffs_ab.level_coeffs(lvl);
|
||||
|
||||
if (!denoiseMethodRgb) {
|
||||
madab[lvl][dir - 1] = SQR(Mad(WavCoeffs_ab[dir], Wlvl_ab * Hlvl_ab));
|
||||
@ -2468,8 +2462,8 @@ bool ImProcFunctions::WaveletDenoiseAll_BiShrinkAB(const wavelet_decomposition &
|
||||
int Wlvl_ab = WaveletCoeffs_ab.level_W(lvl);
|
||||
int Hlvl_ab = WaveletCoeffs_ab.level_H(lvl);
|
||||
|
||||
float ** WavCoeffs_L = WaveletCoeffs_L.level_coeffs(lvl);
|
||||
float ** WavCoeffs_ab = WaveletCoeffs_ab.level_coeffs(lvl);
|
||||
float* const* WavCoeffs_L = WaveletCoeffs_L.level_coeffs(lvl);
|
||||
float* const* WavCoeffs_ab = WaveletCoeffs_ab.level_coeffs(lvl);
|
||||
|
||||
if (lvl == maxlvl - 1) {
|
||||
ShrinkAllAB(WaveletCoeffs_L, WaveletCoeffs_ab, buffer, lvl, dir, noisevarchrom, noisevar_ab, useNoiseCCurve, autoch, denoiseMethodRgb, madL[lvl], nullptr, 0, madab[lvl], true);
|
||||
@ -2563,7 +2557,7 @@ bool ImProcFunctions::WaveletDenoiseAll_BiShrinkAB(const wavelet_decomposition &
|
||||
}
|
||||
|
||||
|
||||
bool ImProcFunctions::WaveletDenoiseAllL(const wavelet_decomposition &WaveletCoeffs_L, float *noisevarlum, float madL[8][3], float * vari, int edge, int denoiseNestedLevels)//mod JD
|
||||
bool ImProcFunctions::WaveletDenoiseAllL(wavelet_decomposition& WaveletCoeffs_L, float *noisevarlum, float madL[8][3], float * vari, int edge, int denoiseNestedLevels)//mod JD
|
||||
|
||||
{
|
||||
|
||||
@ -2624,7 +2618,7 @@ bool ImProcFunctions::WaveletDenoiseAllL(const wavelet_decomposition &WaveletCoe
|
||||
}
|
||||
|
||||
|
||||
bool ImProcFunctions::WaveletDenoiseAllAB(const wavelet_decomposition &WaveletCoeffs_L, const wavelet_decomposition &WaveletCoeffs_ab,
|
||||
bool ImProcFunctions::WaveletDenoiseAllAB(wavelet_decomposition& WaveletCoeffs_L, wavelet_decomposition& WaveletCoeffs_ab,
|
||||
float *noisevarchrom, float madL[8][3], float *variC, int local, float noisevar_ab, const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb, int denoiseNestedLevels)//mod JD
|
||||
|
||||
{
|
||||
@ -2688,7 +2682,7 @@ bool ImProcFunctions::WaveletDenoiseAllAB(const wavelet_decomposition &WaveletCo
|
||||
|
||||
|
||||
|
||||
void ImProcFunctions::ShrinkAllL(const wavelet_decomposition &WaveletCoeffs_L, float **buffer, int level, int dir,
|
||||
void ImProcFunctions::ShrinkAllL(wavelet_decomposition& WaveletCoeffs_L, float **buffer, int level, int dir,
|
||||
float *noisevarlum, float * madL, float * vari, int edge)
|
||||
|
||||
{
|
||||
@ -2702,7 +2696,7 @@ void ImProcFunctions::ShrinkAllL(const wavelet_decomposition &WaveletCoeffs_L, f
|
||||
const int W_L = WaveletCoeffs_L.level_W(level);
|
||||
const int H_L = WaveletCoeffs_L.level_H(level);
|
||||
|
||||
float ** WavCoeffs_L = WaveletCoeffs_L.level_coeffs(level);
|
||||
float* const* WavCoeffs_L = WaveletCoeffs_L.level_coeffs(level);
|
||||
const float mad_L = madL[dir - 1] ;
|
||||
const float levelFactor = mad_L * 5.f / static_cast<float>(level + 1);
|
||||
|
||||
@ -2779,7 +2773,7 @@ void ImProcFunctions::ShrinkAllL(const wavelet_decomposition &WaveletCoeffs_L, f
|
||||
}
|
||||
|
||||
|
||||
void ImProcFunctions::ShrinkAllAB(const wavelet_decomposition & WaveletCoeffs_L, const wavelet_decomposition & WaveletCoeffs_ab, float **buffer, int level, int dir,
|
||||
void ImProcFunctions::ShrinkAllAB(wavelet_decomposition& WaveletCoeffs_L, wavelet_decomposition& WaveletCoeffs_ab, float **buffer, int level, int dir,
|
||||
float * noisevarchrom, float noisevar_ab, const bool useNoiseCCurve, bool autoch,
|
||||
bool denoiseMethodRgb, float * madL, float * variC, int local, float * madaab, bool madCalculated)
|
||||
|
||||
@ -2798,8 +2792,8 @@ void ImProcFunctions::ShrinkAllAB(const wavelet_decomposition & WaveletCoeffs_L,
|
||||
int W_ab = WaveletCoeffs_ab.level_W(level);
|
||||
int H_ab = WaveletCoeffs_ab.level_H(level);
|
||||
|
||||
float ** WavCoeffs_L = WaveletCoeffs_L.level_coeffs(level);
|
||||
float ** WavCoeffs_ab = WaveletCoeffs_ab.level_coeffs(level);
|
||||
float* const* WavCoeffs_L = WaveletCoeffs_L.level_coeffs(level);
|
||||
float* const* WavCoeffs_ab = WaveletCoeffs_ab.level_coeffs(level);
|
||||
|
||||
float madab;
|
||||
float mad_L = madL[dir - 1];
|
||||
@ -2918,7 +2912,7 @@ void ImProcFunctions::ShrinkAllAB(const wavelet_decomposition & WaveletCoeffs_L,
|
||||
delete [] nvc;
|
||||
}
|
||||
|
||||
void ImProcFunctions::ShrinkAll_info(float ** WavCoeffs_a, float ** WavCoeffs_b,
|
||||
void ImProcFunctions::ShrinkAll_info(const float* const* WavCoeffs_a, const float* const* WavCoeffs_b,
|
||||
int W_ab, int H_ab, float **noisevarlum, float **noisevarchrom, float **noisevarhue, float & chaut, int &Nb, float & redaut, float & blueaut,
|
||||
float & maxredaut, float & maxblueaut, float & minredaut, float & minblueaut, int schoice, int lvl, float & chromina, float & sigma, float & lumema, float & sigma_L, float & redyel, float & skinc, float & nsknc,
|
||||
float & maxchred, float & maxchblue, float & minchred, float & minchblue, int &nb, float & chau, float & chred, float & chblue, bool denoiseMethodRgb)
|
||||
@ -3048,8 +3042,8 @@ void ImProcFunctions::WaveletDenoiseAll_info(int levwav, const wavelet_decomposi
|
||||
int Wlvl_ab = WaveletCoeffs_a.level_W(lvl);
|
||||
int Hlvl_ab = WaveletCoeffs_a.level_H(lvl);
|
||||
|
||||
float ** WavCoeffs_a = WaveletCoeffs_a.level_coeffs(lvl);
|
||||
float ** WavCoeffs_b = WaveletCoeffs_b.level_coeffs(lvl);
|
||||
const float* const* WavCoeffs_a = WaveletCoeffs_a.level_coeffs(lvl);
|
||||
const float* const* WavCoeffs_b = WaveletCoeffs_b.level_coeffs(lvl);
|
||||
|
||||
ShrinkAll_info(WavCoeffs_a, WavCoeffs_b, Wlvl_ab, Hlvl_ab,
|
||||
noisevarlum, noisevarchrom, noisevarhue, chaut, Nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut,
|
||||
|
@ -33,37 +33,38 @@ class wavelet_decomposition :
|
||||
public NonCopyable
|
||||
{
|
||||
public:
|
||||
|
||||
typedef float internal_type;
|
||||
float *coeff0;
|
||||
bool memoryAllocationFailed;
|
||||
|
||||
private:
|
||||
|
||||
static const int maxlevels = 10;//should be greater than any conceivable order of decimation
|
||||
|
||||
int lvltot, subsamp;
|
||||
int m_w, m_h;//dimensions
|
||||
|
||||
int wavfilt_len, wavfilt_offset;
|
||||
float *wavfilt_anal;
|
||||
float *wavfilt_synth;
|
||||
|
||||
|
||||
wavelet_level<internal_type> * wavelet_decomp[maxlevels];
|
||||
|
||||
public:
|
||||
using internal_type = float;
|
||||
|
||||
template<typename E>
|
||||
wavelet_decomposition(E * src, int width, int height, int maxlvl, int subsampling, int skipcrop = 1, int numThreads = 1, int Daub4Len = 6);
|
||||
|
||||
~wavelet_decomposition();
|
||||
|
||||
internal_type ** level_coeffs(int level) const
|
||||
bool memory_allocation_failed() const
|
||||
{
|
||||
return memoryAllocationFailed;
|
||||
}
|
||||
|
||||
const internal_type* const* level_coeffs(int level) const
|
||||
{
|
||||
return wavelet_decomp[level]->subbands();
|
||||
}
|
||||
|
||||
internal_type* const* level_coeffs(int level)
|
||||
{
|
||||
return wavelet_decomp[level]->subbands();
|
||||
}
|
||||
|
||||
const internal_type* get_coeff0() const
|
||||
{
|
||||
return coeff0;
|
||||
}
|
||||
|
||||
internal_type* get_coeff0()
|
||||
{
|
||||
return coeff0;
|
||||
}
|
||||
|
||||
int level_W(int level) const
|
||||
{
|
||||
return wavelet_decomp[level]->width();
|
||||
@ -88,13 +89,47 @@ public:
|
||||
{
|
||||
return subsamp;
|
||||
}
|
||||
|
||||
template<typename E>
|
||||
void reconstruct(E * dst, const float blend = 1.f);
|
||||
|
||||
private:
|
||||
static const int maxlevels = 10; // should be greater than any conceivable order of decimation
|
||||
|
||||
int lvltot;
|
||||
int subsamp;
|
||||
// Dimensions
|
||||
int m_w;
|
||||
int m_h;
|
||||
|
||||
int wavfilt_len;
|
||||
int wavfilt_offset;
|
||||
internal_type* wavfilt_anal;
|
||||
internal_type* wavfilt_synth;
|
||||
|
||||
internal_type* coeff0;
|
||||
bool memoryAllocationFailed;
|
||||
|
||||
wavelet_level<internal_type>* wavelet_decomp[maxlevels];
|
||||
};
|
||||
|
||||
template<typename E>
|
||||
wavelet_decomposition::wavelet_decomposition(E * src, int width, int height, int maxlvl, int subsampling, int skipcrop, int numThreads, int Daub4Len)
|
||||
: coeff0(nullptr), memoryAllocationFailed(false), lvltot(0), subsamp(subsampling), m_w(width), m_h(height)
|
||||
wavelet_decomposition::wavelet_decomposition(
|
||||
E * src,
|
||||
int width,
|
||||
int height,
|
||||
int maxlvl,
|
||||
int subsampling,
|
||||
int skipcrop,
|
||||
int numThreads,
|
||||
int Daub4Len
|
||||
) :
|
||||
lvltot(0),
|
||||
subsamp(subsampling),
|
||||
m_w(width),
|
||||
m_h(height),
|
||||
coeff0(nullptr),
|
||||
memoryAllocationFailed(false)
|
||||
{
|
||||
|
||||
//initialize wavelet filters
|
||||
|
@ -204,29 +204,29 @@ public:
|
||||
void Tile_calc(int tilesize, int overlap, int kall, int imwidth, int imheight, int &numtiles_W, int &numtiles_H, int &tilewidth, int &tileheight, int &tileWskip, int &tileHskip);
|
||||
void ip_wavelet(LabImage * lab, LabImage * dst, int kall, const procparams::WaveletParams & waparams, const WavCurve & wavCLVCcurve, const Wavblcurve & wavblcurve, const WavOpacityCurveRG & waOpacityCurveRG, const WavOpacityCurveSH & waOpacityCurveSH, const WavOpacityCurveBY & waOpacityCurveBY, const WavOpacityCurveW & waOpacityCurveW, const WavOpacityCurveWL & waOpacityCurveWL, const LUTf &wavclCurve, int skip);
|
||||
|
||||
void WaveletcontAllL(LabImage * lab, float **varhue, float **varchrom, const wavelet_decomposition &WaveletCoeffs_L, const Wavblcurve & wavblcurve,
|
||||
void WaveletcontAllL(LabImage * lab, float **varhue, float **varchrom, wavelet_decomposition& WaveletCoeffs_L, const Wavblcurve & wavblcurve,
|
||||
struct cont_params &cp, int skip, float *mean, float *sigma, float *MaxP, float *MaxN, const WavCurve & wavCLVCcurve, const WavOpacityCurveW & waOpacityCurveW, const WavOpacityCurveSH & waOpacityCurveSH, FlatCurve* ChCurve, bool Chutili);
|
||||
void WaveletcontAllLfinal(const wavelet_decomposition &WaveletCoeffs_L, const cont_params &cp, float *mean, float *sigma, float *MaxP, const WavOpacityCurveWL & waOpacityCurveWL);
|
||||
void WaveletcontAllAB(LabImage * lab, float **varhue, float **varchrom, const wavelet_decomposition &WaveletCoeffs_a, const Wavblcurve & wavblcurve, const WavOpacityCurveW & waOpacityCurveW,
|
||||
void WaveletcontAllLfinal(wavelet_decomposition& WaveletCoeffs_L, const cont_params &cp, float *mean, float *sigma, float *MaxP, const WavOpacityCurveWL & waOpacityCurveWL);
|
||||
void WaveletcontAllAB(LabImage * lab, float **varhue, float **varchrom, wavelet_decomposition& WaveletCoeffs_a, const Wavblcurve & wavblcurve, const WavOpacityCurveW & waOpacityCurveW,
|
||||
struct cont_params &cp, const bool useChannelA, int skip, float *meanab, float *sigmaab);
|
||||
void WaveletAandBAllAB(const wavelet_decomposition &WaveletCoeffs_a, const wavelet_decomposition &WaveletCoeffs_b,
|
||||
void WaveletAandBAllAB(wavelet_decomposition& WaveletCoeffs_a, wavelet_decomposition& WaveletCoeffs_b,
|
||||
const cont_params &cp, FlatCurve* hhcurve, bool hhutili);
|
||||
void ContAllL(float **koeLi, float *maxkoeLi, bool lipschitz, int maxlvl, LabImage * lab, float **varhue, float **varchrom, float ** WavCoeffs_L, float * WavCoeffs_L0, int level, int dir, struct cont_params &cp,
|
||||
void ContAllL(float** koeLi, float *maxkoeLi, bool lipschitz, int maxlvl, LabImage * lab, const float* const* varhue, const float* const* varchrom, float* const* WavCoeffs_L, float * WavCoeffs_L0, int level, int dir, struct cont_params &cp,
|
||||
int W_L, int H_L, int skip, float *mean, float *sigma, float *MaxP, float *MaxN, const WavCurve & wavCLVCcurve, const WavOpacityCurveW & waOpacityCurveW, const WavOpacityCurveSH & waOpacityCurveSH, FlatCurve* ChCurve, bool Chutili);
|
||||
void finalContAllL(float ** WavCoeffs_L, float * WavCoeffs_L0, int level, int dir, const cont_params &cp,
|
||||
void finalContAllL(float* const* WavCoeffs_L, float * WavCoeffs_L0, int level, int dir, const cont_params &cp,
|
||||
int W_L, int H_L, float *mean, float *sigma, float *MaxP, const WavOpacityCurveWL & waOpacityCurveWL);
|
||||
void ContAllAB(LabImage * lab, int maxlvl, float **varhue, float **varchrom, float ** WavCoeffs_a, float * WavCoeffs_a0, int level, int dir, const WavOpacityCurveW & waOpacityCurveW, struct cont_params &cp,
|
||||
void ContAllAB(LabImage * lab, int maxlvl, float **varhue, float **varchrom, float* const* WavCoeffs_a, float * WavCoeffs_a0, int level, int dir, const WavOpacityCurveW & waOpacityCurveW, struct cont_params &cp,
|
||||
int W_ab, int H_ab, const bool useChannelA, float *meanab, float *sigmaab);
|
||||
void Evaluate2(const wavelet_decomposition &WaveletCoeffs_L,
|
||||
float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN);
|
||||
void Eval2(float ** WavCoeffs_L, int level,
|
||||
void Eval2(const float* const* WavCoeffs_L, int level,
|
||||
int W_L, int H_L, float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN);
|
||||
|
||||
void calceffect(int level, float *mean, float *sigma, float *mea, float effect, float offs);
|
||||
|
||||
void Aver(float * HH_Coeffs, int datalen, float &averagePlus, float &averageNeg, float &max, float &min);
|
||||
void Sigma(float * HH_Coeffs, int datalen, float averagePlus, float averageNeg, float &sigmaPlus, float &sigmaNeg);
|
||||
void calckoe(float ** WavCoeffs_LL, const cont_params& cp, float ** koeLi, int level, int dir, int W_L, int H_L, float edd, float *maxkoeLi, float **tmC = nullptr);
|
||||
void Aver(const float* HH_Coeffs, int datalen, float &averagePlus, float &averageNeg, float &max, float &min);
|
||||
void Sigma(const float* HH_Coeffs, int datalen, float averagePlus, float averageNeg, float &sigmaPlus, float &sigmaNeg);
|
||||
void calckoe(const float* const* WavCoeffs_LL, const cont_params& cp, float ** koeLi, int level, int dir, int W_L, int H_L, float edd, float *maxkoeLi, float **tmC = nullptr);
|
||||
|
||||
void Median_Denoise(float **src, float **dst, int width, int height, Median medianType, int iterations, int numThreads, float **buffer = nullptr);
|
||||
void Median_Denoise(float **src, float **dst, float upperBound, int width, int height, Median medianType, int iterations, int numThreads, float **buffer = nullptr);
|
||||
@ -240,18 +240,18 @@ public:
|
||||
const wavelet_decomposition &WaveletCoeffs_b, float **noisevarlum, float **noisevarchrom, float **noisevarhue, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float &maxblueaut, float &minredaut, float & minblueaut, int schoice, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc,
|
||||
float &maxchred, float &maxchblue, float &minchred, float &minchblue, int &nb, float &chau, float &chred, float &chblue, bool denoiseMethodRgb);
|
||||
|
||||
bool WaveletDenoiseAllL(const wavelet_decomposition &WaveletCoeffs_L, float *noisevarlum, float madL[8][3], float * vari, int edge, int denoiseNestedLevels);
|
||||
bool WaveletDenoiseAllAB(const wavelet_decomposition &WaveletCoeffs_L, const wavelet_decomposition &WaveletCoeffs_ab, float *noisevarchrom, float madL[8][3], float *variC, int local, float noisevar_ab, const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb, int denoiseNestedLevels);
|
||||
bool WaveletDenoiseAllL(wavelet_decomposition& WaveletCoeffs_L, float *noisevarlum, float madL[8][3], float * vari, int edge, int denoiseNestedLevels);
|
||||
bool WaveletDenoiseAllAB(wavelet_decomposition& WaveletCoeffs_L, wavelet_decomposition& WaveletCoeffs_ab, float *noisevarchrom, float madL[8][3], float *variC, int local, float noisevar_ab, const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb, int denoiseNestedLevels);
|
||||
|
||||
bool WaveletDenoiseAll_BiShrinkL(const wavelet_decomposition &WaveletCoeffs_L, float *noisevarlum, float madL[8][3], float * vari, int edge, int denoiseNestedLevels);
|
||||
bool WaveletDenoiseAll_BiShrinkAB(const wavelet_decomposition &WaveletCoeffs_L, const wavelet_decomposition &WaveletCoeffs_ab, float *noisevarchrom, float madL[8][3], float *variC, int local, float noisevar_ab, const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb, int denoiseNestedLevels);
|
||||
bool WaveletDenoiseAll_BiShrinkL(wavelet_decomposition& WaveletCoeffs_L, float *noisevarlum, float madL[8][3], float * vari, int edge, int denoiseNestedLevels);
|
||||
bool WaveletDenoiseAll_BiShrinkAB(wavelet_decomposition& WaveletCoeffs_L, wavelet_decomposition& WaveletCoeffs_ab, float *noisevarchrom, float madL[8][3], float *variC, int local, float noisevar_ab, const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb, int denoiseNestedLevels);
|
||||
|
||||
void ShrinkAllL(const wavelet_decomposition &WaveletCoeffs_L, float **buffer, int level, int dir, float *noisevarlum, float * madL, float * vari, int edge);
|
||||
void ShrinkAllAB(const wavelet_decomposition &WaveletCoeffs_L, const wavelet_decomposition &WaveletCoeffs_ab, float **buffer, int level, int dir,
|
||||
void ShrinkAllL(wavelet_decomposition& WaveletCoeffs_L, float **buffer, int level, int dir, float *noisevarlum, float * madL, float * vari, int edge);
|
||||
void ShrinkAllAB(wavelet_decomposition& WaveletCoeffs_L, wavelet_decomposition& WaveletCoeffs_ab, float **buffer, int level, int dir,
|
||||
float *noisevarchrom, float noisevar_ab, const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb, float * madL, float * variC, int local, float * madaab = nullptr, bool madCalculated = false);
|
||||
|
||||
|
||||
void ShrinkAll_info(float ** WavCoeffs_a, float ** WavCoeffs_b,
|
||||
void ShrinkAll_info(const float* const* WavCoeffs_a, const float* const* WavCoeffs_b,
|
||||
int W_ab, int H_ab, float **noisevarlum, float **noisevarchrom, float **noisevarhue, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float &maxblueaut, float &minredaut, float &minblueaut, int schoice, int lvl, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc,
|
||||
float &maxchred, float &maxchblue, float &minchred, float &minchblue, int &nb, float &chau, float &chred, float &chblue, bool denoiseMethodRgb);
|
||||
void Noise_residualAB(const wavelet_decomposition &WaveletCoeffs_ab, float &chresid, float &chmaxresid, bool denoiseMethodRgb);
|
||||
|
@ -897,7 +897,7 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const
|
||||
if (levwavL > 0) {
|
||||
const std::unique_ptr<wavelet_decomposition> Ldecomp(new wavelet_decomposition(labco->data, labco->W, labco->H, levwavL, 1, skip, rtengine::max(1, wavNestedLevels), DaubLen));
|
||||
|
||||
if (!Ldecomp->memoryAllocationFailed) {
|
||||
if (!Ldecomp->memory_allocation_failed()) {
|
||||
float madL[10][3];
|
||||
|
||||
// float madL[8][3];
|
||||
@ -910,7 +910,7 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const
|
||||
int Wlvl_L = Ldecomp->level_W(lvl);
|
||||
int Hlvl_L = Ldecomp->level_H(lvl);
|
||||
|
||||
float ** WavCoeffs_L = Ldecomp->level_coeffs(lvl);
|
||||
const float* const* WavCoeffs_L = Ldecomp->level_coeffs(lvl);
|
||||
|
||||
madL[lvl][dir - 1] = SQR(Mad(WavCoeffs_L[dir], Wlvl_L * Hlvl_L));
|
||||
|
||||
@ -1291,7 +1291,7 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const
|
||||
if (levwava > 0) {
|
||||
const std::unique_ptr<wavelet_decomposition> adecomp(new wavelet_decomposition(labco->data + datalen, labco->W, labco->H, levwava, 1, skip, rtengine::max(1, wavNestedLevels), DaubLen));
|
||||
|
||||
if (!adecomp->memoryAllocationFailed) {
|
||||
if (!adecomp->memory_allocation_failed()) {
|
||||
if (cp.noiseena && ((cp.chromfi > 0.f || cp.chromco > 0.f) && cp.chromco < 2.f )) {
|
||||
WaveletDenoiseAllAB(*Ldecomp, *adecomp, noisevarchrom, madL, variC, edge, noisevarab_r, true, false, false, 1);
|
||||
} else if (cp.chromfi > 0.f && cp.chromco >= 2.f){
|
||||
@ -1328,7 +1328,7 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const
|
||||
if (levwavb > 0) {
|
||||
const std::unique_ptr<wavelet_decomposition> bdecomp(new wavelet_decomposition(labco->data + 2 * datalen, labco->W, labco->H, levwavb, 1, skip, rtengine::max(1, wavNestedLevels), DaubLen));
|
||||
|
||||
if (!bdecomp->memoryAllocationFailed) {
|
||||
if (!bdecomp->memory_allocation_failed()) {
|
||||
if (cp.noiseena && ((cp.chromfi > 0.f || cp.chromco > 0.f) && cp.chromco < 2.f )) {
|
||||
WaveletDenoiseAllAB(*Ldecomp, *bdecomp, noisevarchrom, madL, variCb, edge, noisevarab_r, true, false, false, 1);
|
||||
} else if (cp.chromfi > 0.f && cp.chromco >= 2.f){
|
||||
@ -1360,7 +1360,7 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const
|
||||
const std::unique_ptr<wavelet_decomposition> adecomp(new wavelet_decomposition(labco->data + datalen, labco->W, labco->H, levwavab, 1, skip, rtengine::max(1, wavNestedLevels), DaubLen));
|
||||
const std::unique_ptr<wavelet_decomposition> bdecomp(new wavelet_decomposition(labco->data + 2 * datalen, labco->W, labco->H, levwavab, 1, skip, rtengine::max(1, wavNestedLevels), DaubLen));
|
||||
|
||||
if (!adecomp->memoryAllocationFailed && !bdecomp->memoryAllocationFailed) {
|
||||
if (!adecomp->memory_allocation_failed() && !bdecomp->memory_allocation_failed()) {
|
||||
if (cp.noiseena && ((cp.chromfi > 0.f || cp.chromco > 0.f) && cp.chromco < 2.f)) {
|
||||
WaveletDenoiseAllAB(*Ldecomp, *adecomp, noisevarchrom, madL, variC, edge, noisevarab_r, true, false, false, 1);
|
||||
} else if (cp.chromfi > 0.f && cp.chromco >= 2.f){
|
||||
@ -1655,7 +1655,7 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const
|
||||
}
|
||||
|
||||
|
||||
void ImProcFunctions::Aver(float * RESTRICT DataList, int datalen, float &averagePlus, float &averageNeg, float &max, float &min)
|
||||
void ImProcFunctions::Aver(const float* RESTRICT DataList, int datalen, float &averagePlus, float &averageNeg, float &max, float &min)
|
||||
{
|
||||
|
||||
//find absolute mean
|
||||
@ -1710,7 +1710,7 @@ void ImProcFunctions::Aver(float * RESTRICT DataList, int datalen, float &averag
|
||||
}
|
||||
|
||||
|
||||
void ImProcFunctions::Sigma(float * RESTRICT DataList, int datalen, float averagePlus, float averageNeg, float &sigmaPlus, float &sigmaNeg)
|
||||
void ImProcFunctions::Sigma(const float* RESTRICT DataList, int datalen, float averagePlus, float averageNeg, float &sigmaPlus, float &sigmaNeg)
|
||||
{
|
||||
int countP = 0, countN = 0;
|
||||
double variP = 0.0, variN = 0.0; // use double precision for large summations
|
||||
@ -1755,7 +1755,7 @@ void ImProcFunctions::Evaluate2(const wavelet_decomposition &WaveletCoeffs_L,
|
||||
int Wlvl_L = WaveletCoeffs_L.level_W(lvl);
|
||||
int Hlvl_L = WaveletCoeffs_L.level_H(lvl);
|
||||
|
||||
float ** WavCoeffs_L = WaveletCoeffs_L.level_coeffs(lvl);
|
||||
const float* const* WavCoeffs_L = WaveletCoeffs_L.level_coeffs(lvl);
|
||||
|
||||
Eval2(WavCoeffs_L, lvl, Wlvl_L, Hlvl_L, mean, meanN, sigma, sigmaN, MaxP, MaxN);
|
||||
}
|
||||
@ -1814,7 +1814,7 @@ void ImProcFunctions::calceffect(int level, float *mean, float *sigma, float *me
|
||||
mea[9] = offs * mean[level] + effect * 2.5f * sigma[level]; //99%
|
||||
}
|
||||
|
||||
void ImProcFunctions::Eval2(float ** WavCoeffs_L, int level,
|
||||
void ImProcFunctions::Eval2(const float* const* WavCoeffs_L, int level,
|
||||
int W_L, int H_L, float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN)
|
||||
{
|
||||
|
||||
@ -2015,29 +2015,29 @@ void ImProcFunctions::EPDToneMapResid(float * WavCoeffs_L0, unsigned int Iterate
|
||||
}
|
||||
}
|
||||
|
||||
void ImProcFunctions::WaveletcontAllLfinal(const wavelet_decomposition &WaveletCoeffs_L, const cont_params &cp, float *mean, float *sigma, float *MaxP, const WavOpacityCurveWL & waOpacityCurveWL)
|
||||
void ImProcFunctions::WaveletcontAllLfinal(wavelet_decomposition& WaveletCoeffs_L, const cont_params &cp, float *mean, float *sigma, float *MaxP, const WavOpacityCurveWL & waOpacityCurveWL)
|
||||
{
|
||||
int maxlvl = WaveletCoeffs_L.maxlevel();
|
||||
float * WavCoeffs_L0 = WaveletCoeffs_L.coeff0;
|
||||
float* WavCoeffs_L0 = WaveletCoeffs_L.get_coeff0();
|
||||
|
||||
for (int dir = 1; dir < 4; dir++) {
|
||||
for (int lvl = 0; lvl < maxlvl; lvl++) {
|
||||
int Wlvl_L = WaveletCoeffs_L.level_W(lvl);
|
||||
int Hlvl_L = WaveletCoeffs_L.level_H(lvl);
|
||||
float ** WavCoeffs_L = WaveletCoeffs_L.level_coeffs(lvl);
|
||||
float* const* WavCoeffs_L = WaveletCoeffs_L.level_coeffs(lvl);
|
||||
finalContAllL(WavCoeffs_L, WavCoeffs_L0, lvl, dir, cp, Wlvl_L, Hlvl_L, mean, sigma, MaxP, waOpacityCurveWL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ImProcFunctions::WaveletcontAllL(LabImage * labco, float ** varhue, float **varchrom, const wavelet_decomposition &WaveletCoeffs_L, const Wavblcurve & wavblcurve,
|
||||
void ImProcFunctions::WaveletcontAllL(LabImage * labco, float ** varhue, float **varchrom, wavelet_decomposition& WaveletCoeffs_L, const Wavblcurve & wavblcurve,
|
||||
struct cont_params &cp, int skip, float *mean, float *sigma, float *MaxP, float *MaxN, const WavCurve & wavCLVCcurve, const WavOpacityCurveW & waOpacityCurveW, const WavOpacityCurveSH & waOpacityCurveSH, FlatCurve* ChCurve, bool Chutili)
|
||||
{
|
||||
const int maxlvl = WaveletCoeffs_L.maxlevel();
|
||||
const int W_L = WaveletCoeffs_L.level_W(0);
|
||||
const int H_L = WaveletCoeffs_L.level_H(0);
|
||||
float * WavCoeffs_L0 = WaveletCoeffs_L.coeff0;
|
||||
float* WavCoeffs_L0 = WaveletCoeffs_L.get_coeff0();
|
||||
|
||||
float contrast = cp.contrast;
|
||||
double avedbl = 0.0; // use double precision for large summations
|
||||
@ -2307,7 +2307,7 @@ void ImProcFunctions::WaveletcontAllL(LabImage * labco, float ** varhue, float *
|
||||
|
||||
for (int lvl = 0; lvl < 4; lvl++) {
|
||||
for (int dir = 1; dir < 4; dir++) {
|
||||
float ** WavCoeffs_LL = WaveletCoeffs_L.level_coeffs(lvl);
|
||||
const float* const* WavCoeffs_LL = WaveletCoeffs_L.level_coeffs(lvl);
|
||||
calckoe(WavCoeffs_LL, cp, koeLi, lvl, dir, WaveletCoeffs_L.level_W(lvl), WaveletCoeffs_L.level_H(lvl), edd, maxkoeLi, tmC);
|
||||
// return convolution KoeLi and maxkoeLi of level 0 1 2 3 and Dir Horiz, Vert, Diag
|
||||
}
|
||||
@ -2430,7 +2430,7 @@ void ImProcFunctions::WaveletcontAllL(LabImage * labco, float ** varhue, float *
|
||||
int Wlvl_L = WaveletCoeffs_L.level_W(lvl);
|
||||
int Hlvl_L = WaveletCoeffs_L.level_H(lvl);
|
||||
|
||||
float ** WavCoeffs_L = WaveletCoeffs_L.level_coeffs(lvl);
|
||||
float* const* WavCoeffs_L = WaveletCoeffs_L.level_coeffs(lvl);
|
||||
|
||||
// ContAllL(koeLi, maxkoeLi, true, maxlvl, labco, varhue, varchrom, WavCoeffs_L, WavCoeffs_L0, lvl, dir, cp, Wlvl_L, Hlvl_L, skip, mean, sigma, MaxP, MaxN, wavCLVCcurve, waOpacityCurveW, ChCurve, Chutili);
|
||||
ContAllL(koeLi, maxkoeLi, true, maxlvl, labco, varhue, varchrom, WavCoeffs_L, WavCoeffs_L0, lvl, dir, cp, Wlvl_L, Hlvl_L, skip, mean, sigma, MaxP, MaxN, wavCLVCcurve, waOpacityCurveW, waOpacityCurveSH, ChCurve, Chutili);
|
||||
@ -2525,7 +2525,7 @@ void ImProcFunctions::WaveletcontAllL(LabImage * labco, float ** varhue, float *
|
||||
}
|
||||
}
|
||||
|
||||
void ImProcFunctions::WaveletAandBAllAB(const wavelet_decomposition &WaveletCoeffs_a, const wavelet_decomposition &WaveletCoeffs_b,
|
||||
void ImProcFunctions::WaveletAandBAllAB(wavelet_decomposition& WaveletCoeffs_a, wavelet_decomposition& WaveletCoeffs_b,
|
||||
const cont_params &cp, FlatCurve* hhCurve, bool hhutili)
|
||||
{
|
||||
// StopWatch Stop1("WaveletAandBAllAB");
|
||||
@ -2533,8 +2533,8 @@ void ImProcFunctions::WaveletAandBAllAB(const wavelet_decomposition &WaveletCoef
|
||||
int W_L = WaveletCoeffs_a.level_W(0);
|
||||
int H_L = WaveletCoeffs_a.level_H(0);
|
||||
|
||||
float * WavCoeffs_a0 = WaveletCoeffs_a.coeff0;
|
||||
float * WavCoeffs_b0 = WaveletCoeffs_b.coeff0;
|
||||
float* WavCoeffs_a0 = WaveletCoeffs_a.get_coeff0();
|
||||
float* WavCoeffs_b0 = WaveletCoeffs_b.get_coeff0();
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel num_threads(wavNestedLevels) if (wavNestedLevels>1)
|
||||
#endif
|
||||
@ -2591,7 +2591,7 @@ void ImProcFunctions::WaveletAandBAllAB(const wavelet_decomposition &WaveletCoef
|
||||
|
||||
}
|
||||
|
||||
void ImProcFunctions::WaveletcontAllAB(LabImage * labco, float ** varhue, float **varchrom, const wavelet_decomposition &WaveletCoeffs_ab, const Wavblcurve & wavblcurve, const WavOpacityCurveW & waOpacityCurveW,
|
||||
void ImProcFunctions::WaveletcontAllAB(LabImage * labco, float ** varhue, float **varchrom, wavelet_decomposition& WaveletCoeffs_ab, const Wavblcurve & wavblcurve, const WavOpacityCurveW & waOpacityCurveW,
|
||||
struct cont_params &cp, const bool useChannelA, int skip, float *meanab, float *sigmaab)
|
||||
{
|
||||
|
||||
@ -2599,7 +2599,7 @@ void ImProcFunctions::WaveletcontAllAB(LabImage * labco, float ** varhue, float
|
||||
int W_L = WaveletCoeffs_ab.level_W(0);
|
||||
int H_L = WaveletCoeffs_ab.level_H(0);
|
||||
|
||||
float * WavCoeffs_ab0 = WaveletCoeffs_ab.coeff0;
|
||||
float* WavCoeffs_ab0 = WaveletCoeffs_ab.get_coeff0();
|
||||
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel num_threads(wavNestedLevels) if (wavNestedLevels>1)
|
||||
@ -2748,7 +2748,7 @@ void ImProcFunctions::WaveletcontAllAB(LabImage * labco, float ** varhue, float
|
||||
int Wlvl_ab = WaveletCoeffs_ab.level_W(lvl);
|
||||
int Hlvl_ab = WaveletCoeffs_ab.level_H(lvl);
|
||||
|
||||
float ** WavCoeffs_ab = WaveletCoeffs_ab.level_coeffs(lvl);
|
||||
float* const* WavCoeffs_ab = WaveletCoeffs_ab.level_coeffs(lvl);
|
||||
ContAllAB(labco, maxlvl, varhue, varchrom, WavCoeffs_ab, WavCoeffs_ab0, lvl, dir, waOpacityCurveW, cp, Wlvl_ab, Hlvl_ab, useChannelA, meanab, sigmaab);
|
||||
int minWL = min(Wlvl_ab, Hlvl_ab);
|
||||
|
||||
@ -2828,7 +2828,7 @@ void ImProcFunctions::WaveletcontAllAB(LabImage * labco, float ** varhue, float
|
||||
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
void ImProcFunctions::calckoe(float ** WavCoeffs_LL, const cont_params& cp, float *koeLi[12], int level, int dir, int W_L, int H_L, float edd, float *maxkoeLi, float **tmC)
|
||||
void ImProcFunctions::calckoe(const float* const* WavCoeffs_LL, const cont_params& cp, float *koeLi[12], int level, int dir, int W_L, int H_L, float edd, float *maxkoeLi, float **tmC)
|
||||
{
|
||||
int borderL = 2;
|
||||
|
||||
@ -2966,7 +2966,7 @@ void ImProcFunctions::calckoe(float ** WavCoeffs_LL, const cont_params& cp, floa
|
||||
|
||||
}
|
||||
|
||||
void ImProcFunctions::finalContAllL(float ** WavCoeffs_L, float * WavCoeffs_L0, int level, int dir, const cont_params &cp,
|
||||
void ImProcFunctions::finalContAllL(float* const* WavCoeffs_L, float * WavCoeffs_L0, int level, int dir, const cont_params &cp,
|
||||
int W_L, int H_L, float *mean, float *sigma, float *MaxP, const WavOpacityCurveWL & waOpacityCurveWL)
|
||||
{
|
||||
if (cp.diagcurv && cp.finena && MaxP[level] > 0.f && mean[level] != 0.f && sigma[level] != 0.f) { //curve
|
||||
@ -3120,7 +3120,7 @@ void ImProcFunctions::finalContAllL(float ** WavCoeffs_L, float * WavCoeffs_L0,
|
||||
|
||||
}
|
||||
|
||||
void ImProcFunctions::ContAllL(float *koeLi[12], float *maxkoeLi, bool lipschitz, int maxlvl, LabImage * labco, float ** varhue, float **varchrom, float ** WavCoeffs_L, float * WavCoeffs_L0, int level, int dir, struct cont_params &cp,
|
||||
void ImProcFunctions::ContAllL(float *koeLi[12], float *maxkoeLi, bool lipschitz, int maxlvl, LabImage * labco, const float* const* varhue, const float* const* varchrom, float* const* WavCoeffs_L, float * WavCoeffs_L0, int level, int dir, struct cont_params &cp,
|
||||
int W_L, int H_L, int skip, float *mean, float *sigma, float *MaxP, float *MaxN, const WavCurve & wavCLVCcurve, const WavOpacityCurveW & waOpacityCurveW, const WavOpacityCurveSH & waOpacityCurveSH, FlatCurve* ChCurve, bool Chutili)
|
||||
{
|
||||
assert(level >= 0);
|
||||
@ -3907,7 +3907,7 @@ void ImProcFunctions::ContAllL(float *koeLi[12], float *maxkoeLi, bool lipschitz
|
||||
// choicelevel = choicelevel == -1 ? 4 : choicelevel;
|
||||
}
|
||||
|
||||
void ImProcFunctions::ContAllAB(LabImage * labco, int maxlvl, float ** varhue, float **varchrom, float ** WavCoeffs_ab, float * WavCoeffs_ab0, int level, int dir, const WavOpacityCurveW & waOpacityCurveW, struct cont_params &cp,
|
||||
void ImProcFunctions::ContAllAB(LabImage * labco, int maxlvl, float ** varhue, float **varchrom, float* const* WavCoeffs_ab, float * WavCoeffs_ab0, int level, int dir, const WavOpacityCurveW & waOpacityCurveW, struct cont_params &cp,
|
||||
int W_ab, int H_ab, const bool useChannelA, float *meanab, float *sigmaab)
|
||||
{
|
||||
float cpMul = cp.mul[level];
|
||||
|
Loading…
x
Reference in New Issue
Block a user