Ask Your Question
0

cannot convert ‘cv::Mat’ to ‘float’

asked 2013-02-14 09:51:39 -0600

ovaal gravatar image

I want to multiply a 1x6 with a 6x1 Mat types matrices, and then store it in a matrix entry as follows;

Vy.at<float>(i,j) = fy.rowRange(i,i+1) * a.colRange(n, n + 1);

But if I compile this I get error: cannot convert ‘cv::Mat’ to ‘float’ in assignment

Does anybody know how to solve this?

edit retag flag offensive close merge delete

Comments

Did you mean n or j in a.colRange(...)?

Daniil Osokin gravatar imageDaniil Osokin ( 2013-02-14 23:03:42 -0600 )edit

1 answer

Sort by » oldest newest most voted
1

answered 2013-02-14 11:10:51 -0600

kabamaru gravatar image

It's probably because the multiplication returns a mat and not a float. Tried accessing it with at<float>(0,0)?

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-02-14 09:51:39 -0600

Seen: 2,502 times

Last updated: Feb 14 '13