Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The simplest way I know is:

int bytes = Mat.total() * Mat.elemSize();

The Mat.total returns rows x cols and Mat.elemSize() returns channels x sizeof(type)

The simplest way I know is:

int bytes = Mat.total() * Mat.elemSize();

The Mat.total Mat.total() returns rows x cols and Mat.elemSize() returns channels x sizeof(type)