Hugin trunk 0.1
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
HuginBase::Photometric::InvResponseTransform< VTIn, VTOut > Class Template Reference

radiometric transformation, includes exposure, vignetting and white balance More...

#include <ResponseTransform.h>

Inheritance diagram for HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >:
Inheritance graph

Public Types

typedef vigra_ext::ValueTypeTraits< VTIn >::value_type VT1
 
typedef vigra::NumericTraits< VT1 >::RealPromote VTInCompReal
 
typedef vigra_ext::ValueTypeTraits< VTOut >::value_type dest_type
 
typedef std::vector< doubleLUT
 
typedef std::vector< dest_typeLUTD
 
- Public Types inherited from HuginBase::Photometric::ResponseTransform< VTIn >
typedef vigra_ext::ValueTypeTraits< VTIn >::value_type VT1
 
typedef std::vector< doubleLUT
 

Public Member Functions

 InvResponseTransform ()
 
 InvResponseTransform (const HuginBase::SrcPanoImage &src)
 
virtual ~InvResponseTransform ()
 
void setHDROutput (bool hdrMode, double destExposure)
 
void setOutput (double destExposure, const LUTD &destLut, double scale, double rangeCompression=0.0)
 output lut
 
void enforceMonotonicity ()
 
double dither (const double &v) const
 Dithering is used to fool the eye into seeing gradients that are finer than the precision of the pixel type.
 
vigra::NumericTraits< dest_type >::RealPromote apply (VT1 v, const hugin_utils::FDiff2D &pos, vigra::VigraTrueType) const
 function for gray values (ignores white balance :-)
 
vigra::NumericTraits< dest_type >::RealPromote apply (VT1 v, const hugin_utils::FDiff2D &pos) const
 
vigra::NumericTraits< vigra::RGBValue< VT1 > >::RealPromote apply (vigra::RGBValue< VT1 > v, const hugin_utils::FDiff2D &pos, vigra::VigraFalseType) const
 function for color values
 
vigra::NumericTraits< vigra::RGBValue< VT1 > >::RealPromote apply (vigra::RGBValue< VT1 > v, const hugin_utils::FDiff2D &pos) const
 
template<class T >
vigra::NumericTraits< T >::RealPromote operator() (T v, const hugin_utils::FDiff2D &pos) const
 deprecated
 
template<class T , class A >
hdrWeight (T v, A a) const
 
void emitGLSL (std::ostringstream &oss, std::vector< double > &invLut, std::vector< double > &destLut) const
 
- Public Member Functions inherited from HuginBase::Photometric::ResponseTransform< VTIn >
 ResponseTransform ()
 
 ResponseTransform (const HuginBase::SrcPanoImage &src)
 
virtual ~ResponseTransform ()
 
void setFlatfield (const vigra::FImage *flat)
 
double calcVigFactor (hugin_utils::FDiff2D d) const
 
void enforceMonotonicity ()
 
vigra::NumericTraits< VT1 >::RealPromote apply (VT1 v, const hugin_utils::FDiff2D &pos, vigra::VigraTrueType) const
 function for gray values (ignores white balance :-)
 
vigra::NumericTraits< VT1 >::RealPromote apply (VT1 v, const hugin_utils::FDiff2D &pos) const
 function for color values
 
vigra::NumericTraits< vigra::RGBValue< VT1 > >::RealPromote apply (vigra::RGBValue< VT1 > v, const hugin_utils::FDiff2D &pos, vigra::VigraFalseType) const
 function for color values
 
vigra::NumericTraits< vigra::RGBValue< VT1 > >::RealPromote apply (vigra::RGBValue< VT1 > v, const hugin_utils::FDiff2D &pos) const
 function for color values
 
template<class T >
vigra::NumericTraits< T >::RealPromote operator() (T v, const hugin_utils::FDiff2D &pos) const
 deprecated
 

Protected Attributes

LUT m_lutRInv
 
vigra_ext::LUTFunctor< VT1, LUTm_lutRInvFunc
 
LUTD m_destLut
 
vigra_ext::LUTFunctor< VTInCompReal, LUTDm_destLutFunc
 
double m_destExposure
 
bool m_hdrMode
 
double m_intScale
 
double m_rangeCompression
 

Private Types

typedef ResponseTransform< VTInBase
 

Private Member Functions

void init (const HuginBase::SrcPanoImage &src)
 
void invertLUT ()
 

Private Attributes

std::mt19937 Twister
 

Additional Inherited Members

- Public Attributes inherited from HuginBase::Photometric::ResponseTransform< VTIn >
LUT m_lutR
 
double m_radiusScale
 
vigra_ext::LUTFunctor< VT1, LUTm_lutRFunc
 
const vigra::FImage * m_flatfield
 
double m_srcExposure
 
std::vector< doublem_RadialVigCorrCoeff
 
hugin_utils::FDiff2D m_RadialVigCorrCenter
 
int m_VigCorrMode
 
double m_WhiteBalanceRed
 
double m_WhiteBalanceBlue
 
HuginBase::SrcPanoImage m_src
 

Detailed Description

template<class VTIn, class VTOut>
class HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >

radiometric transformation, includes exposure, vignetting and white balance

camera color values -> scene referred irradiance

Definition at line 137 of file ResponseTransform.h.

Member Typedef Documentation

◆ Base

Definition at line 140 of file ResponseTransform.h.

◆ dest_type

Definition at line 145 of file ResponseTransform.h.

◆ LUT

Definition at line 147 of file ResponseTransform.h.

◆ LUTD

Definition at line 148 of file ResponseTransform.h.

◆ VT1

Definition at line 143 of file ResponseTransform.h.

◆ VTInCompReal

template<class VTIn , class VTOut >
typedef vigra::NumericTraits<VT1>::RealPromote HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::VTInCompReal

Definition at line 144 of file ResponseTransform.h.

Constructor & Destructor Documentation

◆ InvResponseTransform() [1/2]

template<class VTIn , class VTOut >
HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::InvResponseTransform ( )

Definition at line 420 of file ResponseTransform.h.

◆ InvResponseTransform() [2/2]

◆ ~InvResponseTransform()

Definition at line 159 of file ResponseTransform.h.

Member Function Documentation

◆ apply() [1/4]

template<class VTIn , class VTOut >
vigra::NumericTraits< vigra::RGBValue< typenameInvResponseTransform< VTIn, VTOut >::VT1 > >::RealPromote HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::apply ( vigra::RGBValue< VT1 v,
const hugin_utils::FDiff2D pos 
) const

Definition at line 575 of file ResponseTransform.h.

References threshold().

◆ apply() [2/4]

template<class VTIn , class VTOut >
vigra::NumericTraits< vigra::RGBValue< typenameInvResponseTransform< VTIn, VTOut >::VT1 > >::RealPromote HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::apply ( vigra::RGBValue< VT1 v,
const hugin_utils::FDiff2D pos,
vigra::VigraFalseType   
) const

function for color values

Definition at line 532 of file ResponseTransform.h.

References threshold().

◆ apply() [3/4]

template<class VTIn , class VTOut >
vigra::NumericTraits< typenameInvResponseTransform< VTIn, VTOut >::dest_type >::RealPromote HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::apply ( VT1  v,
const hugin_utils::FDiff2D pos 
) const

Definition at line 567 of file ResponseTransform.h.

References threshold().

◆ apply() [4/4]

template<class VTIn , class VTOut >
vigra::NumericTraits< typenameInvResponseTransform< VTIn, VTOut >::dest_type >::RealPromote HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::apply ( VT1  v,
const hugin_utils::FDiff2D pos,
vigra::VigraTrueType   
) const

function for gray values (ignores white balance :-)

Definition at line 503 of file ResponseTransform.h.

References threshold().

Referenced by HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::operator()().

◆ dither()

Dithering is used to fool the eye into seeing gradients that are finer than the precision of the pixel type.

This prevents the occurence of cleanly-bordered regions in the output where the pixel values suddenly change from N to N+1. Such regions are especially objectionable in the green channel of 8-bit images.

Definition at line 482 of file ResponseTransform.h.

References threshold().

◆ emitGLSL()

template<class VTIn , class VTOut >
void HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::emitGLSL ( std::ostringstream &  oss,
std::vector< double > &  invLut,
std::vector< double > &  destLut 
) const

◆ enforceMonotonicity()

template<class VTIn , class VTOut >
void HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::enforceMonotonicity ( )
inline

◆ hdrWeight()

template<class VTIn , class VTOut >
template<class T , class A >
A HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::hdrWeight ( v,
a 
) const
inline

◆ init()

Definition at line 441 of file ResponseTransform.h.

References threshold().

◆ invertLUT()

template<class VTIn , class VTOut >
void HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::invertLUT ( )
inlineprivate

◆ operator()()

template<class VTIn , class VTOut >
template<class T >
vigra::NumericTraits< T >::RealPromote HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::operator() ( v,
const hugin_utils::FDiff2D pos 
) const
inline

◆ setHDROutput()

template<class VTIn , class VTOut >
void HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::setHDROutput ( bool  hdrMode,
double  destExposure 
)

Definition at line 454 of file ResponseTransform.h.

References threshold().

◆ setOutput()

template<class VTIn , class VTOut >
void HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::setOutput ( double  destExposure,
const LUTD destLut,
double  scale,
double  rangeCompression = 0.0 
)

output lut

Definition at line 464 of file ResponseTransform.h.

References threshold().

Member Data Documentation

◆ m_destExposure

template<class VTIn , class VTOut >
double HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_destExposure
protected

◆ m_destLut

Definition at line 246 of file ResponseTransform.h.

◆ m_destLutFunc

Definition at line 247 of file ResponseTransform.h.

◆ m_hdrMode

◆ m_intScale

◆ m_lutRInv

◆ m_lutRInvFunc

◆ m_rangeCompression

template<class VTIn , class VTOut >
double HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_rangeCompression
protected

Definition at line 251 of file ResponseTransform.h.

◆ Twister

template<class VTIn , class VTOut >
std::mt19937 HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::Twister
private

Definition at line 254 of file ResponseTransform.h.


The documentation for this class was generated from the following file: