ImageToLedMap - Remove maptype and update test
This commit is contained in:
parent
961703bfc2
commit
2d0141f808
|
@ -35,7 +35,6 @@ namespace hyperion
|
|||
/// from indexing.
|
||||
///
|
||||
/// @param[in] log Logger
|
||||
/// @param[in] mappingType Type of the mapping algorithm
|
||||
/// @param[in] width The width of the indexed image
|
||||
/// @param[in] height The width of the indexed image
|
||||
/// @param[in] horizontalBorder The size of the horizontal border (0=no border)
|
||||
|
@ -46,7 +45,6 @@ namespace hyperion
|
|||
///
|
||||
ImageToLedsMap(
|
||||
Logger* log,
|
||||
int mappingType,
|
||||
int width,
|
||||
int height,
|
||||
int horizontalBorder,
|
||||
|
@ -285,8 +283,6 @@ namespace hyperion
|
|||
|
||||
Logger* _log;
|
||||
|
||||
int _mappingType;
|
||||
|
||||
/// The width of the indexed image
|
||||
const int _width;
|
||||
/// The height of the indexed image
|
||||
|
|
|
@ -22,7 +22,6 @@ void ImageProcessor::registerProcessingUnit(
|
|||
{
|
||||
_imageToLedColors = QSharedPointer<ImageToLedsMap>(new ImageToLedsMap(
|
||||
_log,
|
||||
_mappingType,
|
||||
width,
|
||||
height,
|
||||
horizontalBorder,
|
||||
|
|
|
@ -4,7 +4,6 @@ using namespace hyperion;
|
|||
|
||||
ImageToLedsMap::ImageToLedsMap(
|
||||
Logger* log,
|
||||
int mappingType,
|
||||
int width,
|
||||
int height,
|
||||
int horizontalBorder,
|
||||
|
@ -13,7 +12,6 @@ ImageToLedsMap::ImageToLedsMap(
|
|||
int reducedPixelSetFactor,
|
||||
int accuracyLevel)
|
||||
: _log(log)
|
||||
, _mappingType(mappingType)
|
||||
, _width(width)
|
||||
, _height(height)
|
||||
, _horizontalBorder(horizontalBorder)
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// Utils includes
|
||||
#include <utils/Image.h>
|
||||
#include <utils/jsonschema/QJsonFactory.h>
|
||||
#include <utils/Logger.h>
|
||||
|
||||
// Hyperion includes
|
||||
#include <utils/hyperion.h>
|
||||
|
@ -9,6 +10,9 @@
|
|||
|
||||
int main()
|
||||
{
|
||||
Logger* log = Logger::getInstance("TestImageLedsMap");
|
||||
Logger::setLogLevel(Logger::DEBUG);
|
||||
|
||||
const QString schemaFile = ":/hyperion-schema";
|
||||
const QString configFile = ":/hyperion_default.config";
|
||||
|
||||
|
@ -25,7 +29,7 @@ int main()
|
|||
const ColorRgb testColor = {64, 123, 12};
|
||||
|
||||
Image<ColorRgb> image(64, 64, testColor);
|
||||
hyperion::ImageToLedsMap map(64, 64, 0, 0, ledString.leds());
|
||||
hyperion::ImageToLedsMap map(log, 64, 64, 0, 0, ledString.leds());
|
||||
|
||||
std::vector<ColorRgb> ledColors(ledString.leds().size());
|
||||
map.getMeanLedColor(image, ledColors);
|
||||
|
|
Loading…
Reference in New Issue