If CV_32FC1 (1 channel float)
CvMat* M = cvCreateMat( 4, 4, CV_32FC1 );
M->data.fl[ row * M->cols + col ] = (float)3.0;
or...
cvmGet( mat, row, col );
...
inline void cvDoubleMatPrint( const CvMat* mat )
{
int i, j;
for( i = 0; i < mat->rows; i++ )
{
for( j = 0; j < mat->cols; j++ )
{
printf( "%f ",cvmGet( mat, i, j ) );
}
printf( "\n" );
}
}
from
http://note.sonots.com/OpenCV/MatrixOperations.html
댓글 없음:
댓글 쓰기