21 #ifndef _XBOOST_TYPES_H
22 #define _XBOOST_TYPES_H
40 unsigned int width, height;
42 size() : width(0), height(0) { }
43 size(
unsigned int _w,
unsigned int _h) : width(_w), height(_h) { }
45 inline bool operator == (
const size & s)
const
47 return width == s.width && height == s.height;
59 rect(
int _x0,
int _y0,
int _x1,
int _y1) : x0(_x0), y0(_y0), x1(_x1), y1(_y1) {}
61 inline int width()
const {
return x1 - x0; }
62 inline int height()
const {
return y1 - y0; }
63 inline size extension()
const {
return size(x1 - x0, y1 - y0); }
65 inline bool operator == (
const rect & r)
const
67 return x0 == r.x0 && y0 == r.y0 && x1 == r.x1 && y1 == r.y1;
71 std::ostream & operator << (std::ostream & out,
const rect & src);
76 enum OverlapCriterion {
a dicrete classifier with abstention returns {-1,0,+1}
Definition: Types.h:33
ClassifierType
Definition: Types.h:31
image/size TODO namespace
Definition: Types.h:39
double boxoverlap(rect a, rect b, OverlapCriterion criterion=Overlap_On_Union)
get overlapped area
a FeatureExtractor return a scalar number without relationship with classification ...
Definition: Types.h:35
bool overlap(const rect &a, const rect &b)
test if 2 rect are overlapped
a rectangle structure
Definition: Types.h:55
a real classifier return a number between -1,+1
Definition: Types.h:34
a dicrete classifier returns {-1,+1}
Definition: Types.h:32
size template_geometry
normally referred as template_geometry
Definition: Types.h:52