Color Adjustment 2.0 (#351)

* Rename test to test123

* Delete test123

* New color Ajustment

Trilinear interpolation between the 8 corners of the color cube (black, red, green, blue, cyan, magenta, yellow, white)

* Renaming

* overloading getadjustmentX()

* Renaming

* Additional renaming

* Added more RgbChannel

* Added more colors to channelAdjustment

* Added additional colors

* Added additional colors

* Added additional colors

* Added additional color adjustments

* Update MultiColorAdjustment.cpp

* Fixed black adjustment

* Color config in array form
This commit is contained in:
Robin Kobus
2016-12-29 17:02:37 +01:00
committed by redPanther
parent db5ce43202
commit 8d304d58d2
9 changed files with 263 additions and 185 deletions

View File

@@ -12,11 +12,21 @@ public:
/// Unique identifier for this color transform
std::string _id;
/// The RED-Channel (RGB) adjustment
/// The BLACK (RGB-Channel) adjustment
RgbChannelAdjustment _rgbBlackAdjustment;
/// The WHITE (RGB-Channel) adjustment
RgbChannelAdjustment _rgbWhiteAdjustment;
/// The RED (RGB-Channel) adjustment
RgbChannelAdjustment _rgbRedAdjustment;
/// The GREEN-Channel (RGB) transform
/// The GREEN (RGB-Channel) adjustment
RgbChannelAdjustment _rgbGreenAdjustment;
/// The BLUE-Channel (RGB) transform
/// The BLUE (RGB-Channel) adjustment
RgbChannelAdjustment _rgbBlueAdjustment;
/// The CYAN (RGB-Channel) adjustment
RgbChannelAdjustment _rgbCyanAdjustment;
/// The MAGENTA (RGB-Channel) adjustment
RgbChannelAdjustment _rgbMagentaAdjustment;
/// The YELLOW (RGB-Channel) adjustment
RgbChannelAdjustment _rgbYellowAdjustment;
};

View File

@@ -64,7 +64,7 @@ public:
///
enum RgbChannel
{
RED, GREEN, BLUE, INVALID
BLACK, WHITE, RED, GREEN, BLUE, CYAN, MAGENTA, YELLOW, INVALID
};
///
@@ -303,7 +303,7 @@ public:
static HslTransform * createHslTransform(const QJsonObject & hslConfig);
static RgbChannelTransform * createRgbChannelTransform(const QJsonObject& colorConfig);
static RgbChannelAdjustment * createRgbChannelCorrection(const QJsonObject& colorConfig);
static RgbChannelAdjustment * createRgbChannelAdjustment(const QJsonObject& colorConfig, const RgbChannel color);
static RgbChannelAdjustment * createRgbChannelAdjustment(const QJsonArray& colorConfig, const RgbChannel color);
static LinearColorSmoothing * createColorSmoothing(const QJsonObject & smoothingConfig, LedDevice* leddevice);
static MessageForwarder * createMessageForwarder(const QJsonObject & forwarderConfig);

View File

@@ -47,9 +47,9 @@ public:
/// Transform the given array value
/// @param input The input color bytes
/// @return The corrected byte value
uint8_t adjustmentR(uint8_t inputR) const;
uint8_t adjustmentG(uint8_t inputG) const;
uint8_t adjustmentB(uint8_t inputB) const;
uint8_t getAdjustmentR(uint8_t inputR) const;
uint8_t getAdjustmentG(uint8_t inputG) const;
uint8_t getAdjustmentB(uint8_t inputB) const;
private: