Commit f5712fa6 authored by Davis King's avatar Davis King

Made the test for using the separable vs. non-separable filters scale

with the size of the filters being applied.
parent 5edb5662
......@@ -329,7 +329,8 @@ namespace dlib
{
const unsigned long num_separable_filters = w.num_separable_filters();
rectangle area;
if (num_separable_filters > 31*3)
// use the separable filters if they would be faster than running the regular filters.
if (num_separable_filters > 31*std::min(w.filters[0].nr(),w.filters[0].nc())/3.0)
{
area = spatially_filter_image(feats[0], saliency_image, w.filters[0]);
for (unsigned long i = 1; i < w.filters.size(); ++i)
......
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