Structural deformable models
Classes | Functions
ExpMap.h File Reference
#include <list>
#include <map>
#include "Model.h"
#include "VVector.h"
#include "DMatrix.h"
#include "common.h"
Include dependency graph for ExpMap.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Winner
 
class  EMDistribution
 
class  EMDRect
 
class  EMDGauss
 
class  EMDXformer
 
class  ExpectationMap
 

Functions

PropVechgPropTF (const DMatrixf &tfmat, PropVec &prop)
 

Function Documentation

PropVec& hgPropTF ( const DMatrixf tfmat,
PropVec prop 
)
inline

Definition at line 182 of file ExpMap.h.

References VVector< T, D >::begin(), DMatrix< T >::empty(), DMatrix< T >::mulLeft(), DMatrix< T >::setRange(), VVector< T, D >::size(), DMatrix< T >::sizeX(), and DMatrix< T >::sizeY().

Referenced by EMDXformer::getPropVec(), and EMDXformer::ratePropVec().

183 {
184  if(!tfmat.empty() && tfmat.sizeX() == tfmat.sizeY()) {
185  DMatrixf propDM(1,PropVec::size(), prop.begin());
186  if(tfmat.sizeX() == propDM.sizeY()) { // linear
187  propDM = propDM.mulLeft(tfmat);
188  prop = &*propDM.getData().begin();
189  } else if(tfmat.sizeX() == propDM.sizeY()+1) {//affine (homogeneous)
190  DMatrixf propDMH(1,propDM.sizeY()+1, 1.f);
191  propDMH.setRange(0,0,propDM);
192  propDMH = propDMH.mulLeft(tfmat);
193  prop = &*propDMH.getData().begin();
194  }
195  }
196  return prop;
197 }
bool empty() const
Definition: DMatrix.h:50
dword sizeX() const
Definition: DMatrix.h:42
TPtr begin()
Definition: VVector.h:37
MT mulLeft(const MT &rhs) const
Definition: DMatrix.h:159
MT & setRange(dword ox, dword oy, const MT &mat)
Definition: DMatrix.h:185
dword sizeY() const
Definition: DMatrix.h:43
static unsigned int size()
Definition: VVector.h:41