Darwin
1.10(beta)
|
Encapsulates a 2D object in an image for object detection. More...
Public Member Functions | |
drwnObject () | |
default constructor | |
drwnObject (const cv::Rect &ext, const char *n=NULL) | |
construct an object with given extent ext and name n | |
drwnObject (const drwnObject &obj) | |
copy constructor | |
bool | save (drwnXMLNode &xml) const |
save an object | |
bool | load (drwnXMLNode &xml) |
load an object | |
bool | hit (double x, double y) const |
return true if the point (x,y) is within the object | |
bool | hit (const cv::Point &pt) const |
return true if the point pt is within the object | |
double | area () const |
return the area of the object | |
double | aspect () const |
return the aspect ratio (width/height) of the object | |
double | overlap (const cv::Rect &roi) const |
return the number of pixels that overlap between the object and roi | |
double | overlap (const drwnObject &obj) const |
return the number of pixels that overlap between two objects | |
double | areaOverlap (const cv::Rect &roi) const |
return the area of intersection divided by the area of union | |
double | areaOverlap (const drwnObject &obj) const |
return the area of intersection divided by the area of union | |
bool | inside (const drwnObject &obj) const |
return true if obj is within the object | |
void | scale (double x_scale, double y_scale) |
scale the object bounding box | |
void | scale (double sc) |
scale the object bounding box | |
drwnObject & | operator= (const drwnObject &obj) |
bool | operator== (const drwnObject &obj) const |
bool | operator!= (const drwnObject &obj) const |
bool | operator< (const drwnObject &obj) const |
bool | operator> (const drwnObject &obj) const |
Public Attributes | |
string | name |
name of the object category, e.g., "car" | |
cv::Rect | extent |
object bounding box (in pixels) | |
double | score |
score (probability) for the object (higher is better) | |
int | ref |
external reference | |
Encapsulates a 2D object in an image for object detection.