PICCANTE  0.4
The hottest HDR imaging library!
Classes | Namespaces | Typedefs | Functions | Variables
saturation.hpp File Reference
#include "../base.hpp"
#include "../util/math.hpp"
#include "../util/array.hpp"

Go to the source code of this file.

Classes

class  pic::pic::Array< T >
 The Array class. More...
 

Namespaces

 pic
 
 pic::pic
 

Typedefs

typedef unsigned int pic::pic::uint
 
typedef unsigned char pic::pic::uchar
 
typedef uint * pic::pic::puint
 
typedef uchar * pic::pic::puchar
 
typedef Array< float > pic::pic::Arrayf
 Arrayf. More...
 
typedef Array< int > pic::pic::Arrayi
 Arrayi. More...
 
typedef Array< unsigned int > pic::pic::Arrayui
 Arrayui. More...
 

Functions

template<typename T >
PIC_INLINE bool pic::pic::isnan (T value)
 isnan is it a NaN? More...
 
template<typename T >
PIC_INLINE bool pic::pic::isinf (T value)
 isinf is it a Inf value? More...
 
PIC_INLINE bool pic::pic::equalf (float a, float b)
 equalf checks if two float values are the same or not. More...
 
PIC_INLINE float pic::pic::getRandombase ()
 Randombase returns a number in [0, 1] based on rand(). More...
 
PIC_INLINE float pic::pic::getRandom (unsigned int n)
 Random returns a number in [0, 2^32 - 1] to a float in [0, 1]. More...
 
PIC_INLINE int pic::pic::getRandomInt (int n, int a, int b)
 getRandomInt More...
 
PIC_INLINE float pic::pic::sFunction (float x)
 sFunction evaluates a cubic s-function. More...
 
PIC_INLINE float pic::pic::sCurve5 (float x)
 sCurve5 evaluates a quintic S-Shape: 6x^5-15x^4+10x^3 More...
 
PIC_INLINE float pic::pic::square (float x)
 Square applies square function to a value. More...
 
PIC_INLINE float pic::pic::sqrtf_s (float x)
 sqrtf_s More...
 
template<class T >
PIC_INLINEpic::pic::Clamp (T x, T a, T b)
 Clamp clamps a value, x, in the bound [a,b]. More...
 
PIC_INLINE long pic::pic::lround (double x)
 lround rounds double numbers properly. More...
 
PIC_INLINE float pic::pic::lround (float x)
 lround rounds float numbers properly. More...
 
PIC_INLINE float pic::pic::lerp (float t, float x0, float x1)
 lerp evaluates linear interpolation More...
 
PIC_INLINE float pic::pic::SmoothStep (float a, float b, float value)
 SmoothStep smoothes a value from a to b using a cube S-Shape. More...
 
float pic::pic::Deg2Rad (float deg)
 Deg2Rad converts angles expressed in degrees into angles expressed in radians. More...
 
PIC_INLINE float pic::pic::Rad2Deg (float rad)
 Rad2Deg converts angles expressed in radians into angles expressed in degrees. More...
 
PIC_INLINE int pic::pic::log2 (int n)
 log2 computes logarithm in base 2 for integers. More...
 
PIC_INLINE int pic::pic::pow2 (int n)
 pow2 computes 2^n. More...
 
PIC_INLINE float pic::pic::log10PlusOne (float x)
 logf10PlusOne computes log10 of a value plus 1. More...
 
PIC_INLINE float pic::pic::expfMinusOne (float x)
 expMinusOne More...
 
PIC_INLINE float pic::pic::log10fPlusEpsilon (float x)
 log10fPlusEpsilon More...
 
PIC_INLINE float pic::pic::powf10fMinusEpsilon (float x)
 powf10fMinusEpsilon More...
 
PIC_INLINE float pic::pic::log2f (float x)
 log2f logarithm in base 2 for floating point More...
 
PIC_INLINE double pic::pic::log2 (double x)
 log2 More...
 
PIC_INLINE float pic::pic::log2fPlusEpsilon (float x)
 log2fPlusEpsilon More...
 
PIC_INLINE float pic::pic::pow2f (float x)
 pow2f More...
 
PIC_INLINE int pic::pic::powint (int x, int b)
 powint computes power function for integer values. More...
 
PIC_INLINE void pic::pic::getRandomPermutation (std::mt19937 &m, unsigned int *perm, unsigned int nPerm, unsigned int n)
 getRandomPermutation computes a random permutation. More...
 
PIC_INLINE float pic::pic::normalDistribution (float x, float mu=0.0f, float sigma=1.0f)
 normalDistribution More...
 
float pic::pic::normalCDF (float x, float mu, float sigma)
 normalCDF More...
 
PIC_INLINE float pic::pic::betaFunction (float A, float B, float step=1e-4)
 betaFunction More...
 
PIC_INLINE float pic::pic::betaPDFwithBeta (float x, float A, float B, float betaAB)
 betaPDFwithBeta More...
 
PIC_INLINE float pic::pic::betaPDF (float x, float A, float B)
 betaPDF More...
 
PIC_INLINE float pic::pic::sigmoid (float x)
 sigmoid More...
 
PIC_INLINE float pic::pic::sigmoidInv (float x)
 sigmoidInv More...
 
PIC_INLINE float pic::pic::simple8bitWithGamma (float x)
 simple8bitWithGamma More...
 
PIC_INLINE float pic::computeSaturation (float *data, int channels=3)
 computeSaturation More...
 

Variables

const float pic::pic::C_LOG_NAT_2 = 0.69314718055994530941723212145818f
 
const float pic::pic::C_INV_LOG_NAT_2 = 1.4426950408889634073599246810019f
 
const double pic::pic::C_INV_LOG_NAT_2_D = 1.4426950408889634073599246810019
 
const float pic::pic::C_EPSILON = 1e-6f
 
const float pic::pic::C_SQRT_2 = 1.4142135623730950488016887242097f
 
const float pic::pic::C_PI_025 = 0.78539816339744830961566084581988f
 
const float pic::pic::C_PI_05 = 1.5707963267948966192313216916398f
 
const float pic::pic::C_PI = 3.1415926535897932384626433832795f
 
const float pic::pic::C_PI_2 = 6.283185307179586476925286766559f
 
const float pic::pic::C_INV_PI_2 = 0.159154943091895335768883763f
 
const float pic::pic::C_PI_4 = 12.566370614359172953850573533118f
 
const float pic::pic::C_INV_PI_4 = 0.07957747154594766788444188168626f
 
const float pic::pic::C_PI_2_2 = 19.739208802178717237668981999752f
 
const float pic::pic::C_INV_PI = 0.31830988618379067153776526745f
 
const float pic::pic::C_ONE_80_OVER_PI = 57.295779513082320876798154814105f
 
const float pic::pic::C_PI_OVER_ONE_80 = 0.017453292519943295769236907685f