8 #ifndef META_OCEAN_TEST_TESTCV_TEST_FRAME_PYRAMID_H
9 #define META_OCEAN_TEST_TESTCV_TEST_FRAME_PYRAMID_H
39 static constexpr
unsigned int ALL_LAYERS = (
unsigned int)(-1);
49 static bool test(
const double testDuration,
Worker& worker);
This class implements a frame pyramid.
Definition: FramePyramid.h:37
std::function< bool(const Frame &sourceLayer, Frame &targetLayer, Worker *worker)> DownsamplingFunction
Definition of a function allowing to downsample a frame.
Definition: FramePyramid.h:82
DownsamplingMode
Definition of individual down sampling modes.
Definition: FramePyramid.h:44
This class implements Ocean's image class.
Definition: Frame.h:1792
This class implements tests for the functionality of frame pyramids.
Definition: TestFramePyramid.h:33
static bool testConstructor11(const double testDuration, Worker &worker)
Tests the constructor of a frame pyramid using a 1-1 downsampling.
static bool testCreationFramePyramidWithConstructor(const unsigned int width, const unsigned int height, const unsigned int channels, const unsigned int layers, const double testDuration, Worker &worker)
Tests the creation of a frame pyramid using the constructor for a specific frame with specific number...
static bool testCalculateMemorySize(const double testDuration)
Tests the calculateMemorySize() function.
static bool testConstructFromFrameMultiLayer(const unsigned int width, const unsigned int height, const unsigned int layerCount, const double testDuration, Worker &worker)
Tests the construction of a new frame pyramid from an existing frame.
static bool testConstructFromPyramid(const double testDuration, Worker &worker)
Tests the construction of a new frame pyramid from an existing source pyramid.
static bool validateConstructFromFrame(const CV::FramePyramid &framePyramid, const CV::FramePyramid::DownsamplingMode downsamplingMode, const Frame &frame, const unsigned int numberLayers, const UnorderedIndexSet32 &readOnlyLayers, const UnorderedIndexSet32 &ownerLayers, const UnorderedIndexSet32 &outsideMemoryBlockLayers)
Validates if the frame pyramid was created correctly with the specified settings.
static bool verifyPyramidOwnership(const CV::FramePyramid &framePyramid, const bool isValid, const bool isOwner, const Indices32 &layerIsOwner=Indices32())
Verifies the ownership properties of a frame pyramid.
static bool testCreationFramePyramidWithConstructor(const double testDuration, Worker &worker)
Tests the creation of a frame pyramid using the constructor.
static bool testCreationFramePyramidWithReplace(const double testDuration, Worker &worker)
Tests the creation of a frame pyramid using the replace() function.
static bool validateFramePyramid(const Frame &frame, const CV::FramePyramid &framePyramid, const CV::FramePyramid::DownsamplingMode downsamplingMode, const unsigned int layers, const bool allowCompatibleFrameType=false)
Validates the visual content of a frame pyramid.
static bool testReplace11(const double testDuration, Worker &worker)
Tests the replacement of a frame pyramid using a 1-1 downsampling.
static bool validateConstructFromFrame(const CV::FramePyramid &framePyramid, const CV::FramePyramid::DownsamplingFunction &downsamplingFunction, const Frame &frame, const unsigned int numberLayers, const UnorderedIndexSet32 &readOnlyLayers, const UnorderedIndexSet32 &ownerLayers, const UnorderedIndexSet32 &outsideMemoryBlockLayers)
Validates if the frame pyramid was created correctly with the specified settings.
static bool testReplaceWithFrameType(const double testDuration)
Tests the replacement of a frame pyramid using a frame type.
static bool testIsOwner(const double testDuration)
Tests the isOwner() function.
static bool testIdealLayers(const double testDuration)
Tests the ideal layers functions.
static unsigned int determineMaxLayerCount(unsigned int width, unsigned int height)
Returns the maximum layer count for the given frame width and height.
static bool testConstructFromFrameMultiLayer(const double testDuration, Worker &worker)
Tests the construction of a new frame pyramid from an existing frame.
static bool testReduceLayers(const double testDuration)
Tests the reduceLayers() function.
static bool testCreateFramePyramidExtreme()
Tests the creation of a frame pyramid with extreme parameters.
static bool testReplaceWithFrame(const double testDuration, Worker &worker)
Tests the replacement of a frame pyramid using a frame type.
static bool test(const double testDuration, Worker &worker)
Tests the functionality of frame pyramids.
static bool testCreationFramePyramidWithReplace(const unsigned int width, const unsigned int height, const unsigned int channels, const unsigned int layers, const double testDuration, Worker &worker)
Tests the creation of a frame pyramid using the replace() function for a specific frame with specific...
static bool validateFramePyramid(const Frame &frame, const CV::FramePyramid &framePyramid, const CV::FramePyramid::DownsamplingFunction &downsamplingFunction, const unsigned int layers, const bool allowCompatibleFrameType=false)
Validates the visual content of a frame pyramid.
This class implements a worker able to distribute function calls over different threads.
Definition: Worker.h:33
std::vector< Index32 > Indices32
Definition of a vector holding 32 bit index values.
Definition: Base.h:96
std::unordered_set< Index32 > UnorderedIndexSet32
Definition of an unordered_set holding 32 bit indices.
Definition: Base.h:126
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15