Fix dnn object detection sample

This commit is contained in:
Dmitry Kurtaev
2019-09-13 11:50:50 +03:00
parent 8d0b3dad5c
commit 741aee6901
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -347,7 +347,7 @@ void postprocess(Mat& frame, const std::vector<Mat>& outs, Net& net)
int bottom = (int)data[i + 6];
int width = right - left + 1;
int height = bottom - top + 1;
if (width * height <= 1)
if (width <= 2 || height <= 2)
{
left = (int)(data[i + 3] * frame.cols);
top = (int)(data[i + 4] * frame.rows);