IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Forward Discrete Fourier Transform 2d

Forward Discrete Fourier Transform for an input 2d image. More...

IPSDKIPLINTENSITYTRANSFORM_API ForwardDFTImg ipsdk::imaproc::itrans::forwardDiscreteFourierTransform2dImg (const image::ImageConstPtr &pInImg)
 wrapper function for forward Discrete Fourier Transform for an input 2d image More...
 
IPSDKIPLINTENSITYTRANSFORM_API ForwardDFTImg ipsdk::imaproc::itrans::forwardDiscreteFourierTransform2dImg (const image::ImageConstPtr &pInImg, const ipsdk::imaproc::attr::DFTConfigConstPtr &pInOptDFTConfig)
 wrapper function for forward Discrete Fourier Transform for an input 2d image More...
 
IPSDKIPLINTENSITYTRANSFORM_API void ipsdk::imaproc::itrans::forwardDiscreteFourierTransform2dImg (const image::ImageConstPtr &pInImg, const ipsdk::imaproc::attr::DFTConfigConstPtr &pInOptDFTConfig, const image::ImagePtr &pOutDFTImg1, const image::ImagePtr &pOutDFTImg2)
 wrapper function for forward Discrete Fourier Transform for an input 2d image More...
 

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

Attributes description

Attribute description for algorithm :

Name ToolTip Default Initializer
ipsdk::imaproc::attr::InImg [Input] image for processing operation X
ipsdk::imaproc::attr::InOptDFTConfig [Input Optional] configuration for Discrete Fourier Transform algorithm X
ipsdk::imaproc::attr::OutOptWk1RealGpuImg [Output Optional] Temporary working image for GPU processes (data contained in image buffer are reals) X
ipsdk::imaproc::attr::OutDFTImg1 [Output] first element for Discrete Fourier Transform (can be real cartesian part or rho polar part [default] of signal depending on algorithm configuration) duplicateInOut (_pOutDFTImg1, _pInImg, ipsdk::image::eImageBufferType::eIBT_Real32)
ipsdk::imaproc::attr::OutDFTImg2 [Output] second element for Discrete Fourier Transform (can be imaginary cartesian part or theta polar part [default] of signal depending on algorithm configuration) duplicateInOut (_pOutDFTImg2, _pInImg, ipsdk::image::eImageBufferType::eIBT_Real32)

Global Rule description

Global rule description for algorithm :
ipsdk::processor::none () && 
//ipsdk::imaproc::matchSize (_pInImg,_pOutDFTImg1,_pOutDFTImg2) && 
//ipsdk::processor::If (
 ipsdk::processor::isSet (_pOutOptWk1RealGpuImg), //
 CustomRuleTODO (_pInImg,_pOutOptWk1RealGpuImg), //
 ipsdk::processor::none ()),
ipsdk::imaproc::noInSitu (_pInImg,_pOutDFTImg1)

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

Associated library

IPSDKIPLIntensityTransform

Header file

Code Example

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

Function Documentation

◆ forwardDiscreteFourierTransform2dImg() [1/3]

IPSDKIPLINTENSITYTRANSFORM_API ForwardDFTImg ipsdk::imaproc::itrans::forwardDiscreteFourierTransform2dImg ( const image::ImageConstPtr pInImg)

wrapper function for forward Discrete Fourier Transform for an input 2d image

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ forwardDiscreteFourierTransform2dImg() [2/3]

IPSDKIPLINTENSITYTRANSFORM_API ForwardDFTImg ipsdk::imaproc::itrans::forwardDiscreteFourierTransform2dImg ( const image::ImageConstPtr pInImg,
const ipsdk::imaproc::attr::DFTConfigConstPtr pInOptDFTConfig 
)

wrapper function for forward Discrete Fourier Transform for an input 2d image

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ forwardDiscreteFourierTransform2dImg() [3/3]

IPSDKIPLINTENSITYTRANSFORM_API void ipsdk::imaproc::itrans::forwardDiscreteFourierTransform2dImg ( const image::ImageConstPtr pInImg,
const ipsdk::imaproc::attr::DFTConfigConstPtr pInOptDFTConfig,
const image::ImagePtr pOutDFTImg1,
const image::ImagePtr pOutDFTImg2 
)

wrapper function for forward Discrete Fourier Transform for an input 2d image

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure