aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/Types.h
diff options
context:
space:
mode:
authorgiuros01 <giuseppe.rossini@arm.com>2018-11-16 10:39:59 +0000
committerGiuseppe Rossini <giuseppe.rossini@arm.com>2018-11-16 17:57:46 +0000
commitd696cb6d18c2fe66f1abce88bbd14faf2137ef89 (patch)
tree9428fea2613651e2d7ffb53b15c62c80594eb8e3 /arm_compute/core/Types.h
parentc8df89f477c3dc63f396ad37bee8ed5d50dee4ac (diff)
downloadComputeLibrary-d696cb6d18c2fe66f1abce88bbd14faf2137ef89.tar.gz
COMPMID-1451: Fixes for BoundingBoxTransform
- Fixing a bug for which we did not scale the boxes before transforming them - Adding the correct_transform_coords option to BoundingBoxTransformInfo Change-Id: I40281254bcf87e7c8583c119e99562414fe59822
Diffstat (limited to 'arm_compute/core/Types.h')
-rw-r--r--arm_compute/core/Types.h29
1 files changed, 19 insertions, 10 deletions
diff --git a/arm_compute/core/Types.h b/arm_compute/core/Types.h
index 4eb8129b62..38094ee56a 100644
--- a/arm_compute/core/Types.h
+++ b/arm_compute/core/Types.h
@@ -1209,21 +1209,24 @@ private:
};
/** Bounding Box Transform information class */
-class BoundingBoxTransformInfo
+class BoundingBoxTransformInfo final
{
public:
/** Constructor
*
- * @param[in] img_width Width of the original image
- * @param[in] img_height Height, of the original image
- * @param[in] scale Scale of the original image
- * @param[in] apply_scale (Optional)Re-apply scaling after transforming the boxes. Defaults to false
- * @param[in] weights (Optional)Weights [wx, wy, ww, wh] for the deltas. Defaults to all ones
- * @param[in] bbox_xform_clip (Optional)Minimum bounding box width and height after bounding box transformation in log-space. Defaults to log(1000/16)
+ * @param[in] img_width Width of the original image
+ * @param[in] img_height Height, of the original image
+ * @param[in] scale Scale of the original image
+ * @param[in] apply_scale (Optional)Re-apply scaling after transforming the boxes. Defaults to false
+ * @param[in] weights (Optional)Weights [wx, wy, ww, wh] for the deltas. Defaults to all ones
+ * @param[in] correct_transform_coords (Optional)Correct bounding box transform coordinates. Defaults to false
+ * @param[in] bbox_xform_clip (Optional)Minimum bounding box width and height after bounding box transformation in log-space. Defaults to log(1000/16)
*/
- BoundingBoxTransformInfo(float img_width, float img_height, float scale, bool apply_scale = false, const std::array<float, 4> weights = { { 1.f, 1.f, 1.f, 1.f } }, float bbox_xform_clip =
- 4.135166556742356f)
- : _img_width(img_width), _img_height(img_height), _scale(scale), _apply_scale(apply_scale), _weights(weights), _bbox_xform_clip(bbox_xform_clip)
+ BoundingBoxTransformInfo(float img_width, float img_height, float scale, bool apply_scale = false, const std::array<float, 4> weights = { { 1.f, 1.f, 1.f, 1.f } }, bool correct_transform_coords =
+ false,
+ float bbox_xform_clip =
+ 4.135166556742356f)
+ : _img_width(img_width), _img_height(img_height), _scale(scale), _apply_scale(apply_scale), _correct_transform_coords(correct_transform_coords), _weights(weights), _bbox_xform_clip(bbox_xform_clip)
{
}
@@ -1257,11 +1260,17 @@ public:
return _apply_scale;
}
+ bool correct_transform_coords() const
+ {
+ return _correct_transform_coords;
+ }
+
private:
float _img_width;
float _img_height;
float _scale;
bool _apply_scale;
+ bool _correct_transform_coords;
std::array<float, 4> _weights;
float _bbox_xform_clip;
};