DIPlib Documentation - ©1995-2015 Quantitative Imaging Group, Delft University of Technology.

# ConvolveFT

Fourier transform--based convolution filter

## SYNOPSIS

`#include "dip_linear.h"`

dip_Error dip_ConvolveFT ( in, psf, out, inrep, psfrep, outrep )

## DATA TYPES

binary, integer, float, complex

## FUNCTION

This function convolves the `in` image with the point spread function `psf`, by multiplying their Fourier transforms. The `inrep`, `psfrep` and `outrep` specify whether the images are spatial images (`DIP_IMAGE_REPRESENTATION_SPATIAL`) or their Fourier transform. (`DIP_IMAGE_REPRESENTATION_SPECTRAL`).

`out` is cast to a real type if and only if both `in` and `psf` are real and in the spatial domain. That is, no effort is made to check for evenness of images in the Fourier domain, nor to check the values of the imaginary component of the result. To convert the output to a real-valued type, use the function `ConvertDataType`.

## ARGUMENTS

Data type | Name | Description
`dip_Image` | `in` | Input image
`dip_Image` | `psf` | Psf image
`dip_Image` | `out` | Output image
`dipf_ImageRepresentation` | `inrep` | Input spatial or spectral
`dipf_ImageRepresentation` | `psfrep` | PSF spatial or spectral
`dipf_ImageRepresentation` | `outrep` | Output spatial or spectral

## SEE ALSO

General information about convolution