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...
|
| 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"; })
|
|
drwnPart * | clone () 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 drwnDeformationCost & | getDCosts () 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 |
|
drwnPart & | operator= (const drwnPart &part) |
|
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 int | MATCH_MODE = CV_TM_CCOEFF_NORMED |
|
|
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)
|
|
|
double | overlap (const drwnPart &partA, const cv::Point &locationA, const drwnPart &partB, const cv::Point &locationB) |
|
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: