Ask Your Question
0

A dot-product of two matrices

asked 2014-03-06 09:25:54 -0600

lingyun gravatar image

updated 2014-03-06 09:27:57 -0600

Mat gaborMatR = new Mat(gabor_height, gabor_width, CvType.CV_32FC1); gaborMatR.put(0,0,gaborMR); Mat gaborMatI = new Mat(gabor_height, gabor_width, CvType.CV_32FC1); gaborMatI.put(0,0,gaborMI); Mat Gdstlena = new Mat(src.rows(),src.cols(), CvType.CV_32FC1);

Hi! I want to compute a dot-product of two matrices and put the result into Mat Gdstlenna. I know function 'dot(InputArray m)',but I don't know how to use it. Could you answer me? Thanks in advance!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-09-13 06:45:20 -0600

dbots94 gravatar image

Considerering your two matrices are of type cv::Mat, you can simply use the * operator. So if you have two matrices, A and B, and want to multiply them and put it to matrix C, then you can do: C=A*B

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-03-06 09:25:54 -0600

Seen: 1,230 times

Last updated: Mar 06 '14