Ask Your Question
0

dot product

asked 2013-02-09 10:49:33 -0600

BMR gravatar image

updated 2013-02-09 11:00:47 -0600

i try to get the dot product of 2 matrices A and B.

double dA[] = {
    1.0, 2.0,
    1.7, 0.8,
    0.6, 1.0
    }; 
    Mat A = Mat(3, 2, CV_32FC1, dA );
    double dB[] = {
    1.2, 0.0, 1.7,
    0.4, 1.3, 0.1
    };
    Mat B = Mat( 3,2,  CV_32FC1, dB );
    double b = dot(A,B);          //  but i get error here

Error:no instance of function template "cv::dot" matches the argument list

how can i use thes function or any other function to get the dot product of this 2 matrices

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2013-02-09 11:02:59 -0600

updated 2013-02-09 11:03:59 -0600

change your code :

double b = dot(&dA,&dB);

to :

double b = A.dot(B);
edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-02-09 10:49:33 -0600

Seen: 22,896 times

Last updated: Feb 09 '13