mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
2b703de669
Former-commit-id: edfc3e7ccf7b7d727e73a8563acb521045026d5b
52 lines
1.3 KiB
C++
52 lines
1.3 KiB
C++
#pragma once
|
|
|
|
// STL includes
|
|
#include <memory>
|
|
|
|
// Jsoncpp includes
|
|
#include <json/json.h>
|
|
|
|
#include <hyperion/LedString.h>
|
|
|
|
// Forward class declaration
|
|
class ImageProcessor;
|
|
|
|
///
|
|
/// The ImageProcessor is a singleton factor for creating ImageProcessors that translate images to
|
|
/// led color values.
|
|
///
|
|
class ImageProcessorFactory
|
|
{
|
|
public:
|
|
///
|
|
/// Returns the 'singleton' instance (creates the singleton if it does not exist)
|
|
///
|
|
/// @return The singleton instance of the ImageProcessorFactory
|
|
///
|
|
static ImageProcessorFactory& getInstance();
|
|
|
|
public:
|
|
///
|
|
/// Initialises this factory with the given led-configuration
|
|
///
|
|
/// @param[in] ledString The led configuration
|
|
/// @param[in] enableBlackBorderDetector Flag indicating if the blacborder detector should be enabled
|
|
/// @param[in] blackborderThreshold The threshold which the blackborder detector should use
|
|
///
|
|
void init(const LedString& ledString, const Json::Value &blackborderConfig);
|
|
|
|
///
|
|
/// Creates a new ImageProcessor. The onwership of the processor is transferred to the caller.
|
|
///
|
|
/// @return The newly created ImageProcessor
|
|
///
|
|
ImageProcessor* newImageProcessor() const;
|
|
|
|
private:
|
|
/// The Led-string specification
|
|
LedString _ledString;
|
|
|
|
// Reference to the blackborder json configuration values
|
|
Json::Value _blackborderConfig;
|
|
};
|