There are fields cols and rows in Mat mentioned as cols() and rows(). For consistency I kept this naming-scheme for dims.