Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wangsen
paddle_dbnet
Commits
3f1b5abd
Unverified
Commit
3f1b5abd
authored
Jul 16, 2020
by
dyning
Committed by
GitHub
Jul 16, 2020
Browse files
Merge pull request #354 from LDOUBLEV/fixocr
fix cv Exception
parents
02519d50
a02ba15e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
deploy/lite/db_post_process.cc
deploy/lite/db_post_process.cc
+5
-0
No files found.
deploy/lite/db_post_process.cc
View file @
3f1b5abd
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment