cv::Mat_ && cv::Vec conversion
I use visual studio 2010 with opencv 2.46,while when I convert Mat_(such as Mat1d,not Mat) to Vec or Matx,I meet a strange mistake,vc says that it can't find the return value in function
template<typename _Tp> template<int n> inline Mat_<_Tp>::operator Vec<typename DataType<_Tp>::channel_type, n>() const at <mat.hpp>
we try to solve the problem by change the function to this
template<typename _Tp> template<int n> inline Mat_<_Tp>::operator Vec<typename DataType<_Tp>::channel_type, n>() const
{
CV_Assert(n % DataType<_Tp>::channels == 0);
Vec<typename DataType<_Tp>::channel_type, n> ret=this->Mat::operator Vec<typename DataType<_Tp>::channel_type, n>();
return ret;
}
Then it works well... Can anybody tell me why it can happen ?