From 24dc5b785343a97e6af30cf3e633fed201ba3c93 Mon Sep 17 00:00:00 2001 From: AlexeyAB Date: Mon, 18 Mar 2019 02:56:32 +0300 Subject: [PATCH] Another compile fix --- src/yolo_console_dll.cpp | 4 ++-- src/yolo_v2_class.cpp | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/yolo_console_dll.cpp b/src/yolo_console_dll.cpp index 12ab208c..42c36322 100644 --- a/src/yolo_console_dll.cpp +++ b/src/yolo_console_dll.cpp @@ -8,7 +8,7 @@ #include #include #include // std::mutex, std::unique_lock -#include // std::unordered_map +#include // It makes sense only for video-Camera (not for video-File) @@ -184,7 +184,7 @@ void draw_boxes(cv::Mat mat_img, std::vector result_vec, std::vector i.w + 2) ? text_size.width : (i.w + 2); std::string coords_3d; - if (!isnan(i.z_3d)) { + if (!std::isnan(i.z_3d)) { std::stringstream ss; ss << std::fixed << std::setprecision(2) << "x:" << i.x_3d << "m y:" << i.y_3d << "m z:" << i.z_3d << "m "; coords_3d = ss.str(); diff --git a/src/yolo_v2_class.cpp b/src/yolo_v2_class.cpp index a7418c16..86c7acbd 100644 --- a/src/yolo_v2_class.cpp +++ b/src/yolo_v2_class.cpp @@ -20,6 +20,7 @@ extern "C" { #include #include #include +#include //static Detector* detector = NULL; @@ -411,7 +412,7 @@ LIB_API bool Detector::send_json_http(std::vector cur_bbox_vec, std::vec send_str += buf; - if (!isnan(i.z_3d)) { + if (!std::isnan(i.z_3d)) { sprintf(buf, "\n , \"coordinates_in_meters\":{\"x_3d\":%.2f, \"y_3d\":%.2f, \"z_3d\":%.2f}", i.x_3d*100, i.y_3d, i.z_3d); send_str += buf;