Commit 9e41955c authored by Davis King's avatar Davis King

Minor change to avoid doing unnecessary computations in certain cases.

parent d9f38e98
......@@ -169,9 +169,14 @@ namespace dlib
for (unsigned long k = 0; k < images.size(); ++k)
{
std::vector<rectangle> objs = object_locations[k];
// Don't even bother computing the candidate rectangles if there aren't any
// object locations for this image since there isn't anything to do anyway.
if (objs.size() == 0)
continue;
bg(images[k], rects);
std::vector<rectangle> objs = object_locations[k];
// First remove things that don't have any matches with the candidate object
// locations.
......
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