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;