8 #ifndef META_OCEAN_TEST_TESTCV_TESTSYNTHESIS_TEST_MAPPING_I_1_H
9 #define META_OCEAN_TEST_TESTCV_TESTSYNTHESIS_TEST_MAPPING_I_1_H
26 namespace TestSynthesis
45 static bool test(
const unsigned int width,
const unsigned int height,
const double testDuration,
Worker& worker);
55 static bool testApplyMapping(
const unsigned int width,
const unsigned int height,
const double testDuration,
Worker& worker);
66 static bool testApplyMapping(
const unsigned int width,
const unsigned int height,
const unsigned int channels,
const double testDuration,
Worker& worker);
85 template <
unsigned int tChannels>
95 static bool testAppearanceCost5x5(
const unsigned int width,
const unsigned int height,
const double testDuration);
105 template <
unsigned int tChannels>
125 template <
unsigned int tChannels>
145 template <
unsigned int tChannels>
This class implements the pixel mapping between source and target frames.
Definition: MappingI1.h:49
This class implements Ocean's image class.
Definition: Frame.h:1792
This class implements a synthesis pixel mapping test.
Definition: TestMappingI1.h:34
static bool test(const unsigned int width, const unsigned int height, const double testDuration, Worker &worker)
Tests all mapping functions.
static bool testSpatialCost4Neighborhood(const unsigned int width, const unsigned int height, const double testDuration)
Tests the spatial cost with 4-neighborhood.
static uint64_t determineAppearanceCost(const Frame &frame, const Frame &mask, const CV::PixelPosition &source, const CV::PixelPosition &target, const unsigned int patchSize, const unsigned int borderFactor, const unsigned int normalizationFactor)
Determines the appearance cost.
static bool testSpatialCost8Neighborhood(const unsigned int width, const unsigned int height, const double testDuration)
Tests the spatial cost with 8-neighborhood.
static uint64_t determineSpatialCost4Neighborhood(const CV::Synthesis::MappingI1 &mapping, const Frame &mask, const CV::PixelPosition &source, const CV::PixelPosition &target, const uint32_t maxCost, const unsigned int normalizationFactor)
Determines the spatial cost in a 4-neighborhood.
static bool testAppearanceCost5x5(const unsigned int width, const unsigned int height, const double testDuration)
Tests the 5x5 appearance cost function.
static bool testSpatialCost4Neighborhood(const unsigned int width, const unsigned int height, const double testDuration)
Tests the spatial cost with 4-neighborhood.
static bool testApplyMapping(const unsigned int width, const unsigned int height, const unsigned int channels, const double testDuration, Worker &worker)
Tests the applyMapping function for a specific pixel format.
static bool testSumSquaredDifference5x5MaskNoCenter(const unsigned int width, const unsigned int height, const double testDuration)
Tests the sum of squared differences calculation using a mask and skipping the center pixel.
static bool testSumSquaredDifference5x5MaskNoCenter(const unsigned int width, const unsigned int height, const double testDuration)
Tests the sum of squared differences calculation using a mask and skipping the center pixel.
static bool validateSumSquaredDifference5x5MaskNoCenter(const Frame &frame0, const Frame &frame1, const Frame &mask0, const CV::PixelPositions &topLeftPositions0, const CV::PixelPositions &topLeftPositions1, const Indices32 &results, const unsigned int borderFactor)
Validates the 5x5 sum of squared differences skipping the center pixel.
static bool testAppearanceCost5x5(const unsigned int width, const unsigned int height, const double testDuration)
Tests the 5x5 appearance cost function.
static uint64_t determineSpatialCost8Neighborhood(const CV::Synthesis::MappingI1 &mapping, const Frame &mask, const CV::PixelPosition &source, const CV::PixelPosition &target, const uint32_t maxCost, const unsigned int normalizationFactor)
Determines the spatial cost in a 8-neighborhood.
static bool testSpatialCost8Neighborhood(const unsigned int width, const unsigned int height, const double testDuration)
Tests the spatial cost with 8-neighborhood.
static bool testApplyMapping(const unsigned int width, const unsigned int height, const double testDuration, Worker &worker)
Tests the applyMapping function.
static bool validateMapping(const Frame &frame, const Frame &mask, const CV::Synthesis::MappingI1 &mapping, const CV::PixelBoundingBox &boundingBox)
Validates the mapping results for a frame and corresponding mapping.
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::vector< PixelPosition > PixelPositions
Definition of a vector holding pixel positions (with positive coordinate values).
Definition: PixelPosition.h:48
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15