35#include <opencv2/imgcodecs.hpp>
36#include "MechEyeApi.h"
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));
Definition of data structure in device capturing image.
const ElementType * data() const