opencv rgb to bgr code example
Example 1: bgr to rgb opencv
img = cv2.cvtColor(img, cv2.COLOR_RGB2BGR)
Example 2: opencv grayscale to rgb
backtorgb = cv2.cvtColor(gray,cv2.COLOR_GRAY2RGB)
Example 3: cv2 convert to rgb
im_rgb = cv2.cvtColor(im_cv, cv2.COLOR_BGR2RGB)