From 3a4f1c0e4dad8842511495c48a1c27841aa7049b Mon Sep 17 00:00:00 2001 From: Davis King Date: Sat, 21 Jan 2012 16:52:54 -0500 Subject: [PATCH] Further simplified these examples. --- examples/object_detector_advanced_ex.cpp | 6 +----- examples/object_detector_ex.cpp | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/examples/object_detector_advanced_ex.cpp b/examples/object_detector_advanced_ex.cpp index 2cdf217fa..4aadd440c 100644 --- a/examples/object_detector_advanced_ex.cpp +++ b/examples/object_detector_advanced_ex.cpp @@ -278,11 +278,7 @@ int main() // Put the image and detections into the window. win.clear_overlay(); win.set_image(images[i]); - for (unsigned long j = 0; j < rects.size(); ++j) - { - // Add each detection as a red box. - win.add_overlay(rects[j], rgb_pixel(255,0,0)); - } + win.add_overlay(rects, rgb_pixel(255,0,0)); cout << "Hit enter to see the next image."; cin.get(); diff --git a/examples/object_detector_ex.cpp b/examples/object_detector_ex.cpp index 097da05a2..67bc72d81 100644 --- a/examples/object_detector_ex.cpp +++ b/examples/object_detector_ex.cpp @@ -213,11 +213,7 @@ int main() // Put the image and detections into the window. win.clear_overlay(); win.set_image(images[i]); - for (unsigned long j = 0; j < rects.size(); ++j) - { - // Add each detection as a red box. - win.add_overlay(rects[j], rgb_pixel(255,0,0)); - } + win.add_overlay(rects, rgb_pixel(255,0,0)); cout << "Hit enter to see the next image."; cin.get();