fourier.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
#ifndef _LIBCP_FOURIER_H_
00026
#define _LIBCP_FOURIER_H_
00027
00028
#include <cstdlib>
00029
#include <iostream>
00030
00031
using namespace std;
00032
00033
#include "globals.h"
00034
#include "image.h"
00035
#include "compleximage.h"
00036
00037
namespace LIBCP{
00038
00045 class Fourier
00046 {
00047
public:
00048
static int fastFourierTransform(
ComplexImage* complex,
Image* src );
00049
static int inverseFastFourierTransform(
Image* dst,
ComplexImage* complex );
00050
static int shiftFFT(
ComplexImage* dst ,
ComplexImage* src );
00051
static int shiftFFT(
ComplexImage* &img );
00052
static void resizeToPowerOf2(
Image* &img );
00053
static int filterFrequencySpaceLowpass(
ComplexImage* &dst,
00054
ComplexImage* &src,
00055
double cut_off );
00056
static int filterFrequencySpaceHighpass(
ComplexImage* &dst,
00057
ComplexImage* &src,
00058
double cut_off );
00059
static int filterFrequencySpaceBandpass(
ComplexImage* &dst,
00060
ComplexImage* &src,
00061
double lower_cut_off,
00062
double upper_cut_off );
00063
static int filterFrequencySpaceBandstop(
ComplexImage* &dst,
00064
ComplexImage* &src,
00065
double lower_cut_off,
00066
double upper_cut_off );
00067
static int smothedFilterFrequencySpace(
Image* dst,
Image* src );
00068
static int orientedFilterFrequencySpace(
Image* dst,
Image* src );
00069
static int scaleUpOrDown(
Image* dst,
Image* src );
00070
static int conjugateComplex(
ComplexImage* dst,
ComplexImage* src );
00071
static int complexMultiplication(
ComplexImage* dst,
ComplexImage* src );
00072
static int complexDivision(
Image* dst,
Image* src );
00073
static int iterativeDeconvolution(
Image* dst,
Image* src );
00074
static int wienerFilterForRestoration(
Image* dst,
Image* src );
00075
00076
private:
00077
static void fft( Complex* x, Complex* twiddle,
int N );
00078
static void Twiddle( Complex* x,
int N );
00079
static void iTwiddle( Complex* x,
int N );
00080
static void createComplexFromImage(
Image* img,
ComplexImage* complex );
00081
static void createImageFromComplex(
Image* img,
ComplexImage* complex,
00082
bool normalize );
00083
00084
00085 };
00086 }
00087
00088
#endif //_LIBCP_FOURIER_H_
Generated on Wed May 26 16:43:53 2004 for libcp by
1.3.7