mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
Added an angle field to image_dataset_metadata
This commit is contained in:
parent
b3e2d76617
commit
566e9535f1
@ -78,6 +78,8 @@ namespace dlib
|
||||
fout << " occluded='" << b.occluded << "'";
|
||||
if (b.ignore)
|
||||
fout << " ignore='" << b.ignore << "'";
|
||||
if (b.angle != 0)
|
||||
fout << " angle='" << b.angle << "'";
|
||||
|
||||
if (b.has_label() || b.parts.size() != 0)
|
||||
{
|
||||
@ -189,6 +191,7 @@ namespace dlib
|
||||
if (atts.is_in_list("truncated")) temp_box.truncated = sa = atts["truncated"];
|
||||
if (atts.is_in_list("occluded")) temp_box.occluded = sa = atts["occluded"];
|
||||
if (atts.is_in_list("ignore")) temp_box.ignore = sa = atts["ignore"];
|
||||
if (atts.is_in_list("angle")) temp_box.angle = sa = atts["angle"];
|
||||
|
||||
temp_box.rect.bottom() += temp_box.rect.top()-1;
|
||||
temp_box.rect.right() += temp_box.rect.left()-1;
|
||||
|
@ -32,7 +32,8 @@ namespace dlib
|
||||
difficult(false),
|
||||
truncated(false),
|
||||
occluded(false),
|
||||
ignore(false)
|
||||
ignore(false),
|
||||
angle(0)
|
||||
{}
|
||||
|
||||
rectangle rect;
|
||||
@ -46,6 +47,13 @@ namespace dlib
|
||||
bool occluded;
|
||||
bool ignore;
|
||||
|
||||
// The angle of the object in radians. Positive values indicate that the
|
||||
// object at the center of the box is rotated clockwise by angle radians. A
|
||||
// value of 0 would indicate that the object is in its "standard" upright pose.
|
||||
// Therefore, to make the object appear upright we would have to rotate the
|
||||
// image counter-clockwise by angle radians.
|
||||
double angle;
|
||||
|
||||
bool has_label() const { return label.size() != 0; }
|
||||
/*!
|
||||
ensures
|
||||
|
Loading…
Reference in New Issue
Block a user