| 91 | } |
| 92 | |
| 93 | void add_overlay_pylist ( |
| 94 | image_window& win, |
| 95 | const py::list& objs, |
| 96 | const rgb_pixel& color |
| 97 | ) |
| 98 | { |
| 99 | std::vector<rectangle> rects; |
| 100 | for (const auto& obj : objs) |
| 101 | { |
| 102 | try { rects.push_back(obj.cast<rectangle>()); continue; } catch(py::cast_error&) { } |
| 103 | try { rects.push_back(obj.cast<drectangle>()); continue; } catch(py::cast_error&) { } |
| 104 | try { win.add_overlay(obj.cast<line>(), color); continue; } catch(py::cast_error&) { } |
| 105 | add_overlay_parts(win, obj.cast<full_object_detection>(), color); |
| 106 | } |
| 107 | win.add_overlay(rects, color); |
| 108 | } |
| 109 | |
| 110 | void wait_for_keypress_char(image_window& win, const char wait_key) { |
| 111 | unsigned long key; |
nothing calls this directly
no test coverage detected