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
1751be75
Commit
1751be75
authored
Feb 24, 2021
by
gaotingquan
Browse files
Fix the bug about raising error when reading image failed
parent
add9faa8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
deploy/cpp_infer/src/main.cpp
deploy/cpp_infer/src/main.cpp
+5
-0
No files found.
deploy/cpp_infer/src/main.cpp
View file @
1751be75
...
@@ -50,6 +50,11 @@ int main(int argc, char **argv) {
...
@@ -50,6 +50,11 @@ int main(int argc, char **argv) {
cv
::
Mat
srcimg
=
cv
::
imread
(
img_path
,
cv
::
IMREAD_COLOR
);
cv
::
Mat
srcimg
=
cv
::
imread
(
img_path
,
cv
::
IMREAD_COLOR
);
if
(
!
srcimg
.
data
)
{
std
::
cerr
<<
"[ERROR] image read failed! image path: "
<<
img_path
<<
"
\n
"
;
exit
(
1
);
}
DBDetector
det
(
config
.
det_model_dir
,
config
.
use_gpu
,
config
.
gpu_id
,
DBDetector
det
(
config
.
det_model_dir
,
config
.
use_gpu
,
config
.
gpu_id
,
config
.
gpu_mem
,
config
.
cpu_math_library_num_threads
,
config
.
gpu_mem
,
config
.
cpu_math_library_num_threads
,
config
.
use_mkldnn
,
config
.
max_side_len
,
config
.
det_db_thresh
,
config
.
use_mkldnn
,
config
.
max_side_len
,
config
.
det_db_thresh
,
...
...
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