📄 fourier.h
字号:
// Fourier.h: interface for the CFourier class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_FOURIER_H__28DCCEE4_216D_4552_BDF9_DC09A15A11A7__INCLUDED_)
#define AFX_FOURIER_H__28DCCEE4_216D_4552_BDF9_DC09A15A11A7__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <COMPLEX>
#include <MEMORY.H>
using namespace std;
#define PI 3.1415926536
class CFourier
{
public:
CFourier();
virtual ~CFourier();
public:
long w; //处理数据的宽度
long h; //处理数据的高度
//1 dimension--------------------------------------
//一维short数据fft
BOOL Fourier1(short* TDdata,long lWidth,complex<float>*FDresult);
//一维int数据fft
BOOL Fourier1(int* TDdata,long lWidth,complex<float>*FDresult);
//一维float数据fft
BOOL Fourier1(float* TDdata,long lWidth,complex<float>*FDresult);
//一维complex<float>数据fft
BOOL Fourier1(complex<float>* TDdata,long lWidth,complex<float>*FDresult);
//一维complex<float>数据ifft
BOOL InFourier1(complex<float>*FDdata,long lWidth,complex<float>*TDresult);
//2 dimension---------------------------------------
//二维short数据fft
BOOL Fourier2(short* TDdata,long lWidth,long lHeight,complex<float>* FDresult);
//二维int数据fft
BOOL Fourier2(int* TDdata,long lWidth,long lHeight,complex<float>*FDresult);
//二维float数据fft
BOOL Fourier2(float* TDdata,long lWidth,long lHeight,complex<float>*FDresult);
//二维complex<float>数据fft
BOOL Fourier2(complex<float>*TDdata,long lWidth,long lHeight,complex<float>*FDresult);
//
//二维short数据中的一维fft,当flag=1,只对列变换,flag=2,只对行变换
BOOL Fourier2(short* TDdata,long lWidth,long lHeight,complex<float>*FDresult,int flag);
//二维int数据中的一维fft,当flag=1,只对列变换,flag=2,只对行变换
BOOL Fourier2(int* TDdata,long lWidth,long lHeight,complex<float>*FDresult,int flag);
//二维float数据中的一维fft,当flag=1,只对列变换,flag=2,只对行变换
BOOL Fourier2(float* TDdata,long lWidth,long lHeight,complex<float>*FDresult,int flag);
//二维complex<float>数据中的一维fft,当flag=1,只对列变换,flag=2,只对行变换
BOOL Fourier2(complex<float>*TDdata,long lWidth,long lHeight,complex<float>*FDresult,int flag);
//二维complex<float>数据ifft
BOOL InFourier2(complex<float>*FDdata,long lWidth,long lHeight,complex<float>*TDresult);
BOOL InFourier2(complex<float>*FDdata,long lWidth,long lHeight);
//二维complex<float>数据中的一维ifft
BOOL InFourier2(complex<float>*FDdata,long lWidth,long lHeight,complex<float>*TDresult,int flag);
//迁移函数
void fftshift(complex<float>*Data,long lWidth,long lHeight,int flag);
protected:
void FFT(complex<float>*TD,int r);
void IFFT(complex<float>*FD,int r);
};
#endif // !defined(AFX_FOURIER_H__28DCCEE4_216D_4552_BDF9_DC09A15A11A7__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -