"docs/source/en/vscode:/vscode.git/clone" did not exist on "ba352aea29df9a7f086bf0815fe9fe479218f801"
Commit a02ba15e authored by LDOUBLEV's avatar LDOUBLEV
Browse files

fix cv Exception

parent 4274652a
...@@ -214,6 +214,9 @@ BoxesFromBitmap(const cv::Mat pred, const cv::Mat bitmap, ...@@ -214,6 +214,9 @@ BoxesFromBitmap(const cv::Mat pred, const cv::Mat bitmap,
for (int i = 0; i < num_contours; i++) { for (int i = 0; i < num_contours; i++) {
float ssid; float ssid;
if (contours[i].size() <= 2)
continue;
cv::RotatedRect box = cv::minAreaRect(contours[i]); cv::RotatedRect box = cv::minAreaRect(contours[i]);
auto array = GetMiniBoxes(box, ssid); auto array = GetMiniBoxes(box, ssid);
...@@ -232,6 +235,8 @@ BoxesFromBitmap(const cv::Mat pred, const cv::Mat bitmap, ...@@ -232,6 +235,8 @@ BoxesFromBitmap(const cv::Mat pred, const cv::Mat bitmap,
// start for unclip // start for unclip
cv::RotatedRect points = Unclip(box_for_unclip, unclip_ratio); cv::RotatedRect points = Unclip(box_for_unclip, unclip_ratio);
if (points.size.height < 1.001 && points.size.width < 1.001)
continue;
// end for unclip // end for unclip
cv::RotatedRect clipbox = points; cv::RotatedRect clipbox = points;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment