How does one convert a grayscale image to RGB in OpenCV (Python)?
I am promoting my comment to an answer: The easy way is: You could draw in the original ‘frame’ itself instead of using gray image. The hard way (method you were trying to implement): backtorgb = cv2.cvtColor(gray,cv2.COLOR_GRAY2RGB) is the correct syntax.