Darwin  1.10(beta)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
drwnPartsInference Class Reference

Helper class for running inference in a (constellation) parts-based model. Supports linear and quadratic distance transforms for deformation costs. Computes argmax_{x,c,z} m_i(x_i, z_i) + d_i(x_i, c) + p(c) where m_i(x, 0) = matchingCost_i(x) + priorCost_i(x) m_i(x, 1) = occlusionCost + priorCost_i(x) d_i(x, c) = [dx, dy]^T fabs(x - o - c) + [dx2, dy2]^T (x - o - c).^2. More...

Public Member Functions

 drwnPartsInference (int numParts, int width, int height)
 
void setCentroidPrior (const cv::Mat &centroidPrior=cv::Mat())
 
void setPartCosts (int partId, const cv::Mat &matchingCost, const cv::Point &offset, const drwnDeformationCost &pairwiseCost, const cv::Mat &occlusionCost=cv::Mat())
 
drwnPartsAssignment inference () const
 
drwnPartsAssignment inference (const cv::Point &centroid) const
 
cv::Mat energyLandscape () const
 

Static Public Attributes

static int MESSAGE_PASSING_SCALE = 1
 
static double DEFAULT_LAMBDA = 5.0e-3
 
static double DEFAULT_OCCLUSION_COST = 0.0
 

Protected Member Functions

cv::Mat computeLocationMessage (const cv::Mat &belief, const drwnDeformationCost &dcost, const cv::Mat &msgIn=cv::Mat()) const
 

Protected Attributes

double _lambda
 
double _occlusionCost
 
int _width
 
int _height
 
int _nParts
 
cv::Mat _centroidPrior
 
vector< pair< cv::Mat, cv::Mat > > _partCosts
 
vector< cv::Point > _partOffsets
 
vector< drwnDeformationCost_pairwiseCosts
 

Detailed Description

Helper class for running inference in a (constellation) parts-based model. Supports linear and quadratic distance transforms for deformation costs. Computes argmax_{x,c,z} m_i(x_i, z_i) + d_i(x_i, c) + p(c) where m_i(x, 0) = matchingCost_i(x) + priorCost_i(x) m_i(x, 1) = occlusionCost + priorCost_i(x) d_i(x, c) = [dx, dy]^T fabs(x - o - c) + [dx2, dy2]^T (x - o - c).^2.


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