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
29dbd887
Unverified
Commit
29dbd887
authored
Aug 06, 2021
by
Double_V
Committed by
GitHub
Aug 06, 2021
Browse files
Merge pull request #3553 from LDOUBLEV/fix_bugs
Fix bugs
parents
f933579c
6c7ff9c7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
deploy/cpp_infer/CMakeLists.txt
deploy/cpp_infer/CMakeLists.txt
+0
-2
deploy/cpp_infer/src/config.cpp
deploy/cpp_infer/src/config.cpp
+8
-2
No files found.
deploy/cpp_infer/CMakeLists.txt
View file @
29dbd887
...
@@ -37,10 +37,8 @@ endif()
...
@@ -37,10 +37,8 @@ endif()
if
(
WIN32
)
if
(
WIN32
)
include_directories
(
"
${
PADDLE_LIB
}
/paddle/fluid/inference"
)
include_directories
(
"
${
PADDLE_LIB
}
/paddle/include"
)
include_directories
(
"
${
PADDLE_LIB
}
/paddle/include"
)
link_directories
(
"
${
PADDLE_LIB
}
/paddle/lib"
)
link_directories
(
"
${
PADDLE_LIB
}
/paddle/lib"
)
link_directories
(
"
${
PADDLE_LIB
}
/paddle/fluid/inference"
)
find_package
(
OpenCV REQUIRED PATHS
${
OPENCV_DIR
}
/build/ NO_DEFAULT_PATH
)
find_package
(
OpenCV REQUIRED PATHS
${
OPENCV_DIR
}
/build/ NO_DEFAULT_PATH
)
else
()
else
()
...
...
deploy/cpp_infer/src/config.cpp
View file @
29dbd887
...
@@ -21,12 +21,18 @@ std::vector<std::string> OCRConfig::split(const std::string &str,
...
@@ -21,12 +21,18 @@ std::vector<std::string> OCRConfig::split(const std::string &str,
std
::
vector
<
std
::
string
>
res
;
std
::
vector
<
std
::
string
>
res
;
if
(
""
==
str
)
if
(
""
==
str
)
return
res
;
return
res
;
char
strs
[
str
.
length
()
+
1
];
int
strlen
=
str
.
length
()
+
1
;
chars
*
strs
=
new
char
[
strlen
];
std
::
strcpy
(
strs
,
str
.
c_str
());
std
::
strcpy
(
strs
,
str
.
c_str
());
char
d
[
delim
.
length
()
+
1
];
int
delimlen
=
delim
.
length
()
+
1
;
char
*
d
=
new
char
[
delimlen
];
std
::
strcpy
(
d
,
delim
.
c_str
());
std
::
strcpy
(
d
,
delim
.
c_str
());
delete
[]
strs
;
delete
[]
d
;
char
*
p
=
std
::
strtok
(
strs
,
d
);
char
*
p
=
std
::
strtok
(
strs
,
d
);
while
(
p
)
{
while
(
p
)
{
std
::
string
s
=
p
;
std
::
string
s
=
p
;
...
...
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