Ask Your Question
0

Mat declaration: declaration dimensions and size() are differents

asked 2017-07-26 04:42:05 -0500

Alvaro gravatar image

I declare a Mat as Mat mu = Mat::ones(2000, 256, CV_64F); and when i do cout << size(mu); the output is "[256, 2000]". This only happens in some parts of the code and I can understand that.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-07-26 04:46:46 -0500

berak gravatar image

the difference is only in the printing.

if you allocate a Mat like: Mat mu = Mat::ones(2000, 256, CV_64F); it will have 2000 rows and 256 columns, if you print out mu.size() it will show [256x2000] (cols, rows)

admittedly confusing, but no error.

edit flag offensive delete link more

Comments

1

Thank you, i thought that was a problem :)

Alvaro gravatar imageAlvaro ( 2017-07-26 04:49:53 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2017-07-26 04:42:05 -0500

Seen: 133 times

Last updated: Jul 26 '17