How do i get the size of a multi-dimensional cv::Mat? (Mat, or MatND)
问题 I am creating a multi-dimensional MAT object, and would like to get the size of the object - e.g., const int sz[] = {10,10,9}; Mat temp(3,sz,CV_64F); std::cout << "temp.dims = " << temp.dims << " temp.size = " << temp.size() << " temp.channels = " << temp.channels() << std::endl; I believe the resulting MAT to be 10x10x9, and I'd like to confirm, but the COUT statement gives: temp.dims = 3 temp.size = [10 x 10] temp.channels = 1 I was hoping to see either: temp.dims = 3 temp.size = [10 x 10 x