OpenCV convert image color
int main() { cv::Mat src = cv::imread(IMG_PATH); cv::imshow("Original", src); int i, j; int cPointR, cPointG, cPointB, cPoint;//currentPoint; for (i = 1; i < src.rows; i++) for (j = 1; j < src.cols; j++) { cPointB = src.at<cv::Vec3b>(i, j)[0]; cPointG = src.at<cv::Vec3b>(i, j)[1]; cPointR = src.at<cv::Vec3b>(i, j)[2]; if (cPointB > 100 & cPointR < 100 & cPointG < 100) { src.at<cv::Vec3b>(i, j)[0] = 0; src.at<cv::Vec3b>(i, j)[1] = 0; src.at<cv::Vec3b>(i, j)[2] = 2000; } } cv::imshow("Convet", src); cv::waitKey(0); return 0; }