|
Boost Users : |
Subject: [Boost-users] ublas matrix from another data pointer
From: Eloi Du Bois (eloi.du.bois_at_[hidden])
Date: 2010-12-20 08:55:12
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.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net