updated to cv::Mat, works with 3.0