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
c590ee67
Commit
c590ee67
authored
9 years ago
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Turned some DLIB_ASSERT() statements into DLIB_CASSERT() since it gives
better error reporting and is not a speed bottleneck.
parent
f0ccfd40
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
object_detector.h
dlib/image_processing/object_detector.h
+3
-5
No files found.
dlib/image_processing/object_detector.h
View file @
c590ee67
...
...
@@ -341,7 +341,7 @@ namespace dlib
boxes_overlap
(
overlap_tester
)
{
// make sure requires clause is not broken
DLIB_ASSERT
(
scanner_
.
get_num_detection_templates
()
>
0
&&
w_
.
size
()
>
0
,
DLIB_
C
ASSERT
(
scanner_
.
get_num_detection_templates
()
>
0
&&
w_
.
size
()
>
0
,
"
\t
object_detector::object_detector(scanner_,overlap_tester,w_)"
<<
"
\n\t
Invalid inputs were given to this function "
<<
"
\n\t
scanner_.get_num_detection_templates(): "
<<
scanner_
.
get_num_detection_templates
()
...
...
@@ -349,10 +349,9 @@ namespace dlib
<<
"
\n\t
this: "
<<
this
);
#ifdef ENABLE_ASSERTS
for
(
unsigned
long
i
=
0
;
i
<
w_
.
size
();
++
i
)
{
DLIB_ASSERT
(
w_
[
i
].
size
()
==
scanner_
.
get_num_dimensions
()
+
1
,
DLIB_
C
ASSERT
(
w_
[
i
].
size
()
==
scanner_
.
get_num_dimensions
()
+
1
,
"
\t
object_detector::object_detector(scanner_,overlap_tester,w_)"
<<
"
\n\t
Invalid inputs were given to this function "
<<
"
\n\t
scanner_.get_num_detection_templates(): "
<<
scanner_
.
get_num_detection_templates
()
...
...
@@ -361,7 +360,6 @@ namespace dlib
<<
"
\n\t
this: "
<<
this
);
}
#endif
scanner
.
copy_configuration
(
scanner_
);
w
.
resize
(
w_
.
size
());
...
...
@@ -382,7 +380,7 @@ namespace dlib
const
std
::
vector
<
object_detector
>&
detectors
)
{
DLIB_ASSERT
(
detectors
.
size
()
!=
0
,
DLIB_
C
ASSERT
(
detectors
.
size
()
!=
0
,
"
\t
object_detector::object_detector(detectors)"
<<
"
\n\t
Invalid inputs were given to this function "
<<
"
\n\t
this: "
<<
this
...
...
This diff is collapsed.
Click to expand it.
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