how to convert rgb to grayscale opencv code example
Example 1: cv2 grayscale
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
Example 2: cvtcolor rgb to gray
cv::Mat img
cv::cvtColor(img, img, CV_BGR2GRAY);
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
cv::Mat img
cv::cvtColor(img, img, CV_BGR2GRAY);