I am trying to access a 3D Mat object, but I don't know how to do it.
In the 2D case i can access any matrix position in a double for cycle over "i" and "j" simply with the following command:
float a = M.ptr<float>(i)[j];
Do you know how I can do it in the case I have a 3D matrix? I have tried with
float a = M.ptr<float>(i)(j)[k];
and
float a = M.ptr<float>(i)[j][k];
but they are not working. I don't want to use .at(i,j,k) because it is very slow.
