rgb to grayscale python without cv2 convert color code example Example: cvtcolor rgb to gray cv::Mat img cv::cvtColor(img, img, CV_BGR2GRAY);