replaced sprintf with cv::format