Search code examples
opencvopencv3.0matandroid

OpenCV4Android class Mat: difference between width() and rows(), and that between height() and cols()?


In OpenCV4Android, what is the difference between the method width() and rows(); and what is the difference between the methods height() and cols() of the class Mat?

The documentation does not say anything about these methods.


Solution

  • There's no difference between them. In general width() == cols() and height() == rows();

    In fact, the width() and height() methods internally calls the cols() and rows() methods to get the value.