浏览代码

save depth image

leon 1 月之前
父节点
当前提交
f1c385909b
共有 1 个文件被更改,包括 6 次插入6 次删除
  1. 6 6
      src/nodes/httpPush/httpPush.cpp

+ 6 - 6
src/nodes/httpPush/httpPush.cpp

@@ -46,12 +46,12 @@ void HttpPushNode::work()
             std::string image_name = "result/" + metaData->from + "_" + getTimeString() + ".jpg";
             std::string image_name = "result/" + metaData->from + "_" + getTimeString() + ".jpg";
             cv::imwrite(image_name, image);
             cv::imwrite(image_name, image);
 
 
-            // if (!metaData->depth.empty())
-            // {
-            //     get_color_depth(metaData->depth);
-            //     std::string depth_name = "result/" + metaData->from + "_depth_" + getTimeString() + ".jpg";
-            //     cv::imwrite(depth_name, get_color_depth(metaData->depth));
-            // }
+            if (!metaData->depth.empty())
+            {
+                get_color_depth(metaData->depth);
+                std::string depth_name = "result/" + metaData->from + "_depth_" + getTimeString() + ".jpg";
+                cv::imwrite(depth_name, get_color_depth(metaData->depth));
+            }
         }
         }
         if (!has_data) {
         if (!has_data) {
             std::unique_lock<std::mutex> lock(mutex_);
             std::unique_lock<std::mutex> lock(mutex_);