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
a05b8651
Commit
a05b8651
authored
Feb 01, 2018
by
Davis King
Browse files
Fixed code not handling OBJECT_PART_NOT_PRESENT for full_object_detection objects.
parent
8b5c696c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
dlib/image_transforms/interpolation.h
dlib/image_transforms/interpolation.h
+10
-2
No files found.
dlib/image_transforms/interpolation.h
View file @
a05b8651
...
...
@@ -1182,7 +1182,10 @@ namespace dlib
parts
.
reserve
(
obj
.
num_parts
());
for
(
unsigned
long
i
=
0
;
i
<
obj
.
num_parts
();
++
i
)
{
if
(
obj
.
part
(
i
)
!=
OBJECT_PART_NOT_PRESENT
)
parts
.
push_back
(
tran
(
obj
.
part
(
i
)));
else
parts
.
push_back
(
OBJECT_PART_NOT_PRESENT
);
}
return
full_object_detection
(
tform_object
(
tran
,
obj
.
get_rect
()),
parts
);
}
...
...
@@ -1798,7 +1801,12 @@ namespace dlib
full_object_detection
res
(
det
);
// map the parts
for
(
unsigned
long
l
=
0
;
l
<
det
.
num_parts
();
++
l
)
{
if
(
det
.
part
(
l
)
!=
OBJECT_PART_NOT_PRESENT
)
res
.
part
(
l
)
=
tform
(
det
.
part
(
l
));
else
res
.
part
(
l
)
=
OBJECT_PART_NOT_PRESENT
;
}
// map the main rectangle
rectangle
rect
;
rect
+=
tform
(
det
.
get_rect
().
tl_corner
());
...
...
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