From a419875943ebc16f9be9d58f4222cb148c93ec90 Mon Sep 17 00:00:00 2001 From: Double_V Date: Wed, 8 Sep 2021 10:52:47 +0800 Subject: [PATCH] fix cpp img read --- deploy/cpp_infer/src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/cpp_infer/src/main.cpp b/deploy/cpp_infer/src/main.cpp index 6e8ded7f..6d2bdef2 100644 --- a/deploy/cpp_infer/src/main.cpp +++ b/deploy/cpp_infer/src/main.cpp @@ -179,7 +179,7 @@ int main_system(std::vector cv_all_img_names) { for (int i = 0; i < cv_all_img_names.size(); ++i) { LOG(INFO) << "The predict img: " << cv_all_img_names[i]; - cv::Mat srcimg = cv::imread(FLAGS_image_dir, cv::IMREAD_COLOR); + cv::Mat srcimg = cv::imread(cv_all_img_names[i], cv::IMREAD_COLOR); if (!srcimg.data) { std::cerr << "[ERROR] image read failed! image path: " << cv_all_img_names[i] << endl; exit(1); -- GitLab