Common Pipeline Library Reference Manual  5.3.1
Functions
FFTW wrappers

Functions

cpl_error_code cpl_fft_image (cpl_image *out, const cpl_image *in, unsigned mode)
 Perform a FFT operation on an image.
cpl_error_code cpl_fft_imagelist (cpl_imagelist *out, const cpl_imagelist *in, unsigned mode)
 Perform a FFT operation on the images of an imagelist.

Detailed Description

This module provides FFTW wrappers

Synopsis:
   #include "cpl_fft.h"

Function Documentation

cpl_error_code cpl_fft_image ( cpl_image *  out,
const cpl_image *  in,
unsigned  mode 
)

Perform a FFT operation on an image.

Parameters:
outPre-allocated output image
inInput image
modeAt present, either CPL_FFT_FORWARD or CPL_FFT_BACKWARD
Returns:
CPL_ERROR_NONE or the corresponding _cpl_error_code_

This function performs a FFT operation on an image, using the FFTW library. If the CPL has not been configured providing this library, this function will return CPL_ERROR_UNSUPPORTED_MODE.

When performing a forward FFT, the input image must be of a real type and the output image of a complex type, and viceversa when performing an inverse FFT.

Both image types must match in precision level. Integer images are not supported.

Possible _cpl_error_code_ set in this function:

  • CPL_ERROR_NULL_INPUT if any of the images is NULL
  • CPL_ERROR_ILLEGAL_INPUT if the images types (real or complex) are not what it is expected for the type of operation (forward or inverse) if image sizes do not match
  • CPL_ERROR_TYPE_MISMATCH if images are of different precision
  • CPL_ERROR_UNSUPPORTED_MODE if FFTW has not been installed
cpl_error_code cpl_fft_imagelist ( cpl_imagelist *  out,
const cpl_imagelist *  in,
unsigned  mode 
)

Perform a FFT operation on the images of an imagelist.

Parameters:
outPre-allocated output imagelist
inInput imagelist
modeAt present, either CPL_FFT_FORWARD or CPL_FFT_BACKWARD
Returns:
CPL_ERROR_NONE or the corresponding _cpl_error_code_
See also:
cpl_fft_image()