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
9bd418a5
Commit
9bd418a5
authored
Feb 12, 2017
by
Davis King
Browse files
Made full_object_detection comparable via operator==
parent
11016884
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-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
+8
-0
No files found.
dlib/image_processing/full_object_detection.h
View file @
9bd418a5
...
...
@@ -91,6 +91,22 @@ namespace dlib
deserialize
(
item
.
parts
,
in
);
}
bool
operator
==
(
const
full_object_detection
&
rhs
)
const
{
if
(
rect
!=
rhs
.
rect
)
return
false
;
if
(
parts
.
size
()
!=
rhs
.
parts
.
size
())
return
false
;
for
(
size_t
i
=
0
;
i
<
parts
.
size
();
++
i
)
{
if
(
parts
[
i
]
!=
rhs
.
parts
[
i
]);
return
false
;
}
return
true
;
}
private:
rectangle
rect
;
std
::
vector
<
point
>
parts
;
...
...
dlib/image_processing/full_object_detection_abstract.h
View file @
9bd418a5
...
...
@@ -104,6 +104,14 @@ 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.
!*/
bool
operator
==
(
const
full_object_detection
&
rhs
)
const
;
/*!
ensures
- returns true if and only if *this and rhs have identical state.
!*/
};
// ----------------------------------------------------------------------------------------
...
...
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