netatmo-algo/src/a2.cpp

19 lines
505 B
C++
Raw Normal View History

2022-02-16 13:59:14 +01:00
#include "a2.h"
namespace freling {
std::vector<BoundingBox> A2(const std::vector<BoundingBox>& regions) {
std::vector<BoundingBox> updated_boxes(regions.size());
for (int i = 0, size = regions.size(); i < size; ++i) {
auto& box = updated_boxes[i];
const auto& region = regions[i];
box.x = region.x + 2;
box.y = region.y + 2;
box.width = region.width - 4;
box.height = region.height - 4;
}
return updated_boxes;
}
} // namespace freling