ahmadh
ahmadh

Reputation: 1652

size of dimension of an N-dimensional cv::Mat

What is the right way to get the size of the N'th dimension of a cv::Mat object. In other words, what is the replacement for cvGetDimSize() in the new opencv?

Upvotes: 4

Views: 3557

Answers (1)

Boaz
Boaz

Reputation: 4669

m.size.p[n] will give you the n'th dimension, but make sure that n < m.dims.

That is what cvGetDimSize does.

Upvotes: 5

Related Questions