Commit 0ffdc782 authored by Davis King's avatar Davis King

Made remove_unobtainable_rectangles() work on scan_fhog_pyramid.

parent 791e9cda
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include "scan_image_pyramid.h" #include "scan_image_pyramid.h"
#include "scan_image_boxes.h" #include "scan_image_boxes.h"
#include "scan_image_custom.h" #include "scan_image_custom.h"
#include "scan_fhog_pyramid.h"
#include "../svm/structural_object_detection_trainer.h" #include "../svm/structural_object_detection_trainer.h"
#include "../geometry.h" #include "../geometry.h"
...@@ -53,17 +54,14 @@ namespace dlib ...@@ -53,17 +54,14 @@ namespace dlib
return best_rect; return best_rect;
} }
} // ------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
template < template <
typename image_array_type, typename image_array_type,
typename Pyramid_type, typename image_scanner_type
typename Feature_extractor_type
> >
std::vector<std::vector<rectangle> > remove_unobtainable_rectangles ( std::vector<std::vector<rectangle> > pyramid_remove_unobtainable_rectangles (
const structural_object_detection_trainer<scan_image_pyramid<Pyramid_type, Feature_extractor_type> >& trainer, const structural_object_detection_trainer<image_scanner_type>& trainer,
const image_array_type& images, const image_array_type& images,
std::vector<std::vector<rectangle> >& object_locations std::vector<std::vector<rectangle> >& object_locations
) )
...@@ -136,6 +134,39 @@ namespace dlib ...@@ -136,6 +134,39 @@ namespace dlib
return rejects; return rejects;
} }
}
// ----------------------------------------------------------------------------------------
template <
typename image_array_type,
typename Pyramid_type,
typename Feature_extractor_type
>
std::vector<std::vector<rectangle> > remove_unobtainable_rectangles (
const structural_object_detection_trainer<scan_image_pyramid<Pyramid_type, Feature_extractor_type> >& trainer,
const image_array_type& images,
std::vector<std::vector<rectangle> >& object_locations
)
{
return impl::pyramid_remove_unobtainable_rectangles(trainer, images, object_locations);
}
// ----------------------------------------------------------------------------------------
template <
typename image_array_type,
typename Pyramid_type
>
std::vector<std::vector<rectangle> > remove_unobtainable_rectangles (
const structural_object_detection_trainer<scan_fhog_pyramid<Pyramid_type> >& trainer,
const image_array_type& images,
std::vector<std::vector<rectangle> >& object_locations
)
{
return impl::pyramid_remove_unobtainable_rectangles(trainer, images, object_locations);
}
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
namespace impl namespace impl
......
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