Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
PILでイメージを読み込んでOpenCV形式に変換する
pil_image = Image.open('C:\\Users\\ochi\\temp\\lenna.jpg')
cv_image = cv2.cvtColor(np.array(pil_image) , cv2.COLOR_RGB2BGR)
cv2.imshow("cv_image",cv_image)
cv2.waitKey(0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment