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
[legend]
List of all members.

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 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)
 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
 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
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

Protected Attributes

vigra_ext::InvLUTFunctor<
VT1, LUT
m_lutRInvFunc
LUTD m_destLut
vigra_ext::LUTFunctor< VTInCompReal,
LUTD
m_destLutFunc
double m_destExposure
bool m_hdrMode
double m_intScale

Private Types

typedef ResponseTransform<
VTIn > 
Base

Private Member Functions

void init (const HuginBase::SrcPanoImage &src)

Private Attributes

RANDOMGENERATOR Twister

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 143 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 146 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 151 of file ResponseTransform.h.

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

Reimplemented from HuginBase::Photometric::ResponseTransform< VTIn >.

Definition at line 153 of file ResponseTransform.h.

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

Definition at line 154 of file ResponseTransform.h.

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

Reimplemented from HuginBase::Photometric::ResponseTransform< VTIn >.

Definition at line 149 of file ResponseTransform.h.

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

Definition at line 150 of file ResponseTransform.h.


Constructor & Destructor Documentation

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

Definition at line 410 of file ResponseTransform.h.

References HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_destExposure, HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_hdrMode, and HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_intScale.

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

Definition at line 418 of file ResponseTransform.h.

References HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_destExposure, HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_intScale, HuginBase::Photometric::ResponseTransform< VTIn >::m_lutR, and HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_lutRInvFunc.

template<class VTIn, class VTOut>
virtual HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::~InvResponseTransform (  )  [inline, virtual]

Definition at line 165 of file ResponseTransform.h.


Member Function Documentation

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

function for color values

Reimplemented from HuginBase::Photometric::ResponseTransform< VTIn >.

Definition at line 547 of file ResponseTransform.h.

References HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::apply().

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

Reimplemented from HuginBase::Photometric::ResponseTransform< VTIn >.

Definition at line 510 of file ResponseTransform.h.

References HuginBase::Photometric::ResponseTransform< VTIn >::calcVigFactor(), HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::dither(), HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_destExposure, HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_destLut, HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_destLutFunc, HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_intScale, HuginBase::Photometric::ResponseTransform< VTIn >::m_lutR, HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_lutRInvFunc, HuginBase::Photometric::ResponseTransform< VTIn >::m_srcExposure, HuginBase::Photometric::ResponseTransform< VTIn >::m_WhiteBalanceBlue, HuginBase::Photometric::ResponseTransform< VTIn >::m_WhiteBalanceRed, and celeste::max().

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

function for color values

Reimplemented from HuginBase::Photometric::ResponseTransform< VTIn >.

Definition at line 539 of file ResponseTransform.h.

References HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::apply().

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 :-)

Reimplemented from HuginBase::Photometric::ResponseTransform< VTIn >.

Definition at line 485 of file ResponseTransform.h.

References HuginBase::Photometric::ResponseTransform< VTIn >::calcVigFactor(), HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::dither(), HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_destExposure, HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_destLut, HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_destLutFunc, HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_intScale, HuginBase::Photometric::ResponseTransform< VTIn >::m_lutR, HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_lutRInvFunc, HuginBase::Photometric::ResponseTransform< VTIn >::m_srcExposure, and celeste::max().

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

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 464 of file ResponseTransform.h.

References RANDOMGENERATOR, and HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::Twister.

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

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

Definition at line 555 of file ResponseTransform.h.

References HuginBase::SrcPanoImage::getRadialVigCorrCenter(), HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_destExposure, HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_destLut, HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_hdrMode, HuginBase::Photometric::ResponseTransform< VTIn >::m_lutR, HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_lutRInvFunc, HuginBase::Photometric::ResponseTransform< VTIn >::m_radiusScale, HuginBase::Photometric::ResponseTransform< VTIn >::m_src, HuginBase::Photometric::ResponseTransform< VTIn >::m_srcExposure, celeste::max(), HuginBase::BaseSrcPanoImage::VIGCORR_FLATFIELD, HuginBase::BaseSrcPanoImage::VIGCORR_RADIAL, and hugin_utils::TDiff2D< T >::y.

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

Reimplemented from HuginBase::Photometric::ResponseTransform< VTIn >.

Definition at line 179 of file ResponseTransform.h.

References vigra_ext::enforceMonotonicity(), HuginBase::Photometric::ResponseTransform< VTIn >::m_lutR, and HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_lutRInvFunc.

Referenced by correctImage(), and HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::remapImage().

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

Definition at line 223 of file ResponseTransform.h.

References vigra_ext::getMaxComponent(), HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_hdrMode, and celeste::max().

template<class VTIn, class VTOut>
void HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::init ( const HuginBase::SrcPanoImage src  )  [private]

Definition at line 430 of file ResponseTransform.h.

References HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_destExposure, HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_intScale, HuginBase::Photometric::ResponseTransform< VTIn >::m_lutR, and HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_lutRInvFunc.

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]

deprecated

Reimplemented from HuginBase::Photometric::ResponseTransform< VTIn >.

Definition at line 216 of file ResponseTransform.h.

References HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::apply().

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

Definition at line 442 of file ResponseTransform.h.

References HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_destExposure, HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_destLut, HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_hdrMode, and HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_intScale.

Referenced by HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::remapImage().

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

output lut

Definition at line 451 of file ResponseTransform.h.

References HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_destExposure, HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_destLut, HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_destLutFunc, HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_hdrMode, and HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_intScale.

Referenced by TextureManager::TextureInfo::DefineLevels(), and HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::remapImage().


Member Data Documentation

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

Definition at line 239 of file ResponseTransform.h.

Referenced by HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::apply(), HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::emitGLSL(), HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::init(), HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::InvResponseTransform(), HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::setHDROutput(), and HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::setOutput().

template<class VTIn, class VTOut>
LUTD HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_destLut [protected]

Definition at line 237 of file ResponseTransform.h.

Referenced by HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::apply(), HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::emitGLSL(), HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::setHDROutput(), and HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::setOutput().

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

Definition at line 238 of file ResponseTransform.h.

Referenced by HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::apply(), and HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::setOutput().

template<class VTIn, class VTOut>
bool HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_hdrMode [protected]

Definition at line 240 of file ResponseTransform.h.

Referenced by HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::emitGLSL(), HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::hdrWeight(), HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::InvResponseTransform(), HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::setHDROutput(), and HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::setOutput().

template<class VTIn, class VTOut>
double HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_intScale [protected]

Definition at line 241 of file ResponseTransform.h.

Referenced by HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::apply(), HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::init(), HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::InvResponseTransform(), HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::setHDROutput(), and HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::setOutput().

template<class VTIn, class VTOut>
vigra_ext::InvLUTFunctor<VT1, LUT> HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::m_lutRInvFunc [protected]

Definition at line 236 of file ResponseTransform.h.

Referenced by HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::apply(), HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::emitGLSL(), HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::enforceMonotonicity(), HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::init(), and HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::InvResponseTransform().

template<class VTIn, class VTOut>
RANDOMGENERATOR HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::Twister [private]

Definition at line 244 of file ResponseTransform.h.

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


The documentation for this class was generated from the following file:
Generated on 1 Nov 2014 for Hugintrunk by  doxygen 1.4.7