Ocean
Ocean::CV::FrequencyAnalysis Class Reference

This class provides frame frequency analysis functions. More...

Static Public Member Functions

static bool image2frequencies (const Frame &frame, Complexes &frequencies, Worker *worker=nullptr)
 Applies a Fourier transformation for a given frame. More...
 
static bool image2frequencies (const Frame &frame, Complex *frequencies, Worker *worker=nullptr)
 Applies a Fourier transformation for a given frame. More...
 
static bool frequencies2image (const Complex *frequencies, Frame &frame, Worker *worker=nullptr)
 Applies an inverse Fourier analysis for given frequencies. More...
 
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. More...
 
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. More...
 
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. More...
 
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) and returns a magnitude frame for the resulting set of frequencies. More...
 

Detailed Description

This class provides frame frequency analysis functions.

Member Function Documentation

◆ frequencies2image()

static bool Ocean::CV::FrequencyAnalysis::frequencies2image ( const Complex frequencies,
Frame frame,
Worker worker = nullptr 
)
static

Applies an inverse Fourier analysis for given frequencies.

The frame type of the resulting frame must match with the given set of frequencies.

Parameters
frequenciesThe frequencies for which an inverse Fourier transformation will be applied, each channel must be provided as joined block of frequencies with frame.channels() * (frame.width() * frame.height()) elements, must be valid
frameResulting frame that defines the resulting frame type, must be valid
workerOptional worker to distribute the computation
Returns
True, if succeeded

◆ frequencies2image8BitPerChannel()

static void Ocean::CV::FrequencyAnalysis::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 
)
static

Applies an inverse Fourier transformation for a given 1 channel 8 bit frame.

Parameters
frequenciesThe complex frequencies for which the inverse transformation will be applied
widthThe width of the frame in pixel, with range [1, infinity)
heightThe height of the frame in pixel, with range [1, infinity)
channelsNumber of interleaved frame channels, each channel is provided as joined block of frequencies, with range [1, infinity)
framePaddingElementsThe number of padding elements at the end of each frame row, in elements, with range [0, infinity)
frameResulting frame data with interleaved data channels
workerOptional worker object to distribute the computation

◆ image2frequencies() [1/2]

static bool Ocean::CV::FrequencyAnalysis::image2frequencies ( const Frame frame,
Complex frequencies,
Worker worker = nullptr 
)
static

Applies a Fourier transformation for a given frame.

Parameters
frameThe frame for which the analysis is requested, must be valid
frequenciesResulting frequencies
workerOptional worker object to distribute the computation
Returns
True, if succeeded

◆ image2frequencies() [2/2]

bool Ocean::CV::FrequencyAnalysis::image2frequencies ( const Frame frame,
Complexes frequencies,
Worker worker = nullptr 
)
inlinestatic

Applies a Fourier transformation for a given frame.

Parameters
frameThe frame for which the analysis is requested, must be valid
frequenciesResulting frequencies, the number of resulting frequency components will be adjusted automatically
workerOptional worker object to distribute the computation
Returns
True, if succeeded

◆ image2frequencies8BitPerChannel()

static void Ocean::CV::FrequencyAnalysis::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 
)
static

Applies a Fourier transformation for a given 1 channel 8 bit frame.

Parameters
frameThe frame for which the analysis is requested, must be valid
widthThe width of the frame in pixel, with range [1, infinity)
heightThe height of the frame in pixel, with range [1, infinity)
channelsThe number of interleaved frame channels, with range [1, infinity)
framePaddingElementsThe number of padding elements at the end of each frame row, in elements, with range [0, infinity)
frequenciesResulting frequencies, with channels * (width * height) elements, each channel will be provided as joined block of frequencies, must be valid
workerOptional worker object to distribute the computation

◆ magnitudeFrame() [1/2]

static Frame Ocean::CV::FrequencyAnalysis::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 
)
static

Creates a magnitude frame for a given set of frequencies.

Parameters
frequenciesThe complex frequencies for which the magnitude frame will be created, each channel needs to be provided as joined block of frequencies, must be valid
widthThe width of the resulting frame (and also the original frame) in pixel
heightThe height of the resulting frame (and also the original frame) in pixel
channelsThe number of channels the frequencies have, with range [1, infinity)
octavesNumber of octaves that will be displayed
shiftTrue, to create a shifted magnitude frame
Returns
Resulting magnitude frame
See also
FourierTransformation::shiftHalfDimension2(), FrameNormalizer::normalizeLogarithmToUint8().

◆ magnitudeFrame() [2/2]

static Frame Ocean::CV::FrequencyAnalysis::magnitudeFrame ( const Frame frame,
const Scalar  octaves,
const bool  shift,
Worker worker = nullptr 
)
static

Performs a Fourier transformation on a given frame (that is transformed into a grayscale frame before) and returns a magnitude frame for the resulting set of frequencies.

Parameters
frameThe frame for which the magnitude frame will be determined
octavesNumber of octaves that will be displayed
shiftTrue, to create a shifted magnitude frame
workerOptional worker object to distribute the computation
Returns
Resulting magnitude frame
See also
FourierTransformation::shiftHalfDimension2(), FrameNormalizer::normalizeLogarithmToUint8().

The documentation for this class was generated from the following file: