class CrImage::FftUtil
- CrImage::FftUtil
- Reference
- Object
Overview
Utility class for Fast Fourier Transforms
At some point in the future, this may be moved to its own shard.
Defined in:
cr-image/fft_util.crClass Method Summary
-
.fft1d(inp : Array(Float64), buffer : Array(Complex) | Nil = nil) : Array(Complex)
Perform Fast Fourier Transform on
inp
. -
.fft1d(inp : Array(Complex), buffer : Array(Complex) = inp.dup) : Array(Complex)
Perform Fast Fourier Transform on
inp
. -
.fft1d_unsafe(ret : Array(Complex) | Slice(Complex), buffer : Array(Complex) | Slice(Complex) = ret.dup) : Array(Complex) | Slice(Complex)
Calculates Fast Fourier Transform of
ret
. -
.fft2d(width : Int32, inp : Array(Float64), buffer : Array(Complex) | Nil = nil) : Array(Complex)
Perform Fast Fourier Transform, treating as
inp
as a 2 dimensional array withwidth
. -
.fft2d(width : Int32, inp : Array(Complex), buffer : Array(Complex) | Nil = nil) : Array(Complex)
Perform Fast Fourier Transform, treating as
inp
as a 2 dimensional array withwidth
. -
.fft2d_unsafe(width : Int32, ret : Array(Complex), buffer : Array(Complex)) : Array(Complex)
Perform Fast Fourier Transform, using and rewriting
ret
for the output, as a 2 dimensional array withwidth
. -
.ifft1d(inp : Array(Complex), buffer : Array(Complex) = inp.dup) : Array(Complex)
Perform Inverse Fast Fourier Transform on
inp
. -
.ifft1d_unsafe(ret : Array(Complex) | Slice(Complex), buffer : Array(Complex) = ret.dup) : Array(Complex) | Slice(Complex)
Perform Inverse Fast Fourier Transform on
ret
. -
.ifft2d(width : Int32, inp : Array(Complex), buffer : Array(Complex) | Nil = nil) : Array(Complex)
Perform Inverse Fast Fourier Transform, treating as
inp
as a 2 dimensional array withwidth
. - .ifft2d_unsafe(width : Int32, ret : Array(Complex), buffer : Array(Complex)) : Array(Complex)
Class Method Detail
Perform Fast Fourier Transform on inp
.
Can optionally pass in buffer
which must be the same length as inp
Perform Fast Fourier Transform on inp
.
Can optionally pass in buffer
which must be the same length as inp
Calculates Fast Fourier Transform of ret
. Uses and modifies ret
in place.
Can optionally pass in buffer
which must be the same length as inp
. This method makes no bound checks or error checks.
Perform Fast Fourier Transform, treating as inp
as a 2 dimensional array with width
.
Can optionally pass in buffer
which must be an array at least the larger of width
or inp.size // width
.
Perform Fast Fourier Transform, treating as inp
as a 2 dimensional array with width
.
Can optionally pass in buffer
which must be an array at least the larger of width
or inp.size // width
.
Perform Fast Fourier Transform, using and rewriting ret
for the output, as a 2 dimensional array with width
. buffer
must be an array
of length at least the longer of width
or height
of the input array.
Perform Inverse Fast Fourier Transform on inp
.
Can optionally pass in buffer
which must be at least the same size of inp
.
Perform Inverse Fast Fourier Transform on ret
. Will use and overwrite the original values in ret
to do so.
Can optionally pass in buffer
which must be at least the same size of inp
. This method makes no bound checks or error checks.
Perform Inverse Fast Fourier Transform, treating as inp
as a 2 dimensional array with width
.
Can optionally pass in buffer
which must be an array at least the larger of width
or inp.size // width
.