Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save awesomebytes/00e5f1592db81e04372f to your computer and use it in GitHub Desktop.

Select an option

Save awesomebytes/00e5f1592db81e04372f to your computer and use it in GitHub Desktop.
pil_image = Image.open('Image.jpg').convert('RGB')
open_cv_image = np.array(pil_image)
# opencv to PIL image
cv2.cvtColor(open_cv_image, cv2.cv.CV_BGR2RGB)
cv2_im = cv2.cvtColor(open_cv_image,cv2.COLOR_BGR2RGB)
pil_im = Image.fromarray(cv2_im)
#pil_im.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment