freqfilt

freqfilt

Synopsis

int                 vips_fwfft                          (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_invfft                         (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_freqmult                       (VipsImage *in,
                                                         VipsImage *mask,
                                                         VipsImage **out,
                                                         ...);
int                 vips_spectrum                       (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);
int                 vips_phasecor                       (VipsImage *in1,
                                                         VipsImage *in2,
                                                         VipsImage **out,
                                                         ...);

Description

Details

vips_fwfft ()

int                 vips_fwfft                          (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Transform an image to Fourier space.

VIPS uses the fftw Fourier Transform library. If this library was not available when VIPS was configured, these functions will fail.

See also: vips_invfft().

in :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_invfft ()

int                 vips_invfft                         (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Optional arguments:

real: only output the real part

Transform an image from Fourier space to real space. The result is complex. If you are OK with a real result, set real, it's quicker.

VIPS uses the fftw Fourier Transform library. If this library was not available when VIPS was configured, these functions will fail.

See also: vips_fwfft().

in :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_freqmult ()

int                 vips_freqmult                       (VipsImage *in,
                                                         VipsImage *mask,
                                                         VipsImage **out,
                                                         ...);

Multiply in by mask in Fourier space.

in is transformed to Fourier space, multipled with mask, then transformed back to real space. If in is already a complex image, just multiply then inverse transform.

See also: vips_invfft(), vips_mask_ideal().

in :

input image

mask :

mask image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_spectrum ()

int                 vips_spectrum                       (VipsImage *in,
                                                         VipsImage **out,
                                                         ...);

Make a displayable (ie. 8-bit unsigned int) power spectrum.

If in is non-complex, it is transformed to Fourier space. Then the absolute value is passed through vips_scale() in log mode, and vips_wrap().

See also: vips_fwfft(), vips_scale(), vips_wrap().

in :

input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.

vips_phasecor ()

int                 vips_phasecor                       (VipsImage *in1,
                                                         VipsImage *in2,
                                                         VipsImage **out,
                                                         ...);

Convert the two input images to Fourier space, calculate phase-correlation, back to real space.

See also: vips_fwfft(), vips_cross_phase(),

in1 :

first input image

in2 :

second input image

out :

output image

... :

NULL-terminated list of optional named arguments

Returns :

0 on success, -1 on error.