8 #ifndef META_OCEAN_TEST_TESTCV_TESTDETECTOR_TEST_MESSENGER_CODE_DETECTOR_H
9 #define META_OCEAN_TEST_TESTCV_TESTDETECTOR_TEST_MESSENGER_CODE_DETECTOR_H
20 #ifdef OCEAN_USE_LOCAL_TEST_DATA_COLLECTION
21 #ifndef OCEAN_USE_TEST_DATA_COLLECTION
22 #define OCEAN_USE_TEST_DATA_COLLECTION
35 namespace TestDetector
85 static bool test(
const double testDuration,
Worker& worker);
110 #ifdef OCEAN_USE_TEST_DATA_COLLECTION
161 static void paintBullseye(
unsigned char* frame,
const unsigned int width,
const unsigned int height,
const Vector2& location,
const Scalar radius,
const unsigned char foregroundColor,
const unsigned char backgroundColor,
const unsigned int framePaddingElements);
172 #ifdef OCEAN_USE_TEST_DATA_COLLECTION
This class implements a detector for circular Messenger Codes.
Definition: MessengerCodeDetector.h:39
This class implements Ocean's image class.
Definition: Frame.h:1792
This class implements a generator for random numbers.
Definition: RandomGenerator.h:42
This class implements a test data collection based on local files.
Definition: TestMessengerCodeDetector.h:50
size_t size() override
Returns the number of data object objects this collection holds.
std::vector< std::string > filenames_
The filenames of all local images belonging to this test collection.
Definition: TestMessengerCodeDetector.h:74
FileDataCollection(std::vector< std::string > &&imageFilenames)
Creates a new test data collection object.
SharedTestData data(const size_t index) override
Returns the test data object associated with a specified index.
This class implements a test for the Messenger Code detector.
Definition: TestMessengerCodeDetector.h:43
static bool testDetect0Code(Worker &worker)
Tests real images in which no Messenger code is visible.
static bool test(const double testDuration, Worker &worker)
Invokes all test for the Messenger Code detector.
static bool testStressTest(const double testDuration, Worker &worker)
Applies a stress test.
static void paintBullseye(unsigned char *frame, const unsigned int width, const unsigned int height, const Vector2 &location, const Scalar radius, const unsigned char foregroundColor, const unsigned char backgroundColor, const unsigned int framePaddingElements)
Paints a bullseye into a given 8 bit grayscale frame.
static bool testExtractCodeCandidates(const double testDuration)
Tests the extraction of code candidates.
static bool testDetect1Bullseye(Worker &worker)
Tests real images in which exactly one bullseye is visible (in the center of the image).
static void paintNoise(Frame &yFrame, const Vector2 &location, const uint8_t foregroundColor)
Paints noise into a given 8 bit grayscale frame.
static bool testBullseyeDetectionArtificial(const unsigned int filterSize, const double testDuration)
Tests the detection of artificial rendered bullseyes.
static bool testDetect1Code(Worker &worker)
Tests real images in which exactly one Messenger code is visible.
static Vectors2 createCodeCorners(const Vector2 &codeCenter, const Scalar distance, RandomGenerator &randomGenerator)
Calculates four corners for one Messenger Code.
This class is the base class for all TestDataCollection objects.
Definition: TestDataCollection.h:35
std::vector< ScopedSubscription > ScopedSubscriptions
Definition of a vector holding scoped subscription objects.
Definition: TestDataManager.h:43
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:128
std::vector< Vector2 > Vectors2
Definition of a vector holding Vector2 objects.
Definition: Vector2.h:64
std::shared_ptr< TestData > SharedTestData
Definition of a shared pointer holding a TestData object.
Definition: TestData.h:29
TestDataManager::ScopedSubscriptions TestMessengerCodeDetector_registerTestDataCollections()
Registers the data collections for the MessengerCodeDetector test.
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15