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();