8 #ifndef META_OCEAN_TEST_TESTCV_TESTSYNTHESIS_TEST_MAPPING_F_1_H
9 #define META_OCEAN_TEST_TESTCV_TESTSYNTHESIS_TEST_MAPPING_F_1_H
26 namespace TestSynthesis
64 static bool test(
const unsigned int width,
const unsigned int height,
const double testDuration,
Worker& worker);
74 static bool testApplyMapping(
const unsigned int width,
const unsigned int height,
const double testDuration,
Worker& worker);
85 static bool testApplyMapping(
const unsigned int width,
const unsigned int height,
const unsigned int channels,
const double testDuration,
Worker& worker);
104 template <
unsigned int tChannels>
124 template <
unsigned int tChannels>
144 template <
unsigned int tChannels>
164 template <
unsigned int tChannels>
185 template <
unsigned int tChannels,
unsigned int tPatchSize>
224 template <
bool tPatchSizeNormalization>
Cost function:
Definition: MappingF1.h:52
This class implements Ocean's image class.
Definition: Frame.h:1792
This class implements a synthesis sub-pixel mapping test.
Definition: TestMappingF1.h:34
static bool testTwoPixelPatchOneSubPixelPatch8BitPerChannel(const double testDuration)
Tests the sum square differences function between two pixel accurate image patches and one sub-pixel ...
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.
ImplementationType
Definition of individual types of implementation.
Definition: TestMappingF1.h:41
@ IT_NEON
The NEON-based implementation.
Definition: TestMappingF1.h:49
@ IT_SSE
The SSE-based implementation.
Definition: TestMappingF1.h:47
@ IT_TEMPLATE
The template-based implementation.
Definition: TestMappingF1.h:45
@ IT_NAIVE
The naive implementation.
Definition: TestMappingF1.h:43
static uint64_t determineAppearanceCost(const Frame &sourceFrame, const Frame &targetFrame, const Frame &mask, const Vector2 &source, const CV::PixelPosition &target, const unsigned int patchSize, const unsigned int borderFactor, const unsigned int normalizationFactor)
Determines the appearance cost.
static bool testAppearanceReferenceCost5x5(const unsigned int width, const unsigned int height, const double testDuration)
Tests the 5x5 appearance cost function with reference frame.
static bool testAppearanceReferenceCost5x5(const unsigned int width, const unsigned int height, const double testDuration)
Tests the 5x5 appearance cost function with reference frame.
static uint64_t determineAppearanceReferenceCost(const Frame &frame, const Frame &reference, const Frame &mask, const Vector2 &source, const CV::PixelPosition &target, const unsigned int patchSize, const unsigned int borderFactor, const unsigned int normalizationFactor)
Determines the appearance cost with a reference frame.
static bool testApplyMapping(const unsigned int width, const unsigned int height, const double testDuration, Worker &worker)
Tests the applyMapping function.
static bool testTwoPixelPatchOneSubPixelPatch8BitPerChannel(const unsigned int width, const unsigned int height, const double testDuration)
Tests the sum square differences function between two pixel accurate image patches and one sub-pixel ...
static bool testSumSquaredDifference5x5Mask(const unsigned int width, const unsigned int height, const double testDuration)
Tests the sum of squared differences calculation using a mask.
static Vector2 neighborPixel(const Vector2 &position, const CV::PixelDirection pixelDirection)
Returns the neighbor pixel with sub-pixel accuracy.
static bool testAppearanceCost5x5(const unsigned int width, const unsigned int height, const double testDuration)
Tests the 5x5 appearance cost function.
static bool validateMapping(const Frame &frame, const Frame &mask, const CV::Synthesis::MappingF1 &mapping, const CV::PixelBoundingBox &boundingBox)
Validates the mapping results for a frame and corresponding mapping.
static Scalar determineSpatialCost4Neighborhood(const CV::Synthesis::MappingF1 &mapping, const Frame &mask, const Vector2 &source, const CV::PixelPosition &target, const Scalar maxCost, const unsigned int normalizationFactor)
Determines the spatial cost in a 4-neighborhood.
static bool testSpatialCost4Neighborhood(const unsigned int width, const unsigned int height, const double testDuration)
Tests the spatial cost with 4-neighborhood.
static bool testSpatialCost4Neighborhood(const unsigned int width, const unsigned int height, const double testDuration)
Tests the spatial cost with 4-neighborhood.
static bool testAppearanceCost5x5(const unsigned int width, const unsigned int height, const double testDuration)
Tests the 5x5 appearance cost function.
static size_t validateSumSquaredDifference5x5Mask(const Frame &frame0, const Frame &frame1, const Frame &mask0, const CV::PixelPositions &positions0, const Vectors2 &positions1, const Indices32 &results, const unsigned int borderFactor)
Validates the 5x5 sum of squared differences.
static bool testSumSquaredDifference5x5Mask(const unsigned int width, const unsigned int height, const double testDuration)
Tests the sum of squared differences calculation using a mask.
static bool test(const unsigned int width, const unsigned int height, const double testDuration, Worker &worker)
Tests all mapping functions.
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
PixelDirection
Definition of individual directions with pixel accuracy.
Definition: CV.h:85
float Scalar
Definition of a scalar type.
Definition: Math.h:128
std::vector< Vector2 > Vectors2
Definition of a vector holding Vector2 objects.
Definition: Vector2.h:64
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15