HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
(Fast Fourier Transform and inverse)

Functions

ImageBuf OIIO_API ImageBufAlgo::fft (const ImageBuf &src, ROI roi={}, int nthreads=0)
 
ImageBuf OIIO_API ImageBufAlgo::ifft (const ImageBuf &src, ROI roi={}, int nthreads=0)
 
bool OIIO_API ImageBufAlgo::fft (ImageBuf &dst, const ImageBuf &src, ROI roi={}, int nthreads=0)
 
bool OIIO_API ImageBufAlgo::ifft (ImageBuf &dst, const ImageBuf &src, ROI roi={}, int nthreads=0)
 

Detailed Description

Fast Fourier Transform and inverse

Return (or copy into dst) the discrete Fourier transform (DFT), or its inverse, of the section of src denoted by roi, If roi is not defined, it will be all of src's pixels.

fft() takes the discrete Fourier transform (DFT) of the section of src denoted by roi, returning it or storing it in dst. If roi is not defined, it will be all of src's pixels. Only one channel of src may be transformed at a time, so it will be the first channel described by roi (or, again, channel 0 if roi is undefined). If not already in the correct format, dst will be re-allocated to be a 2-channel float buffer of size roi.width() x roi.height, with channel 0 being the "real" part and channel 1 being the the "imaginary" part. The values returned are actually the unitary DFT, meaning that it is scaled by 1/sqrt(npixels).

ifft() takes the inverse discrete Fourier transform, transforming a 2-channel complex (real and imaginary) frequency domain image and into a single-channel spatial domain image. src must be a 2-channel float image, and is assumed to be a complex frequency-domain signal with the "real" component in channel 0 and the "imaginary" component in channel 1. dst will end up being a float image of one channel (the real component is kept, the imaginary component of the spatial-domain will be discarded). Just as with fft(), the ifft() function is dealing with the unitary DFT, so it is scaled by 1/sqrt(npixels).

Function Documentation

ImageBuf OIIO_API ImageBufAlgo::fft ( const ImageBuf src,
ROI  roi = {},
int  nthreads = 0 
)
bool OIIO_API ImageBufAlgo::fft ( ImageBuf dst,
const ImageBuf src,
ROI  roi = {},
int  nthreads = 0 
)
ImageBuf OIIO_API ImageBufAlgo::ifft ( const ImageBuf src,
ROI  roi = {},
int  nthreads = 0 
)
bool OIIO_API ImageBufAlgo::ifft ( ImageBuf dst,
const ImageBuf src,
ROI  roi = {},
int  nthreads = 0 
)