add A2 stub
This commit is contained in:
parent
7d2b7b9ba7
commit
38e9a97a85
3 changed files with 55 additions and 1 deletions
18
src/a2.cpp
Normal file
18
src/a2.cpp
Normal file
|
@ -0,0 +1,18 @@
|
|||
#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
|
Loading…
Add table
Add a link
Reference in a new issue