"cv::Mat" should be replaced with "const Mat&". "unsigned int" should preferably be replaced with "int"