Multiply two matrices
Solution
double dA[] = {
1.0, 2.0,
1.7, 0.8,
0.6, 1.0
};
CvMat A = cvMat(3, 2, CV_64FC1, dA );
double dB[] = {
1.2, 0.0, 1.7,
0.4, 1.3, 0.1
};
CvMat B = cvMat( 2, 3, CV_64FC1, dB );
CvMat *C = cvCreateMat( 3, 3, CV_64FC1);
cvMatMul( &A, &B, C );I think the followings should be noted regarding this issue:
CvMat is a class, cvMat is a function
the right order is ( rows, columns )
cvMatMul does not allocate matrix C (you have to call cvCreateMat explicitly)
