Commit 566e9535 authored by Davis King's avatar Davis King

Added an angle field to image_dataset_metadata

parent b3e2d766
...@@ -78,6 +78,8 @@ namespace dlib ...@@ -78,6 +78,8 @@ namespace dlib
fout << " occluded='" << b.occluded << "'"; fout << " occluded='" << b.occluded << "'";
if (b.ignore) if (b.ignore)
fout << " ignore='" << b.ignore << "'"; fout << " ignore='" << b.ignore << "'";
if (b.angle != 0)
fout << " angle='" << b.angle << "'";
if (b.has_label() || b.parts.size() != 0) if (b.has_label() || b.parts.size() != 0)
{ {
...@@ -189,6 +191,7 @@ namespace dlib ...@@ -189,6 +191,7 @@ namespace dlib
if (atts.is_in_list("truncated")) temp_box.truncated = sa = atts["truncated"]; 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("occluded")) temp_box.occluded = sa = atts["occluded"];
if (atts.is_in_list("ignore")) temp_box.ignore = sa = atts["ignore"]; 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.bottom() += temp_box.rect.top()-1;
temp_box.rect.right() += temp_box.rect.left()-1; temp_box.rect.right() += temp_box.rect.left()-1;
......
...@@ -32,7 +32,8 @@ namespace dlib ...@@ -32,7 +32,8 @@ namespace dlib
difficult(false), difficult(false),
truncated(false), truncated(false),
occluded(false), occluded(false),
ignore(false) ignore(false),
angle(0)
{} {}
rectangle rect; rectangle rect;
...@@ -46,6 +47,13 @@ namespace dlib ...@@ -46,6 +47,13 @@ namespace dlib
bool occluded; bool occluded;
bool ignore; 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; } bool has_label() const { return label.size() != 0; }
/*! /*!
ensures ensures
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment