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
6420a76b
"ppocr/git@developer.sourcefind.cn:wangsen/paddle_dbnet.git" did not exist on "3e11efa7c4a4619d2f76c0b617ec4c0900730c15"
Commit
6420a76b
authored
Jul 08, 2020
by
LDOUBLEV
Browse files
fix clipper use
parent
d466d312
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
18 deletions
+15
-18
deploy/lite/db_post_process.h
deploy/lite/db_post_process.h
+15
-18
No files found.
deploy/lite/db_post_process.h
View file @
6420a76b
...
...
@@ -20,22 +20,22 @@
#include <map>
#include <vector>
#include "clipper.hpp"
#include "opencv2/core.hpp"
#include "opencv2/imgcodecs.hpp"
#include "opencv2/imgproc.hpp"
#include "utils/clipper.hpp"
template
<
class
T
>
T
clamp
(
T
x
,
T
min
,
T
max
)
{
if
(
x
>
max
)
return
max
;
if
(
x
<
min
)
return
min
;
template
<
class
T
>
T
clamp
(
T
x
,
T
min
,
T
max
)
{
if
(
x
>
max
)
return
max
;
if
(
x
<
min
)
return
min
;
return
x
;
}
std
::
vector
<
std
::
vector
<
float
>>
Mat2Vector
(
cv
::
Mat
mat
);
void
GetContourArea
(
std
::
vector
<
std
::
vector
<
float
>>
box
,
float
unclip_ratio
,
void
GetContourArea
(
std
::
vector
<
std
::
vector
<
float
>>
box
,
float
unclip_ratio
,
float
&
distance
);
cv
::
RotatedRect
Unclip
(
std
::
vector
<
std
::
vector
<
float
>>
box
,
float
unclip_ratio
);
...
...
@@ -46,20 +46,17 @@ bool XsortFp32(std::vector<float> a, std::vector<float> b);
bool
XsortInt
(
std
::
vector
<
int
>
a
,
std
::
vector
<
int
>
b
);
std
::
vector
<
std
::
vector
<
int
>>
OrderPointsClockwise
(
std
::
vector
<
std
::
vector
<
int
>>
pts
);
std
::
vector
<
std
::
vector
<
int
>>
OrderPointsClockwise
(
std
::
vector
<
std
::
vector
<
int
>>
pts
);
std
::
vector
<
std
::
vector
<
float
>>
GetMiniBoxes
(
cv
::
RotatedRect
box
,
float
&
ssid
);
float
BoxScoreFast
(
std
::
vector
<
std
::
vector
<
float
>>
box_array
,
cv
::
Mat
pred
);
std
::
vector
<
std
::
vector
<
std
::
vector
<
int
>>>
BoxesFromBitmap
(
const
cv
::
Mat
pred
,
const
cv
::
Mat
bitmap
,
std
::
map
<
std
::
string
,
double
>
Config
);
std
::
vector
<
std
::
vector
<
std
::
vector
<
int
>>>
BoxesFromBitmap
(
const
cv
::
Mat
pred
,
const
cv
::
Mat
bitmap
,
std
::
map
<
std
::
string
,
double
>
Config
);
std
::
vector
<
std
::
vector
<
std
::
vector
<
int
>>>
FilterTagDetRes
(
std
::
vector
<
std
::
vector
<
std
::
vector
<
int
>>>
boxes
,
float
ratio_h
,
float
ratio_w
,
cv
::
Mat
srcimg
);
std
::
vector
<
std
::
vector
<
std
::
vector
<
int
>>>
FilterTagDetRes
(
std
::
vector
<
std
::
vector
<
std
::
vector
<
int
>>>
boxes
,
float
ratio_h
,
float
ratio_w
,
cv
::
Mat
srcimg
);
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