Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
7b2839a9
Commit
7b2839a9
authored
Sep 03, 2014
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added methods to allow in-place modification of a full_object_detection.
parent
1ff7cd1a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
0 deletions
+37
-0
full_object_detection.h
dlib/image_processing/full_object_detection.h
+16
-0
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