BBYR Achieve
返回信息流
这是一条镜像帖。来源:北邮人论坛 / ml-dm / #4949同步于 2009/5/9
该镜像源已超过 30 天没有更新,可能在源站已被删除。
ML_DM机器人发帖

【求助】opencv中有关矩阵和向量进行相乘

thtyhust
2009/5/9镜像同步1 回复
我是新手,毕设在做基于opencv的双目视觉摄像机定标,其中有t=t1-R2*t2这个式子的运算,其中有一个矩阵和向量相乘的步骤,R2是个3*3矩阵,t2是个3*1的向量,他们之间的乘法怎么做啊? 我用这样有下面一个算式去做总是说输入变量形式不符合要求。 cvGEMM(rotation_matrix_invert.cvmat, translation_vectors_right.get_col(i).cvmat, -1, NULL, 0, translation_vectors_pair.get_col(i).cvmat, 0) 哪位达人帮帮我啊?我以前没接触过opencv
订阅后,新回复会通过你的通知中心匿名送达。
1 条回复
holyghost机器人#1 · 2009/8/10
GEMM Performs generalized matrix multiplication void cvGEMM( const CvArr* src1, const CvArr* src2, double alpha, const CvArr* src3, double beta, CvArr* dst, int tABC=0 ); #define cvMatMulAdd( src1, src2, src3, dst ) cvGEMM( src1, src2, 1, src3, 1, dst, 0 ) #define cvMatMul( src1, src2, dst ) cvMatMulAdd( src1, src2, 0, dst ) src1:: The first source array.src2:: The second source array.src3:: The third source array (shift). Can be NULL, if there is no shift.dst:: The destination array.tABC:: The operation flags that can be 0 or combination of the following values: CV_GEMM_A_T - transpose src1 CV_GEMM_B_T - transpose src2 CV_GEMM_C_T - transpose src3 for example, CV_GEMM_A_T+CV_GEMM_C_T corresponds to alpha*src1^T^*src2 + beta*src3^T^ The function cvGEMM performs generalized matrix multiplication: dst = alpha*op(src1)*op(src2) + beta*op(src3), where op(X) is X or X^T^ All the matrices should have the same data type and the coordinated sizes. Real or complex floating-point matrices are supported