42 #include "label_common.h"
80 inline AttribLocation (
int u1,
int v1,
int u2,
int v2):
du1 (static_cast<std::int16_t>(u1)),
81 dv1 (static_cast<std::int16_t>(v1)),
82 du2 (static_cast<std::int16_t>(u2)),
83 dv2 (static_cast<std::int16_t>(v2))
110 void writeAttribLocs(
const std::string& filename,
const std::vector<AttribLocation>& alocs );
111 void readAttribLocs(
const std::string& filename, std::vector<AttribLocation>& alocs );
112 void readThreshs(
const std::string& filename, std::vector<Attrib>& threshs );
113 void writeThreshs(
const std::string& filename,
const std::vector<Attrib>& threshs );
131 int loadTree( std::istream& is, std::vector<Node>& tree, std::vector<Label>& leaves );
132 int loadTree(
const std::string& filename, std::vector<Node>& tree, std::vector<Label>& leaves );
133 void runThroughTree(
int maxDepth,
const std::vector<Node>& tree,
const std::vector<Label>& leaves,
int W,
int H,
const std::uint16_t* dmap,
Label* lmap );
void readAttribLocs(const std::string &filename, std::vector< AttribLocation > &alocs)
void writeThreshs(const std::string &filename, const std::vector< Attrib > &threshs)
void readThreshs(const std::string &filename, std::vector< Attrib > &threshs)
void runThroughTree(int maxDepth, const std::vector< Node > &tree, const std::vector< Label > &leaves, int W, int H, const std::uint16_t *dmap, Label *lmap)
void writeAttribLocs(const std::string &filename, const std::vector< AttribLocation > &alocs)
std::istream & operator>>(std::istream &is, AttribLocation &aloc)
std::ostream & operator<<(std::ostream &os, const AttribLocation &aloc)
int loadTree(std::istream &is, std::vector< Node > &tree, std::vector< Label > &leaves)
The stream points to ascii data that goes:
AttribLocation(int u1, int v1, int u2, int v2)
float label_prob[NUM_PARTS]
Node(const AttribLocation &l, const Attrib &t)