mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
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:
parent
bf0ed361d7
commit
2e98a785bc
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user