aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/reference/BoundingBoxTransform.cpp
diff options
context:
space:
mode:
authorgiuros01 <giuseppe.rossini@arm.com>2018-10-03 12:44:35 +0100
committerAnthony Barbier <Anthony.barbier@arm.com>2018-11-15 09:13:14 +0000
commitcd96a26f67bfbb9b0efe6e0e2b229d0b46b4e3e6 (patch)
treebe95114ff6f5a8a17dace8734be6239312631cea /tests/validation/reference/BoundingBoxTransform.cpp
parent1c32bf396eb690a54fd94487e3f258b2c7d31753 (diff)
downloadComputeLibrary-cd96a26f67bfbb9b0efe6e0e2b229d0b46b4e3e6.tar.gz
COMPMID-1329: Add support for GenerateProposals operator in CL
Change-Id: Ib0798cc17496b7817f5b5769b25d98913a33a69d
Diffstat (limited to 'tests/validation/reference/BoundingBoxTransform.cpp')
-rw-r--r--tests/validation/reference/BoundingBoxTransform.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/validation/reference/BoundingBoxTransform.cpp b/tests/validation/reference/BoundingBoxTransform.cpp
index 6ac512e749..9918ff68c5 100644
--- a/tests/validation/reference/BoundingBoxTransform.cpp
+++ b/tests/validation/reference/BoundingBoxTransform.cpp
@@ -84,10 +84,10 @@ SimpleTensor<T> bounding_box_transform(const SimpleTensor<T> &boxes, const Simpl
const T pred_h = T(std::exp(dh)) * height;
// Store the prediction into the output tensor
- pred_boxes_ptr[start_delta] = scale * utility::clamp<T>(pred_ctr_x - T(0.5) * pred_w, T(0), T(img_w));
- pred_boxes_ptr[start_delta + 1] = scale * utility::clamp<T>(pred_ctr_y - T(0.5) * pred_h, T(0), T(img_h));
- pred_boxes_ptr[start_delta + 2] = scale * utility::clamp<T>(pred_ctr_x + T(0.5) * pred_w, T(0), T(img_w));
- pred_boxes_ptr[start_delta + 3] = scale * utility::clamp<T>(pred_ctr_y + T(0.5) * pred_h, T(0), T(img_h));
+ pred_boxes_ptr[start_delta] = scale * utility::clamp<T>(pred_ctr_x - T(0.5) * pred_w, T(0), T(img_w - 1));
+ pred_boxes_ptr[start_delta + 1] = scale * utility::clamp<T>(pred_ctr_y - T(0.5) * pred_h, T(0), T(img_h - 1));
+ pred_boxes_ptr[start_delta + 2] = scale * utility::clamp<T>(pred_ctr_x + T(0.5) * pred_w, T(0), T(img_w - 1));
+ pred_boxes_ptr[start_delta + 3] = scale * utility::clamp<T>(pred_ctr_y + T(0.5) * pred_h, T(0), T(img_h - 1));
}
}
return pred_boxes;