I have a std::vector<cv::Mat> which represents voxels in x,y,z dimensions. Each cv::Mat in the vector is a cross section or slice of the volume.
Unfortunately, OpenCV doesn't offer any wrapper for this data type, so I decided to use a non-supported module from the Eigen library called Tensor. I cannot see any constructor in the documentation that would allow me to efficiently convert from vector<cv::Mat> toEigen::Tensor` without needing to reallocate data.
What is the most efficient way to convert from std::vector<cv::Mat> to Eigen::Tensor?