I am learning image processing using OpenCV for a realtime application. I did some thresholding on an image and want to label the contours in green, but they aren't showing up in green because my image is in black and white.
Early in the program I used gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) to convert from RGB to grayscale, but to go back I am confused, and the function backtorgb = cv2.cvtColor(gray,cv2.CV_GRAY2RGB) is giving AttributeError: 'module' object has no attribute 'CV_GRAY2RGB'.
The code below does not appear to be drawing contours in green - is this because it's a greyscale image? If so, can I convert the grayscale image back to RGB to visualize the contours in green?
import numpy as np
import cv2
import time
cap = cv2.VideoCapture(0)
while(cap.isOpened()):
ret, frame = cap.rea