cv::Mat depth_image_(FLAGS_deptrum_output_height,
FLAGS_deptrum_output_width,
CV_16UC1,
&depth_image[0]);
std::string depth_filename = FLAGS_deptrum_prefix + "depth.png";
cv::imwrite(depth_filename.c_str(), depth_image_);
std::string depth_filename = FLAGS_deptrum_prefix + "depth.txt";
SaveDepth(depth_filename, depth_image, FLAGS_deptrum_output_height, FLAGS_deptrum_output_width);
// Save obj_image_bg png 旋轉圖片
std::string depth_filename_ir = FLAGS_deptrum_prefix + "ir.png";
cv::Mat srcCopy = cv::Mat(obj_image_bg.rows, obj_image_bg.cols, obj_image_bg.depth());
cv::transpose(obj_image_bg, srcCopy);
cv::flip(srcCopy, srcCopy, -1);
cv::imwrite(depth_filename_ir.c_str(), srcCopy);
// Save obj_image_rgb bmp
obj_image_rgb = image_rgb.clone();
std::string depth_filename_rgb = FLAGS_deptrum_prefix + "rbg.bmp";
cv::imwrite(depth_filename_rgb.c_str(), obj_image_rgb);
cv::Mat roi_on_depth_image_(rgb_height, rgb_width, CV_16UC1, &roi_on_depth_image[0]);
std::string rgb_depth_image_name = FLAGS_deptrum_prefix + "depth.png";
cv::imwrite(rgb_depth_image_name.c_str(), roi_on_depth_image_);
// The order of edge image
int edge_image_num_ = 0;