Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
566e9535
Commit
566e9535
authored
Dec 27, 2013
by
Davis King
Browse files
Added an angle field to image_dataset_metadata
parent
b3e2d766
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
dlib/data_io/image_dataset_metadata.cpp
dlib/data_io/image_dataset_metadata.cpp
+3
-0
dlib/data_io/image_dataset_metadata.h
dlib/data_io/image_dataset_metadata.h
+9
-1
No files found.
dlib/data_io/image_dataset_metadata.cpp
View file @
566e9535
...
@@ -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
;
...
...
dlib/data_io/image_dataset_metadata.h
View file @
566e9535
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment