2
* * Copyright (C) 2006-2011 Anders Brander <anders@brander.dk>,
3
* * Anders Kvist <akv@lnxbx.dk> and Klaus Post <klauspost@gmail.com>
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License
7
* as published by the Free Software Foundation; either version 2
8
* of the License, or (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20
#ifndef fftdenoiser_h__
21
#define fftdenoiser_h__
22
#include <rawstudio.h>
23
#include "floatplanarimage.h"
24
#include "denoisethread.h"
25
#include "denoiseinterface.h"
30
#define FFT_BLOCK_SIZE 128 // Preferable able to be factorized into primes, must be divideable by 4.
31
#define FFT_BLOCK_OVERLAP 24 // Must be dividable by 4 (OVERLAP * 2 must be < SIZE)
32
#define SIGMA_FACTOR 0.25f; // Amount to multiply sigma by to give reasonable amount
38
virtual ~FFTDenoiser(void);
39
gboolean initializeFFT();
40
virtual void setParameters( FFTDenoiseInfo *info);
41
virtual void denoiseImage(RS_IMAGE16* image);
44
virtual void processJobs(FloatPlanarImage &img, FloatPlanarImage &outImg);
45
void waitForJobs(JobQueue *waiting_jobs);
47
DenoiseThread *threads;
48
fftwf_plan plan_forward;
49
fftwf_plan plan_reverse;
54
float sharpenMinSigma;
55
float sharpenMaxSigma;
58
}} // namespace RawStudio::FFTFilter
60
#endif // fftdenoiser_h__