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