我有一个RGB CV::Mat
对象,我想将其转换为std::vector<Eigen::Vector3d>
以用于open3d pointcloud颜色,是否可以无循环地执行此操作?
谢谢。
容易,只要您走另一条路:
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);