youtu(图像)——旋转保存图片 OpenCV (六)

  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;

 

©️2020 CSDN 皮肤主题: 技术黑板 设计师: CSDN官方博客 返回首页
实付0元
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值