Fourier Transform

1 개요

이미지의 푸리에 변환을 연산하는 알고리즘입니다.

2 알고리즘 상세 설명

FFT(고속 푸리에 변환)은 DFT(이산 푸리에 변환)과 그 역변환을 빠르게 수행하는 효율적인 알고리즘입니다.
푸리에 변환은 임의의 입력 신호를 다양한 주파수를 갖는 주기함수(sin, cos)들의 합으로 분해하여 표현하는 것입니다. sin 과 cos 둘 다 있기 때문에 complex(복소수) 형태로 표현됩니다.
이미지에서는 픽셀의 밝기 변화를 파형 또는 신호로 보고 주파수 분석을 적용할 수 있습니다.
주파수 도메인으로 변경하게 되면 DC Point 를 기준으로 퍼져나갈 때 저주파에서 고주파 영역으로 넘어가는 형태를 띄게 됩니다.
저주파는 이미지의 변화가 적은 부분을 나타내게 되고, 고주파는 이미지의 변화가 높은 부분(엣지)을 나타내게 됩니다.
일반적으로 시각적 분석에 용이한 DC Point 가 중앙에 위치하는 형태로 변환하는데, 이는 SetShiftSpectrum 함수를 통해 설정 가능합니다.
FLImaging® View 에서 출력 시 Magnitude 값을 Normalize 한 형태로 출력됩니다.
해당 알고리즘은 Nvidia Cuda 연산을 지원하기 때문에, Nvidia Cuda 가 사용 가능한 환경에서 더 빠른 연산을 수행할 수 있습니다.

Source Image Non Shift Image Shift Image
Source Image Non Shift Image Shift Image
Fig. Fourier Transform 동작 실행

3 파라미터 설정 및 사용 방법

멤버함수 파라미터 설 명
SetShiftSpectrum EFourierTransformShiftSpectrum eShiftSpectrum IN 스펙트럼 이동 옵션을 설정합니다.

스펙트럼 이동 옵션을 설정합니다. EFourierTransformShiftSpectrum_None 으로 설정 시 스펙트럼 이동을 하지 않고, EFourierTransformShiftSpectrum_Shift 으로 설정 시 스펙트럼 이동(DC Point 중앙으로 이동)을 적용합니다.
eShiftSpectrum - Default Value: EFourierTransformShiftSpectrum_Shift

멤버함수 파라미터 설 명
SetResultType EFloatingPointAccuracy eResultType IN 이미지 결과 타입

이미지 결과 타입을 설정합니다. EFloatingPointAccuracy_Bit32 로 설정 시 결과 이미지는 float 2채널 이미지로 생성되고, EFloatingPointAccuracy_Bit64 로 설정 시 결과 이미지는 double 2채널 이미지로 생성됩니다.
eResultType - Default Value: EFloatingPointAccuracy_Bit32

4 예제 코드

CFourierTransform FourierTransform;

CFLImage fliSourceImage;
FourierTransform.SetSourceImage(fliSourceImage);

CFLImage fliDestinationImage;
FourierTransform.SetDestinationImage(fliDestinationImage);

FourierTransform.SetShiftSpectrum(EFourierTransformShiftSpectrum::EFourierTransformShiftSpectrum_Shift);
FourierTransform.SetResultType(EFloatingPointAccuracy::EFloatingPointAccuracy_Bit32);

FourierTransform.Execute();
CFourierTransform FourierTransform = new CFourierTransform();

CFLImage fliSourceImage = new CFLImage();
FourierTransform.SetSourceImage(ref fliSourceImage);

CFLImage fliDestinationImage = new CFLImage();
FourierTransform.SetDestinationImage(ref fliDestinationImage);

FourierTransform.SetShiftSpectrum(EFourierTransformShiftSpectrum.Shift);
FourierTransform.SetResultType(EFloatingPointAccuracy.Bit32);

FourierTransform.Execute();