7 #include <opencv2/opencv.hpp>
18 const int h = vf.get_height();
22 return Mat(Size(
w,
h), CV_8UC3, (
void*)
f.get_data(), Mat::AUTO_STEP);
26 auto r_rgb = Mat(Size(
w,
h), CV_8UC3, (
void*)
f.get_data(), Mat::AUTO_STEP);
28 cvtColor(r_rgb, r_bgr, COLOR_RGB2BGR);
33 return Mat(Size(
w,
h), CV_16UC1, (
void*)
f.get_data(), Mat::AUTO_STEP);
37 return Mat(Size(
w,
h), CV_8UC1, (
void*)
f.get_data(), Mat::AUTO_STEP);
41 return Mat(Size(
w,
h), CV_32FC1, (
void*)
f.get_data(), Mat::AUTO_STEP);
44 throw std::runtime_error(
"Frame format is not supported yet!");
51 dm.convertTo( dm, CV_64F );
52 dm = dm *
f.get_units();