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
7b2839a9
"git@developer.sourcefind.cn:OpenDAS/autoawq.git" did not exist on "1b0af2d3047eed8a9dc1439bbebee7b0d28c978f"
Commit
7b2839a9
authored
Sep 02, 2014
by
Davis King
Browse files
Added methods to allow in-place modification of a full_object_detection.
parent
1ff7cd1a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
0 deletions
+37
-0
dlib/image_processing/full_object_detection.h
dlib/image_processing/full_object_detection.h
+16
-0
dlib/image_processing/full_object_detection_abstract.h
dlib/image_processing/full_object_detection_abstract.h
+21
-0
No files found.
dlib/image_processing/full_object_detection.h
View file @
7b2839a9
...
...
@@ -33,6 +33,7 @@ namespace dlib
)
:
rect
(
rect_
)
{}
const
rectangle
&
get_rect
()
const
{
return
rect
;
}
rectangle
&
get_rect
()
{
return
rect
;
}
unsigned
long
num_parts
()
const
{
return
parts
.
size
();
}
const
point
&
part
(
...
...
@@ -50,6 +51,21 @@ namespace dlib
return
parts
[
idx
];
}
point
&
part
(
unsigned
long
idx
)
{
// make sure requires clause is not broken
DLIB_ASSERT
(
idx
<
num_parts
(),
"
\t
point full_object_detection::part()"
<<
"
\n\t
Invalid inputs were given to this function "
<<
"
\n\t
idx: "
<<
idx
<<
"
\n\t
num_parts(): "
<<
num_parts
()
<<
"
\n\t
this: "
<<
this
);
return
parts
[
idx
];
}
friend
void
serialize
(
const
full_object_detection
&
item
,
std
::
ostream
&
out
...
...
dlib/image_processing/full_object_detection_abstract.h
View file @
7b2839a9
...
...
@@ -64,6 +64,14 @@ namespace dlib
this should be the bounding box for the object.
!*/
rectangle
&
get_rect
(
);
/*!
ensures
- returns the rectangle that indicates where this object is. In general,
this should be the bounding box for the object.
!*/
unsigned
long
num_parts
(
)
const
;
/*!
...
...
@@ -83,6 +91,19 @@ namespace dlib
when the return value of part() is equal to OBJECT_PART_NOT_PRESENT.
This is useful for modeling object parts that are not always observed.
!*/
point
&
part
(
unsigned
long
idx
);
/*!
requires
- idx < num_parts()
ensures
- returns the location of the center of the idx-th part of this object.
Note that it is valid for a part to be "not present". This is indicated
when the return value of part() is equal to OBJECT_PART_NOT_PRESENT.
This is useful for modeling object parts that are not always observed.
!*/
};
// ----------------------------------------------------------------------------------------
...
...
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