mirror of https://github.com/davisking/dlib.git
Added a missing assert and fixed some typos.
This commit is contained in:
parent
ae0c81bc76
commit
4e2ab80eb0
|
@ -151,6 +151,17 @@ namespace dlib
|
|||
boxes_overlap(overlap_tester),
|
||||
w(w_)
|
||||
{
|
||||
// make sure requires clause is not broken
|
||||
DLIB_ASSERT(scanner_.get_num_detection_templates() > 0 &&
|
||||
w_.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()
|
||||
<< "\n\t w_.size(): " << w_.size()
|
||||
<< "\n\t scanner_.get_num_dimensions(): " << scanner_.get_num_dimensions()
|
||||
<< "\n\t this: " << this
|
||||
);
|
||||
|
||||
scanner.copy_configuration(scanner_);
|
||||
}
|
||||
|
||||
|
|
|
@ -20,13 +20,12 @@ namespace dlib
|
|||
{
|
||||
/*!
|
||||
REQUIREMENTS ON overlap_tester_type
|
||||
overlap_tester_type must be a type with an interface compatible
|
||||
with test_box_overlap.
|
||||
overlap_tester_type must be an implementation of the test_box_overlap
|
||||
object defined in dlib/image_processing/box_overlap_testing_abstract.h.
|
||||
|
||||
REQUIREMENTS ON image_scanner_type
|
||||
image_scanner_type must be an instance of the scan_image_pyramid
|
||||
templated defined in dlib/image_processing/scan_image_pyramid_abstract.h
|
||||
or an object with a compatible interface.
|
||||
image_scanner_type must be an implementation of
|
||||
dlib/image_processing/scan_image_pyramid_abstract.h
|
||||
|
||||
WHAT THIS OBJECT REPRESENTS
|
||||
This object is a tool for detecting the positions of objects in
|
||||
|
@ -61,7 +60,7 @@ namespace dlib
|
|||
/*!
|
||||
requires
|
||||
- w.size() == scanner.get_num_dimensions() + 1
|
||||
- scanner.num_detection_templates() > 0
|
||||
- scanner.get_num_detection_templates() > 0
|
||||
ensures
|
||||
- When the operator() member function is called it will
|
||||
invoke scanner.detect(w,dets,w(w.size()-1)), suppress
|
||||
|
|
|
@ -67,7 +67,7 @@ namespace dlib
|
|||
/*!
|
||||
requires
|
||||
- images.size() == truth_rects.size()
|
||||
- scanner.num_detection_templates() > 0
|
||||
- scanner.get_num_detection_templates() > 0
|
||||
ensures
|
||||
- This object attempts to learn a mapping from the given images to the
|
||||
object locations given in truth_rects. In particular, it attempts to
|
||||
|
|
Loading…
Reference in New Issue