From 8e9154b1101f01c13e6fb96d2e51bf9cdec6e3e0 Mon Sep 17 00:00:00 2001 From: Yonghye Kwon Date: Thu, 18 Jun 2020 12:51:12 +0900 Subject: [PATCH] modified restriction on bounding box size modified restriction on bounding box size --- label_img.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/label_img.cpp b/label_img.cpp index 106682a..1576ecf 100644 --- a/label_img.cpp +++ b/label_img.cpp @@ -57,8 +57,8 @@ void label_img::mousePressEvent(QMouseEvent *ev) objBoundingbox.box = getRelativeRectFromTwoPoints(m_relative_mouse_pos_in_ui, m_relatvie_mouse_pos_LBtnClicked_in_ui); - bool width_is_too_small = objBoundingbox.box.width() < 0.01; - bool height_is_too_small = objBoundingbox.box.height() < 0.01; + bool width_is_too_small = objBoundingbox.box.width() * m_inputImg.width() < 4; + bool height_is_too_small = objBoundingbox.box.height() * m_inputImg.height() < 4; if(!width_is_too_small && !height_is_too_small) m_objBoundingBoxes.push_back(objBoundingbox);