refinery
RAW file processor
|
A gamma curve, mapping input scalars to output scalars. More...
#include <refinery/gamma.h>
Public Types | |
typedef std::vector< T > | CurveType |
Color value type. | |
Public Member Functions | |
GammaCurve (double pwr, double ts, T max) | |
Constructor. | |
template<typename HistogramType > | |
GammaCurve (const HistogramType &histogram) | |
Constructor. | |
GammaCurve (const GammaCurve &rhs) | |
Copy constructor. | |
const T & | at (const T &in) const |
Gamma-correct a color value. |
A gamma curve, mapping input scalars to output scalars.
The GammaCurve is pre-calculated into a lookup table during construction, after which any scalar can be converted using at().
T | Color value type, see Image::ValueType. |
typedef std::vector<T> refinery::GammaCurve< T >::CurveType |
refinery::GammaCurve< T >::GammaCurve | ( | double | pwr, |
double | ts, | ||
T | max | ||
) | [inline] |
refinery::GammaCurve< T >::GammaCurve | ( | const HistogramType & | histogram | ) | [inline] |
Constructor.
This uses the Histogram-supplied image data to decide on GammaCurve parameters so that when the GammaCurve is applied (through GammaFilter) to the original image, 1% of the output image will be white.
The supplied histogram
doesn't need to be around for the lifetime of this object.
[in] | histogram | Histogram to analyze to calculate curve. |
HistogramType | Type of histogram (usually inferred). |
refinery::GammaCurve< T >::GammaCurve | ( | const GammaCurve< T > & | rhs | ) | [inline] |
Copy constructor.
rhs | Other GammaCurve, to be deep-copied. |