I need to access the element type T of an opencv matrix Mat_<\T> at compile time; Is there any way to do it? I am trying to achieve the following:
template <typename T> void foo(const T& mat) { // T::type* ptr = (T::type*)mat.data; } foo(Mat_<float>::ones(5,5)); The following declaration is not an option:
template <typename T> void foo(const Mat_<T>& mat);