Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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< double > LUT
 
typedef std::vector< dest_typeLUTD
 
- Public Types inherited from HuginBase::Photometric::ResponseTransform< VTIn >
typedef
vigra_ext::ValueTypeTraits
< VTIn >::value_type 
VT1
 
typedef std::vector< double > LUT
 

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 More...
 
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. More...
 
vigra::NumericTraits
< dest_type >::RealPromote 
apply (VT1 v, const hugin_utils::FDiff2D &pos, vigra::VigraTrueType) const
 function for gray values (ignores white balance :-) More...
 
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 More...
 
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 More...
 
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 :-) More...
 
vigra::NumericTraits< VT1 >
::RealPromote 
apply (VT1 v, const hugin_utils::FDiff2D &pos) const
 function for color values More...
 
vigra::NumericTraits
< vigra::RGBValue< VT1 >
>::RealPromote 
apply (vigra::RGBValue< VT1 > v, const hugin_utils::FDiff2D &pos, vigra::VigraFalseType) const
 function for color values More...
 
vigra::NumericTraits
< vigra::RGBValue< VT1 >
>::RealPromote 
apply (vigra::RGBValue< VT1 > v, const hugin_utils::FDiff2D &pos) const
 function for color values More...
 
template<class T >
vigra::NumericTraits< T >
::RealPromote 
operator() (T v, const hugin_utils::FDiff2D &pos) const
 deprecated More...
 

Protected Attributes

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

Private Types

typedef ResponseTransform< VTIn > Base
 

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< double > m_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

template<class VTIn, class VTOut>
typedef ResponseTransform<VTIn> HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::Base
private

Definition at line 140 of file ResponseTransform.h.

template<class VTIn, class VTOut>
typedef vigra_ext::ValueTypeTraits<VTOut>::value_type HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::dest_type

Definition at line 145 of file ResponseTransform.h.

template<class VTIn, class VTOut>
typedef std::vector<double> HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::LUT

Definition at line 147 of file ResponseTransform.h.

template<class VTIn, class VTOut>
typedef std::vector<dest_type> HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::LUTD

Definition at line 148 of file ResponseTransform.h.

template<class VTIn, class VTOut>
typedef vigra_ext::ValueTypeTraits<VTIn>::value_type HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::VT1

Definition at line 143 of file ResponseTransform.h.

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

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

Definition at line 420 of file ResponseTransform.h.

template<class VTIn , class VTOut >
HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::InvResponseTransform ( const HuginBase::SrcPanoImage src)
template<class VTIn, class VTOut>
virtual HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::~InvResponseTransform ( )
inlinevirtual

Definition at line 159 of file ResponseTransform.h.

Member Function Documentation

template<class VTIn , class VTOut >
vigra::NumericTraits< typename InvResponseTransform< 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 celeste::max().

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

template<class VTIn , class VTOut >
vigra::NumericTraits< typename InvResponseTransform< 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.

template<class VTIn , class VTOut >
vigra::NumericTraits< vigra::RGBValue< typename InvResponseTransform< 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 celeste::max().

template<class VTIn , class VTOut >
vigra::NumericTraits< vigra::RGBValue< typename InvResponseTransform< 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.

template<class VTIn , class VTOut >
double HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::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.

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.

template<class VTIn , class VTOut >
void HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::emitGLSL ( std::ostringstream &  oss,
std::vector< double > &  invLut,
std::vector< double > &  destLut 
) const
template<class VTIn, class VTOut>
void HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::enforceMonotonicity ( )
inline
template<class VTIn, class VTOut>
template<class T , class A >
A HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::hdrWeight ( v,
a 
) const
inline
template<class VTIn , class VTOut >
void HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::init ( const HuginBase::SrcPanoImage src)
private

Definition at line 441 of file ResponseTransform.h.

template<class VTIn, class VTOut>
void HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::invertLUT ( )
inlineprivate
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
template<class VTIn , class VTOut >
void HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::setHDROutput ( bool  hdrMode,
double  destExposure 
)
template<class VTIn , class VTOut >
void HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::setOutput ( double  destExposure,
const LUTD destLut,
double  scale,
double  rangeCompression = 0.0 
)

Member Data Documentation

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

Definition at line 246 of file ResponseTransform.h.

template<class VTIn, class VTOut>
vigra_ext::LUTFunctor<VTInCompReal, LUTD> HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_destLutFunc
protected

Definition at line 247 of file ResponseTransform.h.

template<class VTIn, class VTOut>
bool HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_hdrMode
protected
template<class VTIn, class VTOut>
double HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_intScale
protected
template<class VTIn, class VTOut>
LUT HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_lutRInv
protected
template<class VTIn, class VTOut>
vigra_ext::LUTFunctor<VT1, LUT> HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_lutRInvFunc
protected
template<class VTIn, class VTOut>
double HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_rangeCompression
protected

Definition at line 251 of file ResponseTransform.h.

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: