Browse Source

save depth image

leon 1 month ago
parent
commit
f1c385909b
1 changed files with 6 additions and 6 deletions
  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";
             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) {
             std::unique_lock<std::mutex> lock(mutex_);