Is there a direct way to convert from a multichannel matrix to a multidimensional matrix (and vice versa)?
For example, in the following code snippet, how could I convert A
such that it has the same shape as B
?
const int sizes[3] = {50, 50, 3};
cv::Mat A = Mat::zeros(3, sizes, CV_64F);
cv::Mat B = Mat::zeros(50, 50, 3);