I have a RGB CV::Mat
object and I want to convert it to std::vector<Eigen::Vector3d>
to be used in open3d pointcloud color, is it possible to do this without loop?
Thanks.
I have a RGB CV::Mat
object and I want to convert it to std::vector<Eigen::Vector3d>
to be used in open3d pointcloud color, is it possible to do this without loop?
Thanks.
Easy, provided you go the other way around:
std::vector<Eigen::Vector3d> pixel_data(height * width);
cv::Mat mat = cv::Mat(height, width, CV_64FC3, &(pixel_data[0](0)));
fill_the_matrix_as_you_wish(mat);