fix Detect可能越界崩溃

dev_heyuan
liusiyang 4 weeks ago
parent 0dfbca8934
commit c1c6115c8a

@ -123,7 +123,7 @@ int AI_Edge_Algin::Detect(const cv::Mat &img, DetConfig *pDetConfig, std::shared
return 7; return 7;
} }
if (max_contour_index >= 0) if (max_contour_index >= 0&& contours.size() > 0)
{ {
result_roi = boundingRect(contours[max_contour_index]); result_roi = boundingRect(contours[max_contour_index]);
} }

@ -170,7 +170,7 @@ int ImgCheckAnalysisy::GetStatus()
std::string ImgCheckAnalysisy::GetVersion() std::string ImgCheckAnalysisy::GetVersion()
{ {
return std::string("BOE_1.2.7_" + std::string(__DATE__) + "_" + std::string(__TIME__)); return std::string("BOE_1.2.8_" + std::string(__DATE__) + "_" + std::string(__TIME__));
} }
std::string ImgCheckAnalysisy::GetErrorInfo() std::string ImgCheckAnalysisy::GetErrorInfo()

Loading…
Cancel
Save