
20 Dec
2010
20 Dec
'10
1:55 p.m.
Hi everybody, I would like to know if there is a way to get a ublas matrix from a given data pointer. Here follows what I tried: inline boost::numeric::ublas::matrix<double, boost::numeric::ublas::column_major> cvToUblasMat( CvMat & m ) { using namespace boost::numeric::ublas; return matrix<double, column_major>( m.rows, m.cols, shallow_array_adaptor<double>( m.rows * m.cols, m.data.db ) ); } Thank you for helping... -Eloi du Bois.