modified restriction on bounding box size

modified restriction on bounding box size
This commit is contained in:
Yonghye Kwon 2020-06-18 12:51:12 +09:00 committed by GitHub
parent 31489669c7
commit 8e9154b110
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);