The ColourCurve provides an 8-bit lookup table to manipulate brightness, contrast and gamma correction per channel. More...
#include <foleys_ColourLookuptables.h>
Public Member Functions | |
| ColourCurve ()=default | |
| void | calculateColourMap (double newBrightness, double newContrast, double newGamma) |
| calculateColourMap will set up the lookup table. | |
| bool | isLinear () const |
| The method isLinear returns true, if the curve is the identity function. | |
| void | applyLUT (juce::Image &image, int component) |
| Applies a ColourCurve to a channel of an image. | |
| const uint8_t * | getLookupTable () const |
| This methods gives you reading access to the lookup table. | |
Static Public Member Functions | |
| static void | applyLUTs (juce::Image &image, const ColourCurve &red, const ColourCurve &green, const ColourCurve &blue) |
| Applies a set of ColourCurves to an image. | |
| static void | applyLUTs (juce::Image &image, const ColourCurve &red, const ColourCurve &green, const ColourCurve &blue, const ColourCurve &alpha) |
| Applies a set of ColourCurves to an image. | |
The ColourCurve provides an 8-bit lookup table to manipulate brightness, contrast and gamma correction per channel.
|
default |
| void calculateColourMap | ( | double | newBrightness, |
| double | newContrast, | ||
| double | newGamma | ||
| ) |
calculateColourMap will set up the lookup table.
| newBrightness | will add or subtract a normalised value (-1..1) |
| newContrast | multiplies the slope of the curve (-1..1) |
| newGamma | the gamma value for the curve (0.1..4.0) |
References ColourCurve::isLinear().
Referenced by ColourCurveVideoProcessor::processFrame().
| bool isLinear | ( | ) | const |
The method isLinear returns true, if the curve is the identity function.
Referenced by ColourCurve::calculateColourMap(), and ColourCurveVideoProcessor::processFrame().
| void applyLUT | ( | juce::Image & | image, |
| int | component | ||
| ) |
Applies a ColourCurve to a channel of an image.
| image | the image to apply the ColourCurve |
| component | is the index of the channel in the packed pixel |
Referenced by ColourCurveVideoProcessor::processFrame().
|
static |
Applies a set of ColourCurves to an image.
This method assumes BGR or BGRA format.
| image | the image to apply the ColourCurve |
| red | is the ColourCurve for the red channel |
| green | is the ColourCurve for the green channel |
| blue | is the ColourCurve for the blue channel |
References ColourCurve::getLookupTable().
Referenced by ColourCurveVideoProcessor::processFrame().
|
static |
Applies a set of ColourCurves to an image.
This method assumes BGRA format.
| image | the image to apply the ColourCurve |
| red | is the ColourCurve for the red channel |
| green | is the ColourCurve for the green channel |
| blue | is the ColourCurve for the blue channel |
| alpha | is the ColourCurve for the alpha channel |
References ColourCurve::getLookupTable().
| const uint8_t * getLookupTable | ( | ) | const |
This methods gives you reading access to the lookup table.
Referenced by ColourCurve::applyLUTs(), and ColourCurve::applyLUTs().