What do you want to save?
Add Code snippet
New code examples
-
Python 2022-01-22 23:30:02
convert opencv image to pil image
import cv2 import numpy as np from PIL import Image img = cv2.imread("path/to/img.png") # You may need to convert the color. img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) im_pil = Image.fromarray(img) # For reversing the operation: im_np = np.as... Add solution -
Best helpers
Ranking is empty