HuginBase::Nona::SpaceTransform Class Reference

#include <SpaceTransform.h>

List of all members.

Public Member Functions

 SpaceTransform ()
 ctor
 ~SpaceTransform ()
 dtor
void Init (const SrcPanoImage &img, const vigra::Diff2D &destSize, PanoramaOptions::ProjectionFormat destProj, double destHFOV)
 Init Transform Create the stack of matrices for direct transform.
void InitInv (const SrcPanoImage &img, const vigra::Diff2D &destSize, PanoramaOptions::ProjectionFormat destProj, double destHFOV)
 Init Inv Transform Create the stack of matrices for reverse transform.
void InitRadialCorrect (const vigra::Size2D &sz, const std::vector< double > &radDist, const hugin_utils::FDiff2D &centerShift)
 transformation for radial correction only
void InitRadialCorrect (const SrcPanoImage &src, int channel=1)
 Create a transform stack for distortion & TCA correction only.
void InitInvRadialCorrect (const SrcPanoImage &src, int channel=1)
 Create a transform stack for distortion & TCA correction only.
void createTransform (const SrcPanoImage &src, const PanoramaOptions &dest)
void createInvTransform (const SrcPanoImage &src, const PanoramaOptions &dest)
void createTransform (const PanoramaData &pano, unsigned int imgNr, const PanoramaOptions &dest, vigra::Diff2D srcSize=vigra::Diff2D(0, 0))
void createInvTransform (const PanoramaData &pano, unsigned int imgNr, const PanoramaOptions &dest, vigra::Diff2D srcSize=vigra::Diff2D(0, 0))
void createTransform (const vigra::Diff2D &srcSize, const VariableMap &srcVars, Lens::LensProjectionFormat srcProj, const vigra::Diff2D &destSize, PanoramaOptions::ProjectionFormat destProj, double destHFOV)
void createInvTransform (const vigra::Diff2D &srcSize, const VariableMap &srcVars, Lens::LensProjectionFormat srcProj, const vigra::Diff2D &destSize, PanoramaOptions::ProjectionFormat destProj, double destHFOV)
bool transform (hugin_utils::FDiff2D &dest, const hugin_utils::FDiff2D &src) const
 transform Get the new coordinates
bool transformImgCoord (double &x_dest, double &y_dest, double x_src, double y_src) const
 like transform, but return image coordinates, not cartesian coordinates
bool transformImgCoord (hugin_utils::FDiff2D &dest, const hugin_utils::FDiff2D &src) const
bool isIdentity ()
 returns true if this transform is an identity transform

Private Member Functions

void AddTransform (trfn function_name, double var0, double var1=0.0f, double var2=0.0f, double var3=0.0f, double var4=0.0f, double var5=0.0f, double var6=0.0f, double var7=0.0f)
 add a new transformation
void AddTransform (trfn function_name, Matrix3 m, double var0, double var1=0.0f, double var2=0.0f, double var3=0.0f)

Private Attributes

bool m_Initialized
 was the class initialized ?
double m_srcTX
 used to convert from screen to cartesian coordinates
double m_srcTY
double m_destTX
double m_destTY
std::vector< fDescriptionm_Stack
 vector of transformations


Detailed Description

Definition at line 84 of file SpaceTransform.h.


Constructor & Destructor Documentation

HuginBase::Nona::SpaceTransform::SpaceTransform (  ) 

ctor

Definition at line 40 of file SpaceTransform.cpp.

References m_Initialized.

HuginBase::Nona::SpaceTransform::~SpaceTransform (  ) 

dtor

Definition at line 46 of file SpaceTransform.cpp.


Member Function Documentation

void HuginBase::Nona::SpaceTransform::AddTransform ( trfn  function_name,
Matrix3  m,
double  var0,
double  var1 = 0.0f,
double  var2 = 0.0f,
double  var3 = 0.0f 
) [private]

Definition at line 65 of file SpaceTransform.cpp.

References HuginBase::Nona::_FuncParams::distance, HuginBase::Nona::_fDesc::func, m_Stack, HuginBase::Nona::_FuncParams::mt, HuginBase::Nona::_fDesc::param, HuginBase::Nona::_FuncParams::var1, HuginBase::Nona::_FuncParams::var2, and HuginBase::Nona::_FuncParams::var3.

void HuginBase::Nona::SpaceTransform::AddTransform ( trfn  function_name,
double  var0,
double  var1 = 0.0f,
double  var2 = 0.0f,
double  var3 = 0.0f,
double  var4 = 0.0f,
double  var5 = 0.0f,
double  var6 = 0.0f,
double  var7 = 0.0f 
) [private]

add a new transformation

Definition at line 50 of file SpaceTransform.cpp.

References HuginBase::Nona::_fDesc::func, m_Stack, HuginBase::Nona::_fDesc::param, HuginBase::Nona::_FuncParams::var0, HuginBase::Nona::_FuncParams::var1, HuginBase::Nona::_FuncParams::var2, HuginBase::Nona::_FuncParams::var3, HuginBase::Nona::_FuncParams::var4, HuginBase::Nona::_FuncParams::var5, HuginBase::Nona::_FuncParams::var6, and HuginBase::Nona::_FuncParams::var7.

Referenced by InitInvRadialCorrect(), and InitRadialCorrect().

void HuginBase::Nona::SpaceTransform::createInvTransform ( const vigra::Diff2D &  srcSize,
const VariableMap srcVars,
Lens::LensProjectionFormat  srcProj,
const vigra::Diff2D &  destSize,
PanoramaOptions::ProjectionFormat  destProj,
double  destHFOV 
)

void HuginBase::Nona::SpaceTransform::createInvTransform ( const PanoramaData pano,
unsigned int  imgNr,
const PanoramaOptions dest,
vigra::Diff2D  srcSize = vigra::Diff2D(0, 0) 
)

Definition at line 1644 of file SpaceTransform.cpp.

References HuginBase::PanoramaOptions::getHeight(), HuginBase::PanoramaOptions::getHFOV(), HuginBase::PanoramaData::getImage(), HuginBase::PanoramaOptions::getProjection(), HuginBase::PanoramaOptions::getWidth(), and InitInv().

void HuginBase::Nona::SpaceTransform::createInvTransform ( const SrcPanoImage src,
const PanoramaOptions dest 
)

Definition at line 1620 of file SpaceTransform.cpp.

References HuginBase::PanoramaOptions::getHeight(), HuginBase::PanoramaOptions::getHFOV(), HuginBase::PanoramaOptions::getProjection(), HuginBase::PanoramaOptions::getWidth(), and InitInv().

void HuginBase::Nona::SpaceTransform::createTransform ( const vigra::Diff2D &  srcSize,
const VariableMap srcVars,
Lens::LensProjectionFormat  srcProj,
const vigra::Diff2D &  destSize,
PanoramaOptions::ProjectionFormat  destProj,
double  destHFOV 
)

void HuginBase::Nona::SpaceTransform::createTransform ( const PanoramaData pano,
unsigned int  imgNr,
const PanoramaOptions dest,
vigra::Diff2D  srcSize = vigra::Diff2D(0, 0) 
)

Definition at line 1628 of file SpaceTransform.cpp.

References HuginBase::PanoramaOptions::getHeight(), HuginBase::PanoramaOptions::getHFOV(), HuginBase::PanoramaData::getImage(), HuginBase::PanoramaOptions::getProjection(), HuginBase::PanoramaOptions::getWidth(), and Init().

void HuginBase::Nona::SpaceTransform::createTransform ( const SrcPanoImage src,
const PanoramaOptions dest 
)

Definition at line 1611 of file SpaceTransform.cpp.

References HuginBase::PanoramaOptions::getHeight(), HuginBase::PanoramaOptions::getHFOV(), HuginBase::PanoramaOptions::getProjection(), HuginBase::PanoramaOptions::getWidth(), and Init().

void HuginBase::Nona::SpaceTransform::Init ( const SrcPanoImage img,
const vigra::Diff2D &  destSize,
PanoramaOptions::ProjectionFormat  destProj,
double  destHFOV 
)

Init Transform Create the stack of matrices for direct transform.

Referenced by createTransform().

void HuginBase::Nona::SpaceTransform::InitInv ( const SrcPanoImage img,
const vigra::Diff2D &  destSize,
PanoramaOptions::ProjectionFormat  destProj,
double  destHFOV 
)

Init Inv Transform Create the stack of matrices for reverse transform.

Referenced by createInvTransform().

void HuginBase::Nona::SpaceTransform::InitInvRadialCorrect ( const SrcPanoImage src,
int  channel = 1 
)

Create a transform stack for distortion & TCA correction only.

Definition at line 1081 of file SpaceTransform.cpp.

References AddTransform(), HuginBase::Nona::CalcCorrectionRadius_copy(), HuginBase::SrcPanoImage::getCorrectTCA(), HuginBase::Nona::horiz(), HuginBase::Nona::inv_radial(), m_destTX, m_destTY, m_srcTX, m_srcTY, m_Stack, and HuginBase::Nona::vert().

Referenced by HuginBase::Nona::estScaleFactorForFullFrame().

void HuginBase::Nona::SpaceTransform::InitRadialCorrect ( const SrcPanoImage src,
int  channel = 1 
)

Create a transform stack for distortion & TCA correction only.

Definition at line 1139 of file SpaceTransform.cpp.

References AddTransform(), HuginBase::Nona::CalcCorrectionRadius_copy(), DEBUG_DEBUG, HuginBase::SrcPanoImage::getCorrectTCA(), HuginBase::Nona::horiz(), m_destTX, m_destTY, m_srcTX, m_srcTY, m_Stack, HuginBase::Nona::radial(), and HuginBase::Nona::vert().

void HuginBase::Nona::SpaceTransform::InitRadialCorrect ( const vigra::Size2D &  sz,
const std::vector< double > &  radDist,
const hugin_utils::FDiff2D centerShift 
)

transformation for radial correction only

Referenced by correctImage().

bool HuginBase::Nona::SpaceTransform::isIdentity (  )  [inline]

returns true if this transform is an identity transform

Definition at line 177 of file SpaceTransform.h.

Referenced by correctImage().

bool HuginBase::Nona::SpaceTransform::transform ( hugin_utils::FDiff2D dest,
const hugin_utils::FDiff2D src 
) const

transform Get the new coordinates

Definition at line 1698 of file SpaceTransform.cpp.

References m_Stack, hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.

Referenced by transformImgCoord().

bool HuginBase::Nona::SpaceTransform::transformImgCoord ( hugin_utils::FDiff2D dest,
const hugin_utils::FDiff2D src 
) const [inline]

Definition at line 169 of file SpaceTransform.h.

References hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.

bool HuginBase::Nona::SpaceTransform::transformImgCoord ( double &  x_dest,
double &  y_dest,
double  x_src,
double  y_src 
) const

like transform, but return image coordinates, not cartesian coordinates

Definition at line 1715 of file SpaceTransform.cpp.

References m_destTX, m_destTY, m_srcTX, m_srcTY, transform(), hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.


Member Data Documentation

double HuginBase::Nona::SpaceTransform::m_destTX [private]

Definition at line 195 of file SpaceTransform.h.

Referenced by InitInvRadialCorrect(), InitRadialCorrect(), and transformImgCoord().

double HuginBase::Nona::SpaceTransform::m_destTY [private]

Definition at line 195 of file SpaceTransform.h.

Referenced by InitInvRadialCorrect(), InitRadialCorrect(), and transformImgCoord().

bool HuginBase::Nona::SpaceTransform::m_Initialized [private]

was the class initialized ?

Definition at line 191 of file SpaceTransform.h.

Referenced by SpaceTransform().

double HuginBase::Nona::SpaceTransform::m_srcTX [private]

used to convert from screen to cartesian coordinates

Definition at line 194 of file SpaceTransform.h.

Referenced by InitInvRadialCorrect(), InitRadialCorrect(), and transformImgCoord().

double HuginBase::Nona::SpaceTransform::m_srcTY [private]

Definition at line 194 of file SpaceTransform.h.

Referenced by InitInvRadialCorrect(), InitRadialCorrect(), and transformImgCoord().

std::vector<fDescription> HuginBase::Nona::SpaceTransform::m_Stack [private]

vector of transformations

Definition at line 198 of file SpaceTransform.h.

Referenced by AddTransform(), InitInvRadialCorrect(), InitRadialCorrect(), and transform().


The documentation for this class was generated from the following files:
Generated on 5 Dec 2014 for Hugintrunk by  doxygen 1.4.7