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

Changed code a bit to make it run faster.

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