Removed constness from the operator() member functions of the object_detector

since they logically modify the state of the object detector now that
we are exposing the state of the underlying image scanner.
This commit is contained in:
Davis King 2011-12-26 09:34:24 -05:00
parent bf0ed361d7
commit 2e98a785bc
4 changed files with 9 additions and 9 deletions

View File

@ -52,7 +52,7 @@ namespace dlib
>
std::vector<rectangle> operator() (
const image_type& img
) const;
);
template <
typename image_type
@ -60,7 +60,7 @@ namespace dlib
void operator() (
const image_type& img,
std::vector<std::pair<double, rectangle> >& final_dets
) const;
);
template <typename T, typename U>
friend void serialize (
@ -104,7 +104,7 @@ namespace dlib
overlap_tester_type boxes_overlap;
matrix<double,0,1> w;
mutable image_scanner_type scanner;
image_scanner_type scanner;
};
// ----------------------------------------------------------------------------------------
@ -228,7 +228,7 @@ namespace dlib
std::vector<rectangle> object_detector<image_scanner_type,overlap_tester_type>::
operator() (
const image_type& img
) const
)
{
std::vector<rectangle> final_dets;
if (w.size() != 0)
@ -264,7 +264,7 @@ namespace dlib
operator() (
const image_type& img,
std::vector<std::pair<double, rectangle> >& final_dets
) const
)
{
final_dets.clear();
if (w.size() != 0)

View File

@ -111,7 +111,7 @@ namespace dlib
>
std::vector<rectangle> operator() (
const image_type& img
) const;
);
/*!
requires
- img == an object which can be accepted by image_scanner_type::load()
@ -132,7 +132,7 @@ namespace dlib
void operator() (
const image_type& img,
std::vector<std::pair<double, rectangle> >& dets
) const;
);
/*!
requires
- img == an object which can be accepted by image_scanner_type::load()

View File

@ -73,7 +73,7 @@ namespace dlib
typename image_array_type
>
const matrix<double,1,2> test_object_detection_function (
const object_detector_type& detector,
object_detector_type& detector,
const image_array_type& images,
const std::vector<std::vector<rectangle> >& truth_rects,
const double overlap_eps = 0.5

View File

@ -17,7 +17,7 @@ namespace dlib
typename image_array_type
>
const matrix<double,1,2> test_object_detection_function (
const object_detector_type& detector,
object_detector_type& detector,
const image_array_type& images,
const std::vector<std::vector<rectangle> >& truth_rects,
const double overlap_eps = 0.5