This should be `const Mat&` and `Mat&`, respectively.