Commit ea2d8ddc authored by Davis King's avatar Davis King

Minor interface cleanup

parent 048af3c7
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#define DLIB_OBJECT_DeTECTOR_H__ #define DLIB_OBJECT_DeTECTOR_H__
#include "object_detector_abstract.h" #include "object_detector_abstract.h"
#include "../matrix.h"
#include "../geometry.h" #include "../geometry.h"
#include <vector> #include <vector>
#include "box_overlap_testing.h" #include "box_overlap_testing.h"
...@@ -21,6 +20,8 @@ namespace dlib ...@@ -21,6 +20,8 @@ namespace dlib
class object_detector class object_detector
{ {
public: public:
typedef typename image_scanner_type::feature_vector_type feature_vector_type;
object_detector ( object_detector (
); );
...@@ -31,11 +32,11 @@ namespace dlib ...@@ -31,11 +32,11 @@ namespace dlib
object_detector ( object_detector (
const image_scanner_type& scanner_, const image_scanner_type& scanner_,
const overlap_tester_type& overlap_tester_, const overlap_tester_type& overlap_tester_,
const matrix<double,0,1>& w_ const feature_vector_type& w_
); );
const matrix<double,0,1>& get_w ( const feature_vector_type& get_w (
) const; ) const { return w; }
const overlap_tester_type& get_overlap_tester ( const overlap_tester_type& get_overlap_tester (
) const; ) const;
...@@ -104,7 +105,7 @@ namespace dlib ...@@ -104,7 +105,7 @@ namespace dlib
} }
overlap_tester_type boxes_overlap; overlap_tester_type boxes_overlap;
matrix<double,0,1> w; feature_vector_type w;
image_scanner_type scanner; image_scanner_type scanner;
}; };
...@@ -178,7 +179,7 @@ namespace dlib ...@@ -178,7 +179,7 @@ namespace dlib
object_detector ( object_detector (
const image_scanner_type& scanner_, const image_scanner_type& scanner_,
const overlap_tester_type& overlap_tester, const overlap_tester_type& overlap_tester,
const matrix<double,0,1>& w_ const feature_vector_type& w_
) : ) :
boxes_overlap(overlap_tester), boxes_overlap(overlap_tester),
w(w_) w(w_)
...@@ -288,19 +289,6 @@ namespace dlib ...@@ -288,19 +289,6 @@ namespace dlib
} }
} }
// ----------------------------------------------------------------------------------------
template <
typename image_scanner_type,
typename overlap_tester_type
>
const matrix<double,0,1>& object_detector<image_scanner_type,overlap_tester_type>::
get_w (
) const
{
return w;
}
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
template < template <
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
#undef DLIB_OBJECT_DeTECTOR_ABSTRACT_H__ #undef DLIB_OBJECT_DeTECTOR_ABSTRACT_H__
#ifdef DLIB_OBJECT_DeTECTOR_ABSTRACT_H__ #ifdef DLIB_OBJECT_DeTECTOR_ABSTRACT_H__
#include "../matrix.h"
#include "../geometry.h" #include "../geometry.h"
#include <vector> #include <vector>
#include "box_overlap_testing_abstract.h" #include "box_overlap_testing_abstract.h"
...@@ -37,6 +36,8 @@ namespace dlib ...@@ -37,6 +36,8 @@ namespace dlib
non-max suppression on the output of the scan_image_pyramid object. non-max suppression on the output of the scan_image_pyramid object.
!*/ !*/
public: public:
typedef typename image_scanner_type::feature_vector_type feature_vector_type;
object_detector ( object_detector (
); );
/*! /*!
...@@ -59,7 +60,7 @@ namespace dlib ...@@ -59,7 +60,7 @@ namespace dlib
object_detector ( object_detector (
const image_scanner_type& scanner, const image_scanner_type& scanner,
const overlap_tester_type& overlap_tester, const overlap_tester_type& overlap_tester,
const matrix<double,0,1>& w const feature_vector_type& w
); );
/*! /*!
requires requires
...@@ -81,7 +82,7 @@ namespace dlib ...@@ -81,7 +82,7 @@ namespace dlib
I.e. the copy is done using copy_configuration()) I.e. the copy is done using copy_configuration())
!*/ !*/
const matrix<double,0,1>& get_w ( const feature_vector_type& get_w (
) const; ) const;
/*! /*!
ensures ensures
......
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