I am writing a function in which I need to access to a element of a Mat, but this function can receive Mat of differents types. So, if I have:
Mat
If it is a possibility, make the function receiving the openCV Mat a template function:
void f(const Mat& m) { (void) m.at(0, 0); }
use it like that:
Mat m1/* ... */; m1.at(0, 0) = 0; f(m);