fix bug when used as lib

This commit is contained in:
jario
2024-01-02 14:02:34 +08:00
parent cc715bef70
commit 9612f9fe83
6 changed files with 54 additions and 81 deletions

View File

@@ -1002,11 +1002,11 @@ void CommonObjectDetectorBase::detect(cv::Mat img_, TargetsInFrame& tgts_, Box*
if (this->_with_segmentation)
{
cv::Mat mask_j = boxes_seg[j].clone();
#ifdef WITH_INTEL
#ifdef WITH_INTEL
tgt.setMask(mask_j);
#endif
#endif
#ifdef WITH_CUDA
#ifdef WITH_CUDA
int maskh = mask_j.rows, maskw = mask_j.cols;
assert(maskh == maskw);
@@ -1036,7 +1036,7 @@ void CommonObjectDetectorBase::detect(cv::Mat img_, TargetsInFrame& tgts_, Box*
{
tgt.setMask(mask_j);
}
#endif
#endif
}
tgts_.targets.push_back(tgt);