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

A part is defined as a template over a number of channels (possibly one), an offset from the object centroid, and a deformation cost. The part is scored as w^T F(x) where w are the template weights, and F(x) is the feature vector at location x in feature space. Note for edge templates this can be in pixels, but generally will be in some multiple of pixels. It is up to the inference model to handle conversion from feature space to pixel space. More...

Inheritance diagram for drwnPart:
drwnStdObjIface drwnWriteable drwnCloneable drwnTypeable

Public Member Functions

 drwnPart (const cv::Size &extent, unsigned channels=1)
 
 drwnPart (const drwnPart &part)
 
int channels () const
 
int width () const
 
int height () const
 
const char * type () const
 returns object type as a string (e.g., Foo::type() { return "Foo"; })
 
drwnPartclone () const
 returns a copy of the class usually implemented as virtual Foo* clone() { return new Foo(*this); }
 
void clear ()
 
bool save (drwnXMLNode &xml) const
 write object to XML node (see also write)
 
bool load (drwnXMLNode &xml)
 read object from XML node (see also read)
 
void swap (drwnPart &part)
 
void setExtent (const cv::Size &extent)
 
void setExtent (int width, int height)
 
void setWeights (const cv::Mat &weights)
 
void setWeights (const vector< cv::Mat > &weights)
 
void setOffset (const cv::Point &offset)
 
void setDCosts (const drwnDeformationCost &costs)
 
const vector< cv::Mat > & getWeights () const
 
const cv::Point & getOffset () const
 
const drwnDeformationCostgetDCosts () const
 
cv::Mat unaryCosts (const cv::Mat &features) const
 
cv::Mat unaryCosts (const vector< cv::Mat > &features) const
 
double pairwiseCost (const cv::Point &x, const cv::Point &c) const
 
drwnPartoperator= (const drwnPart &part)
 
- Public Member Functions inherited from drwnWriteable
bool write (const char *filename) const
 write object to file (calls save)
 
bool read (const char *filename)
 read object from file (calls load)
 
void dump () const
 print object's current state to standard output (for debugging)
 

Static Public Attributes

static int MATCH_MODE = CV_TM_CCOEFF_NORMED
 

Protected Attributes

cv::Size _extent
 width and height of template (in pixels)
 
vector< cv::Mat > _weights
 template coefficients (in feature space)
 
cv::Point _offset
 centroid offset (in pixels)
 
drwnDeformationCost _dcost
 deformation cost (dx, dy, dx^2, dy^2) (in pixels)
 

Friends

double overlap (const drwnPart &partA, const cv::Point &locationA, const drwnPart &partB, const cv::Point &locationB)
 

Detailed Description

A part is defined as a template over a number of channels (possibly one), an offset from the object centroid, and a deformation cost. The part is scored as w^T F(x) where w are the template weights, and F(x) is the feature vector at location x in feature space. Note for edge templates this can be in pixels, but generally will be in some multiple of pixels. It is up to the inference model to handle conversion from feature space to pixel space.


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