IPSDK 4.2
IPSDK : Image Processing Software Development Kit
Forward Discrete Fourier Transform 2d
img1,img2 = forwardDiscreteFourierTransform2dImg (inImg)
img1,img2 = forwardDiscreteFourierTransform2dImg (inImg,inOptDFTConfig)

Detailed Description

Forward Discrete Fourier Transform for an input 2d image.

This algorithm allows to compute the Forward Discrete Fourier Transformation of an input 2d image $ InImg $.

In two dimensions, the Forward Discrete Fourier Transformation (FDFT) of input image $ InImg $ with $ S_y $ rows and $ S_x $ columns is defined as the following complex image:

\[ fdft(x, y) = \sum_{k=0}^{S_y}{\sum_{l=0}^{S_x}{InImg(l, k)\exp^{-2\pi i \left (\frac{xl}{S_x}+\frac{yk}{S_y} \right )}}} \]

On output this complex image is represented by a couple of images $ OutDFTImg1 = Re(fdft) $ and $ OutDFTImg2 = Im(fdft) $ (user should note that this is not the default output representation, see below).

The following image is an illustration of Forward Discrete Fourier Transformation results in case of previous configuration :

forwardDiscreteFourierTransform2dImg1.png

A common 'user friendly' representation of FDFT results consists in:

Output images $ OutDFTImg1 $ and $ OutDFTImg2 $ are then modified in function.

Input parameter $ InDFTConfig $ allows to setup:

The following image is an illustration of Forward Discrete Fourier Transformation results in case of polar coordinates, centered quadrants policy and default scale (which is the default configuration):

forwardDiscreteFourierTransform2dImg2.png
See also
https://en.wikipedia.org/wiki/Discrete_Fourier_transform

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLIntensityTransform as itrans

Code Example

# opening of input image
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
# Forward Discrete Fourier Transform of input image
outImg1, outImg2 = itrans.forwardDiscreteFourierTransform2dImg(inImg)

Example of C++ code :

Example informations

Header file

#include <IPSDKIPL/IPSDKIPLIntensityTransform/Processor/ForwardDiscreteFourierTransform2dImg/ForwardDiscreteFourierTransform2dImg.h>

Code Example

// opening of input image
ImagePtr pInImg = loadTiffImageFile(inputImgPath);
// Forward Discrete Fourier Transform of input image
ForwardDFTImg forwardDFTImg = forwardDiscreteFourierTransform2dImg(pInImg);