From 4b4255d1f5c09e9b92dfa875530f08a2ae2e6ba5 Mon Sep 17 00:00:00 2001 From: Davis King Date: Wed, 11 Dec 2013 22:42:55 -0500 Subject: [PATCH] Added an overload of overlaps_any_box() that uses a default test_box_overlap object. --- dlib/image_processing/box_overlap_testing.h | 10 ++++++++++ dlib/image_processing/box_overlap_testing_abstract.h | 11 +++++++++++ 2 files changed, 21 insertions(+) diff --git a/dlib/image_processing/box_overlap_testing.h b/dlib/image_processing/box_overlap_testing.h index 61db2f3bb..accfb1de7 100644 --- a/dlib/image_processing/box_overlap_testing.h +++ b/dlib/image_processing/box_overlap_testing.h @@ -143,6 +143,16 @@ namespace dlib return false; } +// ---------------------------------------------------------------------------------------- + + inline bool overlaps_any_box ( + const std::vector& rects, + const rectangle& rect + ) + { + return overlaps_any_box(test_box_overlap(),rects,rect); + } + // ---------------------------------------------------------------------------------------- } diff --git a/dlib/image_processing/box_overlap_testing_abstract.h b/dlib/image_processing/box_overlap_testing_abstract.h index e6631d98b..b1517e2fc 100644 --- a/dlib/image_processing/box_overlap_testing_abstract.h +++ b/dlib/image_processing/box_overlap_testing_abstract.h @@ -130,6 +130,17 @@ namespace dlib is determined based on the given tester object. !*/ +// ---------------------------------------------------------------------------------------- + + bool overlaps_any_box ( + const std::vector& rects, + const rectangle& rect + ); + /*! + ensures + - returns overlaps_any_box(test_box_overlap(), rects, rect) + !*/ + // ---------------------------------------------------------------------------------------- }