| 532 | // ---------------------------------------------------------------------------------------- |
| 533 | |
| 534 | std::vector<dlib::image_display::overlay_rect> get_overlays ( |
| 535 | const dlib::image_dataset_metadata::image& data, |
| 536 | color_mapper& string_to_color |
| 537 | ) |
| 538 | { |
| 539 | std::vector<dlib::image_display::overlay_rect> temp(data.boxes.size()); |
| 540 | for (unsigned long i = 0; i < temp.size(); ++i) |
| 541 | { |
| 542 | temp[i].rect = data.boxes[i].rect; |
| 543 | temp[i].label = data.boxes[i].label; |
| 544 | temp[i].parts = data.boxes[i].parts; |
| 545 | temp[i].crossed_out = data.boxes[i].ignore; |
| 546 | temp[i].color = string_to_color(data.boxes[i].label); |
| 547 | } |
| 548 | return temp; |
| 549 | } |
| 550 | |
| 551 | // ---------------------------------------------------------------------------------------- |
| 552 |
no test coverage detected