Commit 2e98a785 authored by Davis King's avatar Davis King

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.
parent bf0ed361
......@@ -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)
......
......@@ -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()
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment