From a65d0b60068139bb1cff0c30b4e7246001866fbe Mon Sep 17 00:00:00 2001 From: Jeffrey_Li <412100639@qq.com> Date: Wed, 28 Jun 2023 00:39:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=BC=A0=E6=A0=87=E6=A1=86?= =?UTF-8?q?=E8=AF=86=E5=88=AB=E9=80=BB=E8=BE=91=E4=B8=8D=E5=AF=B9=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cigarette/common.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Cigarette/common.cpp b/Cigarette/common.cpp index 4dbcdf9..de4e86e 100644 --- a/Cigarette/common.cpp +++ b/Cigarette/common.cpp @@ -76,10 +76,16 @@ bool CheckSelectRects( int LabelCnt ) { + bool find; + if (!(t_DisplayLabelConf.Flag[LabelCnt] & DisplayLabel_Type_Bit)) + { + return false; + } if (VecCnt < VecRects.size()) { for (int i = 0; i < VecRects[VecCnt].size(); i++) { + find = false; for(int j = 0; j < t_DisplayLabelConf.RectVet[LabelCnt].size(); j++) { cv::Rect LocalRect = VecRects[VecCnt][i].second; @@ -94,11 +100,16 @@ bool CheckSelectRects( ) ); - if(LocalRect != (LocalRect & CheckRect)) + cv::Rect tempRect = (LocalRect & CheckRect); + if(LocalRect == tempRect) { - return true; + find = true; } } + if(!find) + { + return true; + } } } return false;