Ask Your Question
0

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

asked Feb 14 '13

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?

Preview: (hide)

Comments

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

Daniil Osokin gravatar imageDaniil Osokin (Feb 15 '13)edit

1 answer

Sort by » oldest newest most voted
1

answered Feb 14 '13

kabamaru gravatar image

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

Preview: (hide)

Question Tools

Stats

Asked: Feb 14 '13

Seen: 2,525 times

Last updated: Feb 14 '13