Changed RgbImage to template based Image (with template for pixel type)

Former-commit-id: ef02f164eaf3c2f9dd552c1c17b525cf6eed499c
This commit is contained in:
T. van der Zwan
2013-11-11 09:00:37 +00:00
parent 90f1f282e2
commit dd16af0df5
58 changed files with 593 additions and 464 deletions

View File

@@ -1,6 +1,6 @@
// Utils includes
#include <utils/RgbImage.h>
#include <utils/Image.h>
#include <utils/jsonschema/JsonFactory.h>
// Hyperion includes
@@ -25,16 +25,16 @@ int main()
const LedString ledString = Hyperion::createLedString(config["leds"]);
const RgbColor testColor = {64, 123, 12};
const ColorRgb testColor = {64, 123, 12};
RgbImage image(64, 64, testColor);
Image<ColorRgb> image(64, 64, testColor);
ImageToLedsMap map(64, 64, 0, 0, ledString.leds());
std::vector<RgbColor> ledColors(ledString.leds().size());
std::vector<ColorRgb> ledColors(ledString.leds().size());
map.getMeanLedColor(image, ledColors);
std::cout << "[";
for (const RgbColor & color : ledColors)
for (const ColorRgb & color : ledColors)
{
std::cout << color;
}