35#include <opencv2/imgcodecs.hpp>
40 cv::Mat color8UC3 = cv::Mat(color.
height(), color.
width(), CV_8UC3, color.
data());
41 cv::imwrite(path, color8UC3);
42 std::cout <<
"Capture and save color image : " << path << std::endl;
47 cv::Mat depth32F = cv::Mat(depth.
height(), depth.
width(), CV_32FC1, depth.
data());
48 cv::imwrite(path, depth32F);
49 std::cout <<
"Capture and save depth image : " << path << std::endl;
52inline void saveMap(
float* depth,
int lineCount,
int width,
const std::string& path)
54 cv::imwrite(path, cv::Mat(lineCount, width, CV_32FC1, depth));
57inline void saveIntensity(
unsigned char* intensity,
int lineCount,
int width,
58 const std::string& path)
60 cv::imwrite(path, cv::Mat(lineCount, width, CV_8UC1, intensity));
void saveIntensity(unsigned char *intensity, int lineCount, int width, const std::string &path)
Definition OpenCVUtil.h:57
void saveMap(mmind::api::ColorMap color, std::string path)
Definition OpenCVUtil.h:38
Definition of data structure in device capturing image.
Definition MechEyeFrame.hpp:101
const ElementType * data() const
Definition MechEyeFrame.hpp:130
uint32_t height() const
Definition MechEyeFrame.hpp:120
uint32_t width() const
Definition MechEyeFrame.hpp:115