Commit 6c0f5980 authored by Davis King's avatar Davis King

Changed code a bit to make it run faster.

parent 6010de9b
......@@ -489,7 +489,9 @@ namespace dlib
for (unsigned long l = 0; l < feats.size(); ++l)
{
for (unsigned long i = 0; i < saliency_images.size(); ++i)
{
saliency_images[i].set_size(feats[l].nr(), feats[l].nc());
const unsigned long offset = feats_config.get_num_dimensions()*i;
// build saliency images for pyramid level l
for (long r = 0; r < feats[l].nr(); ++r)
......@@ -497,9 +499,6 @@ namespace dlib
for (long c = 0; c < feats[l].nc(); ++c)
{
const typename feature_extractor_type::descriptor_type& descriptor = feats[l](r,c);
for (unsigned long i = 0; i < saliency_images.size(); ++i)
{
const unsigned long offset = feats_config.get_num_dimensions()*i;
double sum = 0;
for (unsigned long k = 0; k < descriptor.size(); ++k)
......
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