Please help me to convert opencv matrix multiplication into matlab
古いコメントを表示
Dear concern, I am facing a problem converting an opencv matrix multiplication into matlab which seemed very easy but it is giving me different output. I have two matrices:
transformationMatrix =
-7.04442501068115 0 2239.44677734375
0 1.53200602531433 -2508.06420898438
0 6.14454364776611 -1048.95043945313
0 -0.00281885638833046 0.481214046478271
matrixmultiplier =
317.903421890249 460 100 317.903421890249
220 220 220 350
1 1 1 1
While using opencv the code and output becomes: CvMat *result = cvCreateMat( resultRows, resultCols, CV_32FC1 ); cvMatMul(&transformationMatrix, &matrixmultiplier, result) =
-3.88010430469876e-05 -1000.98872756958 1535.00427627563 -3.88010430469876e-05
-2171.02288341522 -2171.02288341522 -2171.02288341522 -1971.86210012436
302.84916305542 302.84916305542 302.84916305542 1101.63983726501
-0.13893435895443 -0.13893435895443 -0.13893435895443 -0.505385689437389
But while using matlab the code and output becomes: transformedMatrix*matrixmultiplier =
3.18194215651602e-05 -1000.98870849609 1535.00427246094 3.18194215651602e-05
-2171.02294921875 -2171.02294921875 -2171.02294921875 -1971.86206054688
302.849151611328 302.849151611328 302.849151611328 1101.63989257813
-0.13893435895443 -0.13893435895443 -0.13893435895443 -0.50538569688797
I need urgent help to find the error in my coding to understand the discrepancy between two outputs.
Thanks in advance
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で OpenCV Support についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!