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
67ac182f
Commit
67ac182f
authored
Sep 03, 2012
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added serialization support to the full_object_detection.
parent
62239be0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
0 deletions
+45
-0
full_object_detection.h
dlib/image_processing/full_object_detection.h
+26
-0
full_object_detection_abstract.h
dlib/image_processing/full_object_detection_abstract.h
+19
-0
No files found.
dlib/image_processing/full_object_detection.h
View file @
67ac182f
...
...
@@ -6,6 +6,7 @@
#include "../geometry.h"
#include "full_object_detection_abstract.h"
#include <vector>
#include "../serialize.h"
namespace
dlib
{
...
...
@@ -49,6 +50,31 @@ namespace dlib
return
parts
[
idx
];
}
friend
void
serialize
(
const
full_object_detection
&
item
,
std
::
ostream
&
out
)
{
int
version
=
1
;
serialize
(
version
,
out
);
serialize
(
item
.
rect
,
out
);
serialize
(
item
.
parts
,
out
);
}
friend
void
deserialize
(
full_object_detection
&
item
,
std
::
istream
&
in
)
{
int
version
=
0
;
deserialize
(
version
,
in
);
if
(
version
!=
1
)
throw
serialization_error
(
"Unexpected version encountered while deserializing dlib::full_object_detection."
);
deserialize
(
item
.
rect
,
in
);
deserialize
(
item
.
parts
,
in
);
}
private
:
rectangle
rect
;
std
::
vector
<
point
>
parts
;
...
...
dlib/image_processing/full_object_detection_abstract.h
View file @
67ac182f
...
...
@@ -5,6 +5,7 @@
#include <vector>
#include "../geometry.h"
#include "../serialize.h"
namespace
dlib
{
...
...
@@ -84,6 +85,24 @@ namespace dlib
!*/
};
// ----------------------------------------------------------------------------------------
void
serialize
(
const
full_object_detection
&
item
,
std
::
ostream
&
out
);
/*!
provides serialization support
!*/
void
deserialize
(
full_object_detection
&
item
,
std
::
istream
&
in
);
/*!
provides deserialization support
!*/
// ----------------------------------------------------------------------------------------
bool
all_parts_in_rect
(
...
...
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