reduced 30% time by changing 2d vectors to cv::Mat