8#ifndef META_OCEAN_CV_FREQUENCY_ANALYSIS_H
9#define META_OCEAN_CV_FREQUENCY_ANALYSIS_H
39 static inline bool image2frequencies(
const Frame& frame,
Complexes& frequencies,
Worker* worker =
nullptr);
70 static void image2frequencies8BitPerChannel(
const uint8_t* frame,
const unsigned int width,
const unsigned int height,
const unsigned int channels,
const unsigned int framePaddingElements,
Complex* frequencies,
Worker* worker =
nullptr);
82 static void frequencies2image8BitPerChannel(
const Complex* frequencies,
const unsigned int width,
const unsigned int height,
const unsigned int channels,
const unsigned int framePaddingElements, uint8_t* frame,
Worker* worker =
nullptr);
95 static Frame magnitudeFrame(
const Complex* frequencies,
const unsigned int width,
const unsigned int height,
const unsigned int channels,
const Scalar octaves =
Scalar(5),
const bool shift =
true);
This class provides frame frequency analysis functions.
Definition FrequencyAnalysis.h:29
static bool image2frequencies(const Frame &frame, Complexes &frequencies, Worker *worker=nullptr)
Applies a Fourier transformation for a given frame.
Definition FrequencyAnalysis.h:109
static void image2frequencies8BitPerChannel(const uint8_t *frame, const unsigned int width, const unsigned int height, const unsigned int channels, const unsigned int framePaddingElements, Complex *frequencies, Worker *worker=nullptr)
Applies a Fourier transformation for a given 1 channel 8 bit frame.
static bool image2frequencies(const Frame &frame, Complex *frequencies, Worker *worker=nullptr)
Applies a Fourier transformation for a given frame.
static bool frequencies2image(const Complex *frequencies, Frame &frame, Worker *worker=nullptr)
Applies an inverse Fourier analysis for given frequencies.
static Frame magnitudeFrame(const Frame &frame, const Scalar octaves, const bool shift, Worker *worker=nullptr)
Performs a Fourier transformation on a given frame (that is transformed into a grayscale frame before...
static void frequencies2image8BitPerChannel(const Complex *frequencies, const unsigned int width, const unsigned int height, const unsigned int channels, const unsigned int framePaddingElements, uint8_t *frame, Worker *worker=nullptr)
Applies an inverse Fourier transformation for a given 1 channel 8 bit frame.
static Frame magnitudeFrame(const Complex *frequencies, const unsigned int width, const unsigned int height, const unsigned int channels, const Scalar octaves=Scalar(5), const bool shift=true)
Creates a magnitude frame for a given set of frequencies.
This class implements Ocean's image class.
Definition Frame.h:1808
T * data(const unsigned int planeIndex=0u)
Returns a pointer to the pixel data of a specific plane.
Definition Frame.h:4239
bool isValid() const
Returns whether this frame is valid.
Definition Frame.h:4528
unsigned int pixels() const
Returns the number of pixels for the frame.
Definition Frame.h:3220
uint32_t numberPlanes() const
Returns the number of planes of the pixel format of this frame.
Definition Frame.h:3210
PixelFormat pixelFormat() const
Returns the pixel format of the frame.
Definition Frame.h:3180
unsigned int channels() const
Returns the number of individual channels the frame has.
Definition Frame.h:3200
This class implements a worker able to distribute function calls over different threads.
Definition Worker.h:33
float Scalar
Definition of a scalar type.
Definition Math.h:129
std::complex< Scalar > Complex
Definition of a complex number based on the default floating point precision data type.
Definition Complex.h:34
std::vector< Complex > Complexes
Definition of a vector holding complex objects.
Definition Complex.h:40
The namespace covering the entire Ocean framework.
Definition Accessor.h:15