Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Are 4 or more dimensions allowed in a Mat?

Hi guys, I have been using opencv for a while now, but I now need to make matrices of 4, or 5 dimensions. I can create a matrix like:

int sz[] = {1,5,5,16,16};
Mat x = (5,sz,CV_32F, Scalar::all(0));

but x.at<float>(1,1,1,1,1) is invalid. Are opencv Mat objects not able to handle anything greater than 3 dimensions? Or is there another way of accessing the elements. Thanks for any help!